summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2011-05-19 14:55:12 +0000
committerPierre Ossman <ossman@cendio.se>2011-05-19 14:55:12 +0000
commit71f295a96ff9ddca49de4a17335cfb8234b48eb7 (patch)
treeee1ad677473da3ff18836cf47ce8ad095465d24d
parent4a6be4a2a0ebba32133c09c92b0ef84050d2f96f (diff)
downloadtigervnc-71f295a96ff9ddca49de4a17335cfb8234b48eb7.tar.gz
tigervnc-71f295a96ff9ddca49de4a17335cfb8234b48eb7.zip
Add keyboard debugging output.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4433 3789f03b-4d11-0410-bbf8-ca57d06f2519
-rw-r--r--vncviewer/Viewport.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/vncviewer/Viewport.cxx b/vncviewer/Viewport.cxx
index acbf36cb..89a3d517 100644
--- a/vncviewer/Viewport.cxx
+++ b/vncviewer/Viewport.cxx
@@ -235,8 +235,10 @@ int Viewport::handle(int event)
case FL_UNFOCUS:
// Release all keys that were pressed as that generally makes most
// sense (e.g. Alt+Tab where we only see the Alt press)
- for (iter = downKeySym.begin();iter != downKeySym.end();++iter)
+ for (iter = downKeySym.begin();iter != downKeySym.end();++iter) {
+ vlog.debug("Key released: 0x%04x => 0x%04x", iter->first, iter->second);
cc->writer()->keyEvent(iter->second, false);
+ }
downKeySym.clear();
return 1;
@@ -455,6 +457,8 @@ void Viewport::handleKeyEvent(int keyCode, const char *keyText, bool down)
return;
}
+ vlog.debug("Key released: 0x%04x => 0x%04x", keyCode, iter->second);
+
cc->writer()->keyEvent(iter->second, false);
downKeySym.erase(iter);
@@ -466,6 +470,8 @@ void Viewport::handleKeyEvent(int keyCode, const char *keyText, bool down)
if (keySym == XK_VoidSymbol)
return;
+ vlog.debug("Key pressed: 0x%04x '%s' => 0x%04x", keyCode, keyText, keySym);
+
downKeySym[keyCode] = keySym;
cc->writer()->keyEvent(keySym, down);
}