Hello, I am using X.Org X Server 1.12.1 with the Xdummy wrapper script, and XTest to inject key events (this is as part of Xpra, a remote desktop project). My keyboard layout is -layout fr -variant dvorak, and it uses a dead key on 8. Using a real keyboard, pressing "dead key" + i yields ì and "dead key" + e yields è. When using Xtest, ì works, but è appears as e. Those are the relevant key bindings: arthur@Gurney:~$ xmodmap -pke | egrep ' (17|31|93) ' keycode 17 = ISO_Level3_Latch 8 ISO_Level3_Latch 8 grave keycode 31 = i I i I igrave Igrave keycode 93 = e E e E egrave Egrave If I do (pseudo code): xtest_fake_key(17, press) xtest_fake_key(17, release) xtest_fake_key(31, press) xtest_fake_key(31, release) I get ì. If I do: xtest_fake_key(17, press) xtest_fake_key(17, release) xtest_fake_key(93, press) xtest_fake_key(93, release) I get e instead of è. xtest_fake_key() is a trivial wrapper for XTestFakeKeyEvent(). Keycodes that "work" with dead key: 24 26 31 32 38 39 60 Keycodes that do not work (produce keysym as it it wasn't modified): 30 42 48 57 93 Help appreciated. Thanks
Update: in the 8 calls to XTestFakeKeyEvent I've represented, it returns 1. So there seems to be no error returned from XTest.
(In reply to comment #1) > Update: in the 8 calls to XTestFakeKeyEvent I've represented, it returns 1. So > there seems to be no error returned from XTest. heh, XTestFakeKeyEvent() is hardcoded to return 1, getting it to return anything else would be an achievement :) how are you applying the keyboard layout? just running setxkbmap, I get egrave correctly through xtest, but on keycode 41 (see below) (In reply to comment #0) > arthur@Gurney:~$ xmodmap -pke | egrep ' (17|31|93) ' > keycode 17 = ISO_Level3_Latch 8 ISO_Level3_Latch 8 grave > keycode 31 = i I i I igrave Igrave > keycode 93 = e E e E egrave Egrave what kind of keyboard is this? my e in fr(dvorak) is on 41 and that's where it works - where is 93?
This is not a real keyboard, but the "keyboard" as configured by Xdummy. The actual keyboard layout is applied with calls to XChangeKeyboardMapping. Section "InputDevice" Identifier "NoKeyboard" Option "CoreKeyboard" "true" Driver "void" EndSection Then, the commands that are run are the following: $ setxkbmap -print xkb_keymap { xkb_keycodes { include "xfree86+aliases(qwerty)" }; xkb_types { include "complete" }; xkb_compat { include "complete" }; xkb_symbols { include "pc+us+inet(pc105)" }; xkb_geometry { include "pc(pc105)" }; }; $ setxkbmap -rules evdev -model evdev -layout fr $ setxkbmap -print xkb_keymap { xkb_keycodes { include "evdev+aliases(qwerty)" }; xkb_types { include "complete" }; xkb_compat { include "complete" }; xkb_symbols { include "pc+us+inet(evdev)" }; xkb_geometry { include "pc(pc105)" }; }; $ echo 'xkb_keymap { xkb_keycodes { include "evdev+aliases(azerty)" }; xkb_types { include "complete" }; xkb_compat { include "complete" }; xkb_symbols { include "pc+fr(dvorak)+inet(evdev)" }; xkb_geometry { include "pc(pc104)" }; };' | xkbcomp - :2 And then XChangeKeyboardMapping() calls (only the relevant ones): keycode 17 keysyms 65028L, 56L, 65028L, 56L, 96L]), keycode 31 keysyms [105L, 73L, 105L, 73L, 236L, 204L]), keycode 93 keysyms [101L, 69L, 101L, 69L, 232L, 200L]), So - is there anything fundamentally incorrect with calling XChangeKeyboardMapping that way? I'm struggling to understand why X seems to ignore ISO_Level3 for my keycode 93. Thanks
please attach the full map from xkbcomp -xkb :0. It could be key type issues here
Created attachment 63057 [details] xkbcomp -xkb output Output attached.
Looking at the keymap there, there isn't actually anything assigned to 93 at all. Is this actually the same keymap?
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/xserver/issues/284.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.