aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libui_sdl/DlgInputConfig.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libui_sdl/DlgInputConfig.cpp b/src/libui_sdl/DlgInputConfig.cpp
index 3818c04..a80e2ec 100644
--- a/src/libui_sdl/DlgInputConfig.cpp
+++ b/src/libui_sdl/DlgInputConfig.cpp
@@ -232,10 +232,12 @@ int OnAreaKeyEvent(uiAreaHandler* handler, uiArea* area, uiAreaKeyEvent* evt)
// set key.
if (evt->Scancode != 0x1 || evt->Modifiers != 0) // ESC
{
+ int mod = (dlg->type == 0) ? 0 : evt->Modifiers;
+
if (evt->Scancode == 0xE && evt->Modifiers == 0) // backspace
dlg->keymap[dlg->pollid] = -1;
else
- dlg->keymap[dlg->pollid] = evt->Scancode | (evt->Modifiers << 16);
+ dlg->keymap[dlg->pollid] = evt->Scancode | (mod << 16);
}
char keyname[64];