Another ctrl+alt+del checkpoint.

This commit is contained in:
crs 2003-06-08 22:20:01 +00:00
parent 784ab183ae
commit 5ca0e026ab
2 changed files with 14 additions and 9 deletions

View File

@ -242,7 +242,7 @@ CXWindowsPrimaryScreen::onEvent(CEvent* event)
KeyID key = mapKey(&xevent.xkey);
if (key != kKeyNone) {
// check for ctrl+alt+del emulation
if ((key == kKeyPause || key == kKeyCancel) &&
if ((key == kKeyPause || key == kKeyBreak) &&
(mask & (KeyModifierControl | KeyModifierAlt)) ==
(KeyModifierControl | KeyModifierAlt)) {
// pretend it's ctrl+alt+del
@ -291,7 +291,7 @@ CXWindowsPrimaryScreen::onEvent(CEvent* event)
}
// check for ctrl+alt+del emulation
if ((key == kKeyPause || key == kKeyCancel) &&
if ((key == kKeyPause || key == kKeyBreak) &&
(mask & (KeyModifierControl | KeyModifierAlt)) ==
(KeyModifierControl | KeyModifierAlt)) {
// pretend it's ctrl+alt+del and ignore autorepeat

View File

@ -118,14 +118,11 @@ CXWindowsSecondaryScreen::keyDown(KeyID key,
KeyCode keycode;
// check for ctrl+alt+del emulation
if ((mask & (KeyModifierControl | KeyModifierAlt)) ==
(KeyModifierControl | KeyModifierAlt) &&
key == XK_Up - 0xff00 + 0xef00) {
// 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).
if (key == kKeyDelete &&
(mask & (KeyModifierControl | KeyModifierAlt)) ==
(KeyModifierControl | KeyModifierAlt)) {
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
@ -214,6 +211,14 @@ CXWindowsSecondaryScreen::keyUp(KeyID key,
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
// modifier state.
m_mask = mapKey(keys, keycode, key, mask, kRelease);