Forum / NoMachine for Linux / Keyboard layout completely wrong
Tagged: keyboard
- This topic has 5 replies, 2 voices, and was last updated 4 years, 7 months ago by graywolf.
-
AuthorPosts
-
April 1, 2020 at 17:52 #26437jotauveParticipant
Same issue as https://forums.nomachine.com/topic/completely-wrong-keyboard-mapping
Wrong keyboard layout: Qwerty translates into 789-=[
Server is Ubuntu 16.04, client is MacOs Catalina, recently installed latest release on both machines.
Any suggestions on how to get the correct keyboard layout?
Thanks!
April 2, 2020 at 10:41 #26457graywolfParticipantWould you test the keys Q,W,E in the remote session with the xev tool (keyboard is not working but you could copy and paste the command included the newline):
xev -event keyboard
April 2, 2020 at 16:00 #26459jotauveParticipantThis is what I saw in the terminal:
KeyPress event, serial 22, synthetic NO, window 0x6800001,
root 0x25, subw 0x0, time 978758157, (92,3), root:(643,342),
state 0x0, keycode 24 (keysym 0x37, 7), same_screen YES,
XLookupString gives 1 bytes: (37) “7”
XmbLookupString gives 1 bytes: (37) “7”
XFilterEvent returns: False
KeyRelease event, serial 22, synthetic NO, window 0x6800001,
root 0x25, subw 0x0, time 978758269, (92,3), root:(643,342),
state 0x0, keycode 24 (keysym 0x37, 7), same_screen YES,
XLookupString gives 1 bytes: (37) “7”
XFilterEvent returns: False
KeyPress event, serial 22, synthetic NO, window 0x6800001,
root 0x25, subw 0x0, time 978758435, (92,3), root:(643,342),
state 0x0, keycode 25 (keysym 0x38, 8), same_screen YES,
XLookupString gives 1 bytes: (38) “8”
XmbLookupString gives 1 bytes: (38) “8”
XFilterEvent returns: False
KeyRelease event, serial 22, synthetic NO, window 0x6800001,
root 0x25, subw 0x0, time 978758527, (92,3), root:(643,342),
state 0x0, keycode 25 (keysym 0x38, 8), same_screen YES,
XLookupString gives 1 bytes: (38) “8”
XFilterEvent returns: False
KeyPress event, serial 22, synthetic NO, window 0x6800001,
root 0x25, subw 0x0, time 978758699, (92,3), root:(643,342),
state 0x0, keycode 26 (keysym 0x39, 9), same_screen YES,
XLookupString gives 1 bytes: (39) “9”
XmbLookupString gives 1 bytes: (39) “9”
XFilterEvent returns: False
KeyRelease event, serial 22, synthetic NO, window 0x6800001,
root 0x25, subw 0x0, time 978758795, (92,3), root:(643,342),
state 0x0, keycode 26 (keysym 0x39, 9), same_screen YES,
XLookupString gives 1 bytes: (39) “9”
XFilterEvent returns: False
April 3, 2020 at 17:42 #26509graywolfParticipantI don’t know how a such keymap is loaded in the Ubuntu server. Would you run a few other commands in the remote session, in the same way:
xmodmap -pke > xmodmap.txt
xkbcomp -xkb $DISPLAY - > xkbcomp.txt
xprop -root | grep XKB > xprop.txt
setxkbmap -print > setxkbmap.txt
April 6, 2020 at 09:39 #26535jotauveParticipantAttached are the output files.
Something I think might be important: When connecting to the server, I have 2 possible displays:
– a physical display, where everything works OK but the interaction is slow.– a virtual display, which is created by running a TightVNC server also on the host. Here is where the keyboard is not working properly. When I connect to that display using VNC, it does work. For 2 of the commands I got an error saying that the Display :1 didn’t have the requested extension (or similar message). I cannot reproduce because the client doesn’t allow me always to select this display (it happens occasionally that I can select this display).
Thank you for your help.
Attachments:
April 6, 2020 at 18:40 #26568graywolfParticipantNow it’s clear. X display launched by TightVNC has its own keyboard map. Moreover, it lacks the KEYBOARD extension (XKB), so setxkbmap and xkbcomp cannot work.
If you change that keymap you could make it compatible with NoMachine, but likely you’ll mess up the keyboard for VNC client.
If you want to go on anyway, you have to use xmodmap to edit the map, as XKB is not available.
You could gather a more usual keymap from a different X display (non VNC):
xmodmap -pke > xmodmap_ok.txt
then connect through NoMachine to the VNC X display and load the map with the command:
xmodmap xmodmap_ok.txt
-
AuthorPosts
This topic was marked as solved, you can't post.