diff --git a/lib/platform/CXWindowsPrimaryScreen.cpp b/lib/platform/CXWindowsPrimaryScreen.cpp index b19b412a..10ddc6eb 100644 --- a/lib/platform/CXWindowsPrimaryScreen.cpp +++ b/lib/platform/CXWindowsPrimaryScreen.cpp @@ -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 diff --git a/lib/platform/CXWindowsSecondaryScreen.cpp b/lib/platform/CXWindowsSecondaryScreen.cpp index 542f1528..53145883 100644 --- a/lib/platform/CXWindowsSecondaryScreen.cpp +++ b/lib/platform/CXWindowsSecondaryScreen.cpp @@ -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);