summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--vncviewer/DesktopWindow.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/vncviewer/DesktopWindow.cxx b/vncviewer/DesktopWindow.cxx
index 0188f724..a621e405 100644
--- a/vncviewer/DesktopWindow.cxx
+++ b/vncviewer/DesktopWindow.cxx
@@ -281,8 +281,8 @@ rdr::U32 DesktopWindow::translateKeyEvent(int keyCode, const char *keyText)
unsigned ucs;
// First check for function keys
- if ((keyCode >= FL_F) && (keyCode <= FL_F_Last))
- return XK_F1 + (keyCode - FL_F);
+ if ((keyCode > FL_F) && (keyCode <= FL_F_Last))
+ return XK_F1 + (keyCode - FL_F - 1);
// Numpad numbers
if ((keyCode >= (FL_KP + '0')) && (keyCode <= (FL_KP + '9')))