Emulator Issues #11563
openQt: Keyboard navigation of UI should be disabled in MappingWindow
0%
Description
In the mapping window, when attempting to map the keyboard to various controls, many problems occur from the keyboard trying to navigate the MappingWindow's UI. For example, on Windows at least, it's completely impossible to map the spacebar to a control without right clicking on the button and entering the advanced mapping window, because pressing space acts as a left click on the mapping button (simply selecting that control to be mapped). Enter, the arrow keys, and tab are some other keyboard buttons that cause problems.
I don't know if disabling keyboard navigation of the UI is possible, but hopefully so.
Updated by 8times9 almost 6 years ago
*I don’t know if disabling keyboard navigation of the UI is possible in Qt
Updated by taolas almost 6 years ago
This is done by installing an event filter. However, that has already been done for mapping with BlockUserInputFilter. The problem is the event filter is removed the moment the button is bound. What happens is:
Select a key to bind -> eventFilter blocks all input -> "I want to bind space" Hit spacebar -> spacebar becomes bound -> eventFilter is removed -> spacebar has been released -> execute shortcut = select focused widget -> Select a key to bind. And thus it appears space never got bound.
How to fix? In MappingButton.cpp you could put a constant eventFilter for keyboard press & release, just like BlockUserInputFilter does it.
Updated by 8times9 over 5 years ago
Mapping for space, enter, and mouse clicks were fixed in 5.0-10091 but there's still some weirdness with arrow keys and tab.
Updated by 8times9 over 5 years ago
If any controls are mapped to the arrow keys or tab, then pressing them to test out the mapping will cause the selection to move around between text boxes, other buttons, and checkboxes.
Example:
Let's say the d-pad is mapped to the arrow keys and enter is set to START (a common mapping scheme) on the GameCube mapping pane. If the user were to finish mapping any button (including d-pad or START) and then were to test the arrow keys, the blue selection box would be moved around to different buttons or dead zone/threshold text boxes. Then if they pressed enter to test START, that mapping button would now be selected for input and they will probably mess up their control scheme by pressing any other buttons. And if the arrow keys move to a dead zone or threshold text box by accident and the user were to press any numbers (admittedly somewhat edge-case but more probable if they're using a 10-key pad as the d-pad or something) then those values would get messed up.
I know that's a very long example, but at least for me it happens a lot more than you'd think.
Updated by Billiard26 over 5 years ago
- Status changed from Accepted to Questionable
Mouse clicks can do things too, but I don't think you want buttons unclickable. :P
Clicking on an empty part of the window before testing keys works around the problem.
It can be annoying for sure but I don't think we should just completely disable keyboard navigation in the entire window.