From 70f32469fbf2310a8321e90ff270c84cd1720680 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Thu, 10 Mar 2011 11:57:03 +0000 Subject: [PATCH] Off-by-one error. FL_F points to "F0", not F1. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4357 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- vncviewer/DesktopWindow.cxx | 4 ++-- 1 file 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'))) -- 2.39.5