Re: [hatari-devel] alt-gr not recognized anymore with sdl2 |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
Le 26/01/2016 20:49, David Savinkoff a écrit :
----- Nicolas Pomarède wrote:
Le 18/01/2016 20:53, Thomas Huth a écrit :
On 17.01.2016 18:40, Nicolas Pomarède wrote:
Hello
it seems some of the recent changes broke alt-gr key under linux, when I
use it I now get :
Warning: Unhandled scancode 0xe6!
so I'm unable to use shortcut + modifier
It worked a few days ago with sdl2.
If I recompile with sdl1, alt-gr works again.
Sounds very strange, just like AltGr is not recognized as modifier but
only as a "normal" key instead. Did you change anything to your host
keyboard mapping? Does it work differntly when you change from scancode
mapping to symbolic mapping in the GUI? And what do you get when you run
Hatari with "--trace keymap" ?
Hi
changing from scancode to sympbolic doesn't solve the problem ; no
change were made too host mapping either (if I compile with SDL1,
everything works as before with the same config).
This is what --trace keymap gives :
press alt-gr :
key down: sym=1073741824 scan=230 mod=0x1000 name=''
Warning: Unhandled scancode 0xe6!
key map: sym=0x40000000 to ST-scan=0xff
release alt-gr :
key up: sym=1073741824 scan=230 mod=0x1000 name=''
Warning: Unhandled scancode 0xe6!
press F12 :
key down: sym=1073741893 scan=69 mod=0x1000 name='F12'
I have 2 linux PC with the same problem, but in both cases I had an
update to the recent sdl 2.0.4 from early january (before I had 2.0.3).
Maybe 2.0.4 broke sthg ? Can you try installing 2.0.4 to see if you get
the same problem ?
Nicolas
Hi,
Alt-gr works for this version of SDL2, thus is good up to this point:
SDL.9893 (SDL2 pre 2.04 from HG) Oct. 11 2015
Hi
this could be a problem on my PCs, but alt-gr still works with SDL1
version of Hatari. And if I use "xev" to see the reported codes, I get :
for right shift :
KeyPress event, serial 40, synthetic NO, window 0x3600001,
root 0x248, subw 0x3600002, time 44944509, (45,16), root:(1147,862),
state 0x10, keycode 62 (keysym 0xffe2, Shift_R), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
for alt gr :
KeyPress event, serial 40, synthetic NO, window 0x3600001,
root 0x248, subw 0x3600002, time 44955060, (45,16), root:(1147,862),
state 0x10, keycode 108 (keysym 0xfe03, ISO_Level3_Shift),
same_screen YES,
XKeysymToKeycode returns keycode: 92
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
So, I don't see any particular difference between these 2 keys at the
X11 level, alt-gr has proper codes.
But for some reasons, SDL2 reports alt-gr as 0x40000000 in Hatari, which
would mean scancode "0" according /usr/include/SDL2/SDL_keycode.h and
these macros used to defined all the keys in SDL2 :
#define SDLK_SCANCODE_MASK (1<<30)
#define SDL_SCANCODE_TO_KEYCODE(X) (X | SDLK_SCANCODE_MASK)
Maybe we need to look at SDL2 code to see why scancode 0xe6 (=230)
doesn't report 40000000|e6 as it's the case for other "special" keys
(shift, ctrl, ...)
Nicolas