Bug 6309 - Aphabetic keys don't work with SDL2 on Linux
Status: RESOLVED WORKSFORME
Alias: None
Product: ioquake3
Classification: Unclassified
Component: Misc
Version: GIT MASTER
Hardware: PC Linux
: P3 normal
Assignee: Zachary J. Slater
QA Contact: ioquake3 bugzilla mailing list
URL:
Depends on:
Blocks:
 
Reported: 2014-08-29 13:12 EDT by Andrey Vihrov
Modified: 2014-08-29 13:34:46 EDT
0 users

See Also:



Description Andrey Vihrov 2014-08-29 13:12:12 EDT
Since the upgrade to SDL2 I am unable to use alphabetic keys in the client. Other keys seem to work, and I can type text just fine if I pull down the console.

I use current ioquake3 git on 64-bit Arch Linux with all features enabled and USE_INTERNAL_LIBS=0. My library versions are:

core/curl 7.37.1-1
extra/freetype2 2.5.3-2
extra/libjpeg-turbo 1.3.1-1
extra/libvorbis 1.3.4-1
extra/openal 1.16.0-1
extra/opus 1.1-1
community/opusfile 0.5-1
extra/sdl2 2.0.3-1
extra/speex 1.2rc1-4
core/zlib 1.2.8-3

I think that with SDL1 it was also somewhat weird. The alphabetic keys often registered as WORLD_NN instead of the usual q, w, r, ...

There is nothing suspicious in the console log. About SDL it only says

    SDL using driver "x11"

I suppose this looks like an SDL bug, but how does typing in the console work then?
Comment 1 Andrey Vihrov 2014-08-29 13:15:21 EDT
P.S. The keyboard is just a standard Dell laptop keyboard. If I run `xev` and type some keys, then they register normally as alphabetic symbols.
Comment 2 Zachary J. Slater 2014-08-29 13:24:36 EDT
It turned out that you need to use a standard keyboard layout.
Comment 3 Andrey Vihrov 2014-08-29 13:34:46 EDT
With the help of #ioquake3 at FreeNode I narrowed it down to this:

If only some Latin keyboard layout is present, then the game works. If a Cyrillic keyboard layout is also present (but not activated), then it doesn't work anymore even with the Latin layout. Test it with

    setxkbmap -layout 'us'

and

    setxkbmap -layout 'us,ru'
    
So this is probably an SDL bug.