Another ctrl+alt+del checkpoint.
This commit is contained in:
parent
784ab183ae
commit
5ca0e026ab
|
@ -242,7 +242,7 @@ CXWindowsPrimaryScreen::onEvent(CEvent* event)
|
||||||
KeyID key = mapKey(&xevent.xkey);
|
KeyID key = mapKey(&xevent.xkey);
|
||||||
if (key != kKeyNone) {
|
if (key != kKeyNone) {
|
||||||
// check for ctrl+alt+del emulation
|
// check for ctrl+alt+del emulation
|
||||||
if ((key == kKeyPause || key == kKeyCancel) &&
|
if ((key == kKeyPause || key == kKeyBreak) &&
|
||||||
(mask & (KeyModifierControl | KeyModifierAlt)) ==
|
(mask & (KeyModifierControl | KeyModifierAlt)) ==
|
||||||
(KeyModifierControl | KeyModifierAlt)) {
|
(KeyModifierControl | KeyModifierAlt)) {
|
||||||
// pretend it's ctrl+alt+del
|
// pretend it's ctrl+alt+del
|
||||||
|
@ -291,7 +291,7 @@ CXWindowsPrimaryScreen::onEvent(CEvent* event)
|
||||||
}
|
}
|
||||||
|
|
||||||
// check for ctrl+alt+del emulation
|
// check for ctrl+alt+del emulation
|
||||||
if ((key == kKeyPause || key == kKeyCancel) &&
|
if ((key == kKeyPause || key == kKeyBreak) &&
|
||||||
(mask & (KeyModifierControl | KeyModifierAlt)) ==
|
(mask & (KeyModifierControl | KeyModifierAlt)) ==
|
||||||
(KeyModifierControl | KeyModifierAlt)) {
|
(KeyModifierControl | KeyModifierAlt)) {
|
||||||
// pretend it's ctrl+alt+del and ignore autorepeat
|
// pretend it's ctrl+alt+del and ignore autorepeat
|
||||||
|
|
|
@ -118,14 +118,11 @@ CXWindowsSecondaryScreen::keyDown(KeyID key,
|
||||||
KeyCode keycode;
|
KeyCode keycode;
|
||||||
|
|
||||||
// check for ctrl+alt+del emulation
|
// check for ctrl+alt+del emulation
|
||||||
if ((mask & (KeyModifierControl | KeyModifierAlt)) ==
|
if (key == kKeyDelete &&
|
||||||
(KeyModifierControl | KeyModifierAlt) &&
|
(mask & (KeyModifierControl | KeyModifierAlt)) ==
|
||||||
key == XK_Up - 0xff00 + 0xef00) {
|
(KeyModifierControl | KeyModifierAlt)) {
|
||||||
// just convert the key to Delete and synthesize the key
|
|
||||||
// normally. the X server/window manager will do the right
|
|
||||||
// thing (or, at least XFree86/KDE will).
|
|
||||||
LOG((CLOG_DEBUG "ctrl+alt+del emulation"));
|
LOG((CLOG_DEBUG "ctrl+alt+del emulation"));
|
||||||
key = XK_Delete - 0xff00u + 0xef00u;
|
// just pass the key through
|
||||||
}
|
}
|
||||||
|
|
||||||
// get the sequence of keys to simulate key press and the final
|
// get the sequence of keys to simulate key press and the final
|
||||||
|
@ -214,6 +211,14 @@ CXWindowsSecondaryScreen::keyUp(KeyID key,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// check for ctrl+alt+del emulation
|
||||||
|
if (key == kKeyDelete &&
|
||||||
|
(mask & (KeyModifierControl | KeyModifierAlt)) ==
|
||||||
|
(KeyModifierControl | KeyModifierAlt)) {
|
||||||
|
LOG((CLOG_DEBUG "ctrl+alt+del emulation"));
|
||||||
|
// just pass the key through
|
||||||
|
}
|
||||||
|
|
||||||
// get the sequence of keys to simulate key release and the final
|
// get the sequence of keys to simulate key release and the final
|
||||||
// modifier state.
|
// modifier state.
|
||||||
m_mask = mapKey(keys, keycode, key, mask, kRelease);
|
m_mask = mapKey(keys, keycode, key, mask, kRelease);
|
||||||
|
|
Loading…
Reference in New Issue