Swapped keyboard keys not always recognized
Bug #1618557 reported by
Steven De Herdt
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
widelands |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Minor inconvenience: I have my left ctrl and caps_lock switched, but the current dev version doesn't recognize that when deleting roads or presetting locations. When I got the clue that I have to press the real ctrl for that, I was a bit surprised that text input does honour my peculiar caps_lock key location.
I would guess that it works like this since SDL2 - no more than a guess though. Can WL (reasonably) be made to follow my keyboard settings like it used to?
Related branches
lp:~widelands-dev/widelands/bug-1618557-keycode
- GunChleoc: Approve
-
Diff: 229 lines (+24/-30)11 files modifiedsrc/editor/editorinteractive.cc (+6/-4)
src/editor/ui_menus/categorized_item_selection_menu.h (+1/-1)
src/editor/ui_menus/tool_place_bob_options_menu.cc (+1/-1)
src/ui_basic/window.cc (+1/-3)
src/wui/actionconfirm.cc (+1/-2)
src/wui/buildingwindow.cc (+3/-3)
src/wui/fieldaction.cc (+5/-7)
src/wui/game_options_menu.cc (+1/-1)
src/wui/interactive_base.cc (+2/-3)
src/wui/quicknavigation.cc (+1/-3)
src/wui/shipwindow.cc (+2/-2)
Changed in widelands: | |
milestone: | none → build20-rc1 |
Changed in widelands: | |
status: | Triaged → Fix Committed |
To post a comment you must log in.
We went for the physical key in some cases:
if (get_key_ state(SDL_ SCANCODE_ LCTRL) || get_key_ state(SDL_ SCANCODE_ RCTRL))
and for the semantic key in others:
if (code.mod & (KMOD_LCTRL | KMOD_RCTRL))
I agree that the behavior needs to be consistent, and I vote for the second option.