diff --git a/vncviewer/KeyboardMacOS.mm b/vncviewer/KeyboardMacOS.mm index d00203635..b2dd4b57b 100644 --- a/vncviewer/KeyboardMacOS.mm +++ b/vncviewer/KeyboardMacOS.mm @@ -180,6 +180,8 @@ systemKeyCode); } + vlog.debug("%d / 0x%02x => 0x%04x", systemKeyCode, modifiers, keySym); + handler->handleKeyPress(systemKeyCode, keyCode, keySym); // We don't get any release events for CapsLock, so we have to @@ -217,6 +219,8 @@ if (iter != keySyms.end()) continue; + vlog.debug("%d / 0x%02x => 0x%04x", systemKeyCode, mods, ks); + keySyms.push_back(ks); } @@ -232,6 +236,7 @@ if (iter != keySyms.end()) continue; + vlog.debug("%d / 0x%02x => 0x%04x", systemKeyCode, mods, ks); keySyms.push_back(ks); } diff --git a/vncviewer/KeyboardWin32.cxx b/vncviewer/KeyboardWin32.cxx index c15629b2a..220532e77 100644 --- a/vncviewer/KeyboardWin32.cxx +++ b/vncviewer/KeyboardWin32.cxx @@ -401,6 +401,8 @@ std::list KeyboardWin32::translateToKeySyms(int systemKeyCode) if (ks != NoSymbol) keySyms.push_back(ks); + vlog.debug("%d / 0x%x => 0x%02x %s => 0x%04x", systemKeyCode, 0, vkey, extended ? "(extended)" : "", ks); + // Next just a single modifier at a time for (mods = 1; mods < 16; mods <<= 1) { std::list::const_iterator iter; @@ -421,6 +423,8 @@ std::list KeyboardWin32::translateToKeySyms(int systemKeyCode) if (ks == NoSymbol) continue; + vlog.debug("%d / 0x%x => 0x%02x %s => 0x%04x", systemKeyCode, mods, vkey, extended ? "(extended)" : "", ks); + iter = std::find(keySyms.begin(), keySyms.end(), ks); if (iter != keySyms.end()) continue; @@ -448,6 +452,8 @@ std::list KeyboardWin32::translateToKeySyms(int systemKeyCode) if (ks == NoSymbol) continue; + vlog.debug("%d / 0x%x => 0x%02x %s => 0x%04x", systemKeyCode, mods, vkey, extended ? "(extended)" : "", ks); + iter = std::find(keySyms.begin(), keySyms.end(), ks); if (iter != keySyms.end()) continue; diff --git a/vncviewer/KeyboardX11.cxx b/vncviewer/KeyboardX11.cxx index a4706014c..8f4ad819a 100644 --- a/vncviewer/KeyboardX11.cxx +++ b/vncviewer/KeyboardX11.cxx @@ -279,5 +279,8 @@ void KeyboardX11::translateToKeySyms(int systemKeyCode, if (iter != keySyms->end()) return; + vlog.debug("%d / %d / 0x%02x => 0x%04x", systemKeyCode, + (int)group, (int)mods, (int)ks); + keySyms->push_back(ks); } diff --git a/vncviewer/Viewport.cxx b/vncviewer/Viewport.cxx index 2268ed314..4a4a9df50 100644 --- a/vncviewer/Viewport.cxx +++ b/vncviewer/Viewport.cxx @@ -642,6 +642,10 @@ void Viewport::handleKeyPress(int systemKeyCode, // just the current one keySyms = keyboard->translateToKeySyms(systemKeyCode); + vlog.debug("Hot key %d / 0x%04x:", systemKeyCode, keyCode); + for (iter = keySyms.begin(); iter != keySyms.end(); iter++) + vlog.debug("%s (0x%04x)", KeySymName(*iter), *iter); + // Then we pick the one that matches first keySym = NoSymbol; for (iter = keySyms.begin(); iter != keySyms.end(); iter++) {