diff options
Diffstat (limited to 'marsond.rst')
-rw-r--r-- | marsond.rst | 84 |
1 files changed, 66 insertions, 18 deletions
diff --git a/marsond.rst b/marsond.rst index 4dfee82..2df75bb 100644 --- a/marsond.rst +++ b/marsond.rst @@ -6,9 +6,9 @@ marsond ======= -------------------------------------------------- -Fix Enter key on Marson/USBLinux/MT606-1 adaptors -------------------------------------------------- +----------------------------------------------------------------- +Fix Enter key timing on Marson/USBLinux/MT606-1 PS/2-USB adaptors +----------------------------------------------------------------- :Manual section: 1 :Manual group: SlackBuilds.org @@ -18,19 +18,61 @@ Fix Enter key on Marson/USBLinux/MT606-1 adaptors SYNOPSIS ======== -marsond [**-d** *delay-ms**] [**-k** *keyboard-device*] [**-v**] | [**--help**] | [**--version**] | [**-V**] +marsond [**-d** *delay-ms**] [**-f**] [**-k** *keyboard-device*] [**-v**] | [**--help**] | [**--version**] | [**-V**] DESCRIPTION =========== +**marsond** fixes an issue with a particular model of PS/2 => USB +keyboard adaptor. The symptom: in games and emulators, the Enter key +only works sometimes. This is caused by the firmware in the adaptor +sending the keypress and release events only 8 milliseconds apart. + +The problem happens with any SDL application (SDL1 or SDL2), as well +as other graphics libraries. It happens regardless of what PS/2 +keyboard you have plugged in, what computer you have the adaptor +plugged into, or what OS that computer is running. + +The specific hardware that has the Enter key problem for me is USB +vendor ID 04b4, product ID 0101, "Marson Keyboard and Mouse Link +Ver:ps2120L". It has a label on the front that says "USBLink", and on +the back, the model number is "MT606-1". It looks like: + + https://slackware.uk/~urchlay/sdl-usblink-hack/marson-front.jpg + + https://slackware.uk/~urchlay/sdl-usblink-hack/marson-back.jpg + +I'm not sure if any other USB keyboard adaptors are affected. If you +have the problem on some other adaptor, and **marsond** fixes it, +please contact me so I can add the model number to this man page. + +**marsond** uses the Linux kernel's **uinput** layer to "grab" the +keyboard, create a new virtual keyboard device, and pass events from +the real keyboard to the virtual one. When it see the key release +event for the Enter key, it simply pauses for a few milliseconds +before delivering it. + +This should work with everything that uses the keyboard. It definitely +does, with SDL 1 and 2 running under X (and SDL 1 on the console, +too). I don't use Wayland, so I haven't tested it there. If you do, +please contact me and let me know if it works for you. + OPTIONS ======= +Options can be "bundled": **-vf** is the same as **-v** **-f**. + -d delay-ms Amount of time in milliseconds to delay the Enter key release events. Default: 30. - .. delay time for Enter key relase (default 30). +.. delay time for Enter key relase (default 30). + +-f + Run in the foreground; do not detach from the terminal or become a + daemon. In this mode, **marsond** can be killed with *^C*. + +.. run in foreground, not as a daemon. -k keyboard-device Input device for the keyboard adaptor. Default: @@ -39,8 +81,10 @@ OPTIONS .. keyboard device (usually under /dev/input/by-id/). -v - Verbose debugging mode. Prints copious trace information to **stderr**, and - does not run in the background. + Verbose debugging mode. Prints copious trace information to **stderr**. + Debugging mode is turned off when **marsond** forks itself into the + background as a daemon. If you want to debug the event loop, combine + **-v** and **-f**. .. verbose debugging, foreground operation. @@ -54,13 +98,15 @@ OPTIONS .. show version number. -.. other sections we might want, uncomment as needed. +ENVIRONMENT +=========== -.. FILES -.. ===== +MARSOND_USER + After initialization, **marsond** will drop privileges by + setting its user ID to this user's. Default: *nobody* -.. ENVIRONMENT -.. =========== +MARSOND_GROUP + Group to run as, after dropping privileges. Default: *nogroup* .. EXIT STATUS .. =========== @@ -74,17 +120,19 @@ OPTIONS COPYRIGHT ========= -See the file /usr/doc/PRGNAM-|version|/COPYING for license information. +WTFPL. Short version: do WTF you want. Full version: + + http://www.wtfpl.net/txt/copying/ AUTHORS ======= -PRGNAM was written by WHOEVER. - -This man page written for the SlackBuilds.org project -by B. Watson, and is licensed under the WTFPL. +B. Watson <urchlay@slackware.uk> SEE ALSO ======== -The PRGNAM homepage: http://www.PRGNAM.org/ +The homepage: https://slackware.uk/~urchlay/repos/marsond + +Another solution to the problem, less complete, but should be portable +to non-Linux OSes: https://slackware.uk/~urchlay/sdl-usblink-hack/ |