From 336bd01f16b978dfe377524867b4a44f6240acff Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Wed, 16 Aug 2023 12:35:50 +0200 Subject: X11 platform: give number keys layout-independent keysym's Without this, the sudoku app is unusable with a French keyboard --- src/Fl_x.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) 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 -- cgit v1.2.3