dolphin/Source
Jeffrey Bosboom c6f9e61d38 XInput2: Accept input from keyboards other than the first master
XInput2 was created to support multiple pointer/keyboard pairs (often
called MPX for multi-pointer X).  Dolphin's XInput2 implementation has
always supported MPX by creating a KeyboardMouse object per master
pointer.  Since commit bbb12a7, Dolphin's keyboard state is filtered by
the output of XQueryKeymap.  As a core X function, XQueryKeymap queries
"the" keyboard, which by default is the first master keyboard.  As a
result, Dolphin will ignore keys pressed on other master keyboards
unless the first master is simultaneously pressing the same keys.

XInput2 doesn't provide a function to query the keyboard state.  There
is no XIQueryKeymap and the current state is not a member of the
XIKeyClassInfo returned by XIQueryDevice.  Instead, XInput2 allows a
master pointer to be nominated as "the" pointer on a per-client basis,
with "the" keyboard automatically becoming the associated master
keyboard.  The "documentation" [1] says passing None for the window is
only for debugging purposes, but it is documented in the
XISetClientPointer man page and seems to be the only way to query
keyboards beyond the first.

With this commit, Dolphin correctly reads keys from keyboards other than
the first master keyboard.  To test, use the xinput command-line utility
to create a master pointer and reattach a keyboard to the associated
master keyboard.

[1]: https://who-t.blogspot.com/2009/07/xi2-recipes-part-6.html
     (the XInput2 developer's blog)
2023-04-13 20:10:00 -07:00
..
Android Merge pull request #11689 from K0bin/android-open-user-folder 2023-03-29 10:53:48 -07:00
Core XInput2: Accept input from keyboards other than the first master 2023-04-13 20:10:00 -07:00
DSPSpy
DSPTool Use GNUInstallDirs for installation paths 2023-01-30 09:44:44 -06:00
PCH msvc: bump required version to align with vs 17.5 2023-03-04 14:18:18 -08:00
UnitTests PowerPC: Refactor to class, move to System. 2023-04-09 21:48:37 +02:00
VSProps Added USE_RETRO_ACHIEVEMENTS compiler flag 2023-04-02 08:28:25 -04:00
.clang-format
CMakeLists.txt
dolphin-emu.sln Added rcheevos to Externals 2023-04-02 08:28:23 -04:00