[Linux] Azerty keyboard problem (workaround found !)

Discussion in 'Mac and Linux' started by dukyduke, May 17, 2016.

  1. dukyduke

    dukyduke Active Member

    Messages:
    167
    Likes Received:
    40
    Hi

    I still have this very old bug :
    https://forums.uberent.com/threads/question-for-linux-users.68150/#post-1074368

    As a quick remind some keys are not working on Linux with azerty keyboard.
    This means you can't use them in keybinding but also for login/password when you log in game (the launcher does not have this bug).

    In fact the keys seems to act like another keys :
    [​IMG]

    PA uses libSDL for key inputs and all the not working keys are part of the "virtual" keys with a keycode but with no corresponding physical key (scancode), as it is explain here :
    https://wiki.libsdl.org/SDL_Keycode

    Also '*' asterix key or ')' right parenthesis azerty key works fine (and normally are keycode only too).

    May be, it might help a little too:

    • When I stroke the '²' key, it's working fine but I've the following warning in log:
    • When I stroke the '&/1' key, it's not working and I have no warning log.
    • When I stroke the 'é/2', it's working fine but I've the following warning in log:
    • When I stroke the '"/3', it's working and I have no warning.
    (This are the 4 keys at the top right)

    If on Linux I change the key mapping to qwerty, the bug is still here.

    The output of my localectl command:
    Nota: I've change the model for logitech_base in my tests but initially it was "generic_pc105" with the same problem.

    I'll try by forcing different layout...


    Anyone else still have the bug or solved it ?
  2. dukyduke

    dukyduke Active Member

    Messages:
    167
    Likes Received:
    40
    Tried with a dfferent keyboard config:
    Not working too, the bug is still here.

    Can a qwerty linux keyboard user, send me the output of his "localectl" command ?
    Thank you....
  3. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,328
    Likes Received:
    2,125
    Sure:
    Code:
       System Locale: LANG=en_CA.UTF-8
                      LANGUAGE=en_CA:en
           VC Keymap: n/a
          X11 Layout: us
           X11 Model: pc105
         X11 Variant: altgr-intl
    
    dukyduke likes this.
  4. dukyduke

    dukyduke Active Member

    Messages:
    167
    Likes Received:
    40
    In fact, localectl has not impact on X settings...

    The use of command "setxkbmap" do the trick instead.

    So:
    "setxkbmap us" => all keys works (but in qwerty)
    "setxkbmap fr" => I'm in azerty but the bug is back :(
    "setxkbmap fr,us" => I can be either in azerty or qwerty but both configuration aren't working
    "setxkbmap us,fr" => I can be either in qwerty or azerty and both configuration works fine !!!!!
    DeathByDenim likes this.
  5. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,328
    Likes Received:
    2,125
    Weird..., but nice find!
  6. dukyduke

    dukyduke Active Member

    Messages:
    167
    Likes Received:
    40
    Sadly, the "workaround" has some drawbacks :
    - the primary configuration is loaded as default at start, so I need to switch back to azerty at every startup (may be I can automate that)
    - it works because it's always qwerty keycode and not azerty, it means when I switch to azerty configuration the keyboard mapping are unchanged.It's just interpreted differently. In PA, it means that when I hit "a" in the login field it displays "a", but my mapping configured with "a" keycode are now mapped to "q" keycode.

    For the second points, I can change my short-cuts to be OK with the "qwerty interpreted in azerty" configuration but it'll probably means that when I'll switch to windows (very rarely but it happens) my shortcuts will be in qwerty...

    So for the moment, I give up...

    May be one day, a developer will take in pity the 5% french users of the 1% linux users... ^^

    PS: with the workaround the warning message "INFO no keycode mapping for SDL_Keycode xxx" has completly disappeared
  7. n00n

    n00n Active Member

    Messages:
    345
    Likes Received:
    210
  8. dukyduke

    dukyduke Active Member

    Messages:
    167
    Likes Received:
    40
    I forgot to mention it here but the steam version of the game use a more recent version of LIB_SDL which solve the problem.
    DeathByDenim likes this.

Share This Page