diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2024-09-10 12:14:56 +0200 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2024-10-06 18:44:31 +0200 |
| commit | 3fbd4f944f0a6e16630974e56e1e896eb7bbf6f7 (patch) | |
| tree | 4e473be58c753989421883900c2788d465b21a7b | |
| parent | 0594d9a1a0cbac7347b09e2ef3645630f36da440 (diff) | |
Apply `scaling-shortcut-kludge.patch` for Windows
... as proposed by Manolo in a private mail.
This patch allows to detect "ctrl+'-' on keyboards with digits in
uppercase positions (e.g. French)" but this is only preliminary for
FLTK 1.4.0.
Windows keyboard handling should be revised in FLTK 1.5.0 or higher.
| -rw-r--r-- | src/Fl_win32.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx index 45474fd0f..36e77a99b 100644 --- a/src/Fl_win32.cxx +++ b/src/Fl_win32.cxx @@ -1,7 +1,7 @@ // // Windows-specific code for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2023 by Bill Spitzak and others. +// Copyright 1998-2024 by Bill Spitzak and others. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this @@ -1157,6 +1157,7 @@ static const struct { {0xdc, '\\'}, {0xdd, ']'}, {0xde, '\''}, + {VK_OEM_PLUS, '+'}, {VK_OEM_102, FL_Iso_Key} }; static int ms2fltk(WPARAM vk, int extended) { @@ -1439,6 +1440,10 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar case WM_SYSKEYUP: // save the keysym until we figure out the characters: Fl::e_keysym = Fl::e_original_keysym = ms2fltk(wParam, lParam & (1 << 24)); + // Kludge to allow recognizing ctrl+'-' on keyboards with digits in uppercase positions (e.g. French) + if (Fl::e_keysym == '6' && (VkKeyScanA('-') & 0xff) == '6') { + Fl::e_keysym = '-'; + } // See if TranslateMessage turned it into a WM_*CHAR message: if (PeekMessageW(&fl_msg, hWnd, WM_CHAR, WM_SYSDEADCHAR, PM_REMOVE)) { uMsg = fl_msg.message; |
