Closed dreirund closed 3 years ago
I'm not able to reproduce it on GNOME:
I think this is most likely related to your keyboard configuration. On an ANSI keyboard (USA) "+" and "=" are in the same key. I tested it with an ISO keyboard (European version) and I wasn't able to reproduce the issue.
What kind of keyboard are you using?
Also with keyboards I have quite a custom configuration:
I have a laptop keyboard which has some keys at quite unusual position, and the key labeling is US layout. So I use US layout for that keyboard by default in the X server.
And then I have an USB keyboard, where I use Germen layout for by default.
See here for a photograph of the hardware.
And I have configured a few other layouts I can switch to.
More specifically, I have the following keyboard configuration in /etc/X11/xorg.conf.d/05-keyboard.conf
:
# See `man xkeyboard-config`
# Options for compose: `grep "compose:" /usr/share/X11/xkb/rules/base.lst`
## Default for some random keyboards
Section "InputClass"
Identifier "Generic keyboard"
MatchIsKeyboard "on"
Driver "libinput"
Option "XkbModel" "pc106"
Option "XkbLayout" "de,cz,ru,ua"
Option "XkbVariant" ",,phonetic,phonetic"
Option "XkbOptions" "grp:ctrls_toggle,terminate:ctrl_alt_bksp,nbsp:none,keypad:future,kpdl:dotoss,numpad:shift3,grab:break_actions,shift:both_capslock_cancel,eurosign:e,compose:caps"
EndSection
## Builtin keyboard on GPD MicroPC
Section "InputClass"
Identifier "GPD MicroPC keyboard"
MatchIsKeyboard "on"
MatchProduct "AT Translated Set 2 keyboard"
Driver "libinput"
Option "XkbRules" "evdev"
Option "XkbModel" "pc105"
Option "XkbLayout" "us,cz,ru,ua"
Option "XkbVariant" "altgr-intl,,phonetic,phonetic"
Option "XkbOptions" "grp:ctrls_toggle,terminate:ctrl_alt_bksp,nbsp:none,grab:break_actions,shift:both_capslock_cancel,compose:caps"
# ,eurosign:e"
EndSection
This configures the laptop keyboard ("AT Translated Set 2 keyboard
", the second section in the file) for us
layout per default, and all other keyboards for de
layout per default.
Does that make sense for you in understanding what happens?
xinput list
:
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ AMR-4630-XXX-0- 0-1023 USB KEYBOARD Mouse id=9 [slave pointer (2)]
⎜ ↳ USB Optical Mouse id=12 [slave pointer (2)]
⎜ ↳ Lite-On Tech IBM USB Travel Keyboard with Ultra Nav Mouse id=14 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Video Bus id=6 [slave keyboard (3)]
↳ Power Button id=7 [slave keyboard (3)]
↳ AMR-4630-XXX-0- 0-1023 USB KEYBOARD id=8 [slave keyboard (3)]
↳ AMR-4630-XXX-0- 0-1023 USB KEYBOARD System Control id=10 [slave keyboard (3)]
↳ AMR-4630-XXX-0- 0-1023 USB KEYBOARD Consumer Control id=11 [slave keyboard (3)]
↳ Lite-On Tech IBM USB Travel Keyboard with Ultra Nav id=13 [slave keyboard (3)]
↳ Lite-On Tech IBM USB Travel Keyboard with Ultra Nav System Control id=15 [slave keyboard (3)]
↳ Lite-On Tech IBM USB Travel Keyboard with Ultra Nav Consumer Control id=16 [slave keyboard (3)]
↳ Intel HID events id=17 [slave keyboard (3)]
↳ Intel HID 5 button array id=18 [slave keyboard (3)]
↳ AT Translated Set 2 keyboard id=19 [slave keyboard (3)]
Could it be that touchegg
does emit something like "keycodes" (e.g. some codes which are still subject to layout translation by the X server) to the Virtual core XTEST keyboard
, and that I should explicitly configure a layout for it? (Which one should I use, if that is the case?)
It looks like Touchégg is being mapped to the US layout.
You can double check it by running xev
and performing the pinch gesture to send a "+". In my case:
$ xev
KeyPress event, serial 37, synthetic NO, window 0x2a00001,
root 0x71a, subw 0x0, time 1713881, (102,97), root:(152,216),
state 0x0, keycode 35 (keysym 0x2b, plus), same_screen YES,
XLookupString gives 1 bytes: (2b) "+"
XmbLookupString gives 1 bytes: (2b) "+"
XFilterEvent returns: False
KeyRelease event, serial 37, synthetic NO, window 0x2a00001,
root 0x71a, subw 0x0, time 1713881, (102,97), root:(152,216),
state 0x0, keycode 35 (keysym 0x2b, plus), same_screen YES,
XLookupString gives 1 bytes: (2b) "+"
XFilterEvent returns: False
And also:
$ xmodmap -pk | grep plus
35 0x002b (plus) 0x002a (asterisk) 0x005d (bracketright) 0x007d (braceright) 0x005d (bracketright) 0xfe54 (dead_macron)
It is quite a custom configuration, so I can't tell you exactly what to change (you probably know better than me), but that's the expected output.
Closing the issue as this is a configuration problem, not an issue with Touchégg, but feel free to add more comments if you need help, and I'll try to help you.
How does Touchégg inject keys? Does it use Virtual core XTEST keyboard
?
Touchégg uses the XTest extension to inject keys, so yes, the used device should be XTEST keyboard.
Describe the bug
I have a gesture configured with the action to send key(s), and I have configured to send the "plus"-key:
touché
, I select:+
key and it prints "plus".touchegg.conf
then shows=
are inserted, not a+
.]
are inserted before the=
s. (When I setminus
, then it correctly prints-
s, but sometimes/
prepended.) Thes prepending happens only if I make the gesture after the window freshly became focus. Subsequent gestures in the same window without changing to a different window in between do not trigger this.]
and after releasing my fingers from the screen, it did continue to input]
indefinitely, until I performed the gesture again. This is hard to reproduce.Expected behaviour
Print
+
characters.Actual behaviour
Prints
=
characters, sometimes prepended by]
.Logs
touchegg --client --debug
:Your environment
issue-541
from 2021-10-25 (as mentioned here),.xinitrc
.