talonvoice / beta

Issue tracker for the private Talon Beta
10 stars 0 forks source link

Linux key input is not reliable when keyboard mapping needs to be changed #5

Closed ckamm closed 4 years ago

ckamm commented 4 years ago

The output for a command that should press "๐Ÿ˜€๐Ÿ˜‚๐Ÿ˜‡๐Ÿ˜๐Ÿ˜˜๐Ÿ˜š" is frequently wrong. Often one of the emojis is duplicated, replacing another.

Background: To simulate keypresses for keys that are not on the current keyboard mapping talon remaps a keycode to produce the desired keysym. Sometimes this seems to silently not go through.

One lead is that the keymap change does not seem to arrive in the keymap cache of the python-xlib layer. That may be because the talon code isn't watching for MappingNotify events and forwarding them to the correct function on the Display. That may not be the only issue though.

lunixbochs commented 4 years ago

Fixed in beta 884.

My test is inserting the longer emoji string "๐Ÿ˜€๐Ÿ˜‚๐Ÿ˜‡๐Ÿ˜๐Ÿ˜˜๐Ÿ˜š๐Ÿ˜Ž๐Ÿ‘๐Ÿ˜๐Ÿ‘Ž๐Ÿคฉ๐Ÿ‘‰๐Ÿ˜ก๐Ÿ™ƒ๐Ÿคจ๐Ÿ˜ณ๐Ÿ˜ฑ๐Ÿ‘พ"

Using a long remapped string is necessary to test as there is now a 10 key remap cache, so you need at least 10 consecutive remapped keys to stress the remapper.