Keyboard layout completely wrong

Forum / NoMachine for Linux / Keyboard layout completely wrong

Tagged: 

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #26437
    jotauve
    Participant

    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!

    #26457
    graywolf
    Participant

    Would 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

    #26459
    jotauve
    Participant

    This 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

     

    #26509
    graywolf
    Participant

    I 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

    #26535
    jotauve
    Participant

    Attached 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:
    #26568
    graywolf
    Participant

    Now 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

     

Viewing 6 posts - 1 through 6 (of 6 total)

This topic was marked as solved, you can't post.