summaryrefslogtreecommitdiff
path: root/src/drivers/WinAPI
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2024-11-12 09:08:42 +0100
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2024-11-12 09:09:10 +0100
commit0d4c8c8534e1e9ad24c29642f763b37e233112fa (patch)
treee34c43f2458ef74d22d3c113049f79e070740446 /src/drivers/WinAPI
parentdc2c53333cf598d3b7fd5d183da671671dff2896 (diff)
Fix Keyboard shortcut (alt + letter) does not work in input widget-Windows (#1122)
Diffstat (limited to 'src/drivers/WinAPI')
-rw-r--r--src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx b/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx
index e59027c77..a3a7ccf47 100644
--- a/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx
+++ b/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx
@@ -332,10 +332,11 @@ void Fl_WinAPI_Screen_Driver::get_system_colors()
int Fl_WinAPI_Screen_Driver::compose(int &del) {
unsigned char ascii = (unsigned char)Fl::e_text[0];
- /* WARNING: The [AltGr] key on international keyboards falsely set FL_CTRL! */
- /* More investigation needed. */
- int condition = (Fl::e_state & (FL_ALT | FL_META | FL_CTRL)) &&
- !(GetAsyncKeyState(VK_MENU) >> 15) && !(ascii & 128);
+ /* WARNING: The [AltGr] key on international keyboards sets FL_CTRL.
+ 2nd line in condition below asks [AltGr] key (a.k.a. VK_RMENU) not to be down.
+ */
+ int condition = (Fl::e_state & (FL_ALT | FL_META | FL_CTRL)) && !(ascii & 128) &&
+ !( (Fl::e_state & FL_CTRL) && (GetAsyncKeyState(VK_RMENU) >> 15) );
if (condition) { // this stuff is to be treated as a function key
del = 0;
return 0;