aboutsummaryrefslogtreecommitdiff
path: root/marsond.rst
diff options
context:
space:
mode:
Diffstat (limited to 'marsond.rst')
-rw-r--r--marsond.rst41
1 files changed, 28 insertions, 13 deletions
diff --git a/marsond.rst b/marsond.rst
index ad41577..accc03f 100644
--- a/marsond.rst
+++ b/marsond.rst
@@ -6,9 +6,9 @@
marsond
=======
-----------------------------------------------------------------
-Fix Enter key timing on Marson/USBLink/MT606-1 PS/2-USB adaptors
-----------------------------------------------------------------
+-----------------------------------------------------------------------
+Fix Enter/Shift key timings on Marson/USBLink/MT606-1 PS/2-USB adaptors
+-----------------------------------------------------------------------
:Manual section: 8
:Manual group: Urchlay's Stuff
@@ -30,9 +30,10 @@ keyboard adaptor. The symptoms:
caused by the firmware in the adaptor sending the keypress and release
events only 8 milliseconds apart.
-- In normal use, pressing and releasing the right Shift key and Enter
+- In normal use, pressing either Shift key and Enter
key simultaneously causes the shift key to get "stuck" and act like
- it's still being held down.
+ it's still being held down. You have to press and release Shift again
+ to get it to "unstick".
See the **NOTES** section for full details.
@@ -51,8 +52,10 @@ 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.
- Minimum 1, default 30 (unless changed at compile time; see **--help**).
+ Amount of time in milliseconds to delay the Enter key release
+ events. Also, the Shift key threshold is this times 4, unless set
+ with the **-s** option. Minimum 1, default 30 (unless changed at
+ compile time; see **--help**).
.. delay time for Enter key release.
@@ -79,6 +82,14 @@ Options can be "bundled": **-vf** is the same as **-v** **-f**.
.. pause before opening keyboard/uinput devs (default 0).
+-s thresh-ms
+ Threshold for Shift key. If Enter is pressed within **thresh-ms** of
+ either Shift key, a Shift key release will be sent before the Enter
+ keypress. This avoids the "stuck shift key" problem. Default is
+ 120, or 4 times the **-d** delay if set.
+
+.. threshold in ms for shift key followed by enter (default 30 or -d * 3).
+
-v
Verbose debugging mode. Prints copious trace information to **stderr**.
Debugging mode is turned off when **marsond** forks itself into the
@@ -120,11 +131,13 @@ The Enter key dropped keystroke 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.
+is running. The firmware in the adaptor sends an Enter keypress, then
+8 microseconds later sends an Enter key release. There is no way to
+change this.
The problem where Shift/Enter causes the Shift key to act "stuck"
happens in any application. It's particularly annoying because I'm an
-inaccurate typist, and I hit Shift+Enter about 5% of the time when I'm
+inaccurate typist, and I hit right Shift+Enter about 5% of the time when I'm
just trying to press Enter.
The specific hardware that has the problems for me is USB
@@ -163,10 +176,12 @@ the real keyboard to the virtual one. When it sees the key release
event for the Enter key, it simply pauses for a few milliseconds
before delivering it.
-It also keeps track of whether the last keypress was the right Shift
-key, and when it sees an Enter keypress while right Shift is held
-down, it sends a right Shift key release event before the Enter press
-event.
+It also keeps track of the last timestamp of the left and right Shift
+keys, and if Enter is pressed too soon after Shift, it sends a key
+release for the Shift key(s). It's still possible to type Shift+Enter
+on purpose, but there must be a delay (default 120ms) between the two
+keypresses. Most people, even fast typists, won't press them that
+close together.
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,