This adds a new Input tab to winecfg, moving the mouse grab settings there. Then this makes winex11 keyboard layout detection configurable as well, allowing the user to override the keyboard layout detection if for some reason it was incorrect.
This isn't solving anything yet, but I then intend to make keyboard scancode detection configurable as well, and optional.
As I described in https://www.winehq.org/pipermail/wine-devel/2020-October/175641.html, I believe that X11 keyboard keycode to scancode mapping is most of the time a fixed mapping, except in some rare cases.
Trying to detect it from the keyboard layout will never work reliably, especially nowadays where keyboard layouts are completely made up from Linux IME (for instance a GNOME language settings with up to four keyboard layouts translates to a single Xkb mapping using groups for each layout). The X11 keycode are remapped only in some more rarely used implementations, such as XVNC and we should try to detect it only in such cases.
Many Windows applications are depending on accurate scancodes, and making the mapping detection optional (and disabled by default) will solve all the issues we have in the most common case (https://bugs.winehq.org/show_bug.cgi?id=30984, https://bugs.winehq.org/show_bug.cgi?id=45605).