summaryrefslogtreecommitdiff
path: root/src/Fl_x.cxx
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2023-08-16 12:35:50 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2023-08-16 12:35:50 +0200
commit336bd01f16b978dfe377524867b4a44f6240acff (patch)
tree6df049c8f063a3ad66125572fce89ae95894923e /src/Fl_x.cxx
parent754340e1017affb7a3759d0ae95c83be7e2dcfb6 (diff)
X11 platform: give number keys layout-independent keysym's
Without this, the sudoku app is unusable with a French keyboard
Diffstat (limited to 'src/Fl_x.cxx')
-rw-r--r--src/Fl_x.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx
index f679375d5..1dffa6e1c 100644
--- a/src/Fl_x.cxx
+++ b/src/Fl_x.cxx
@@ -1870,6 +1870,15 @@ int fl_handle(const XEvent& thisevent)
keysym = FL_Favorites;
break;
}
+
+ // Special processing for number keys == keycodes 10-19
+ // necessary to support keyboard layouts with digits in uppercase :
+ if (keycode >= 10 && keycode <= 18) {
+ keysym = '1' + (keycode - 10);
+ } else if (keycode == 19) {
+ keysym = '0';
+ }
+
// We have to get rid of the XK_KP_function keys, because they are
// not produced on Windoze and thus case statements tend not to check
// for them. There are 15 of these in the range 0xff91 ... 0xff9f