diff options
author | Arisotura <thetotalworm@gmail.com> | 2019-07-09 18:41:44 +0200 |
---|---|---|
committer | Arisotura <thetotalworm@gmail.com> | 2019-07-09 18:41:44 +0200 |
commit | 504ccb70442d4ec4fb7118fc4219ae81a290c56c (patch) | |
tree | 7c491793079022a51d1cd90d338cac69e1f52ba7 /src/libui_sdl | |
parent | 592e493a7aae701957d1a5c05ef8d31c5187ed8c (diff) |
don't allow modifier mappings in input config dialog, either
Diffstat (limited to 'src/libui_sdl')
-rw-r--r-- | src/libui_sdl/DlgInputConfig.cpp | 4 |
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]; |