View Single Post
Old 25 May 2012, 21:18   #81
FrodeSolheim
FS-UAE Developer
 
FrodeSolheim's Avatar
 
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
Quote:
Originally Posted by Psicopatico View Post
Done. New logfile is attached.

Looks like the emulator doesn't get a single time a "DOWN" key event from SDL.
Even more, every expected "DOWN" gets mis-matched as a "KP_ENTER" (numeric keypad enter).
Yes, the log file was very revealing. Short (well, at least not *that* long) story:
- FS-UAE uses "scancodes" instead of keysyms to allow for positional mapping independent of chosen keyboard layout ("Scancodes" do not necessarily correspond to actual keyboard scancodes, but are called scancodes in the SDL api)
- Your keyboard does not generate the "scancodes" FS-UAE expects.
- Down is mapped to FS_ML_KEY_KP_ENTER because your down key has scancode 104 but FS-UAE expects 104 to be KP_Enter..
- Left, Up and Right accidentally works because the "scancodes" does not match anything FS-UAE expects, and in this case, keysym value reported by SDL is used as the key code (and SDLK_UP has the same value has FS_ML_KEY_UP, etc).

In earlier versions, when FS-UAE used keysyms (translated key codes) and not scancodes, the cursor keys would work properly for you. But the reason for using scancodes was to get the emulated Amiga working properly with international keys and workbench keymaps etc.

These are the scancodes FS-UAE expects for cursor keys on Linux:
Code:
    g_key_map[111] = FS_ML_KEY_UP;
    g_key_map[113] = FS_ML_KEY_LEFT;
    g_key_map[116] = FS_ML_KEY_DOWN;
    g_key_map[114] = FS_ML_KEY_RIGHT;
It should be noted that the assumption in FS-UAE that most people on Linux have these scancodes for cursor keys may not be valid, I just hoped it was . But still, do you have a non-standard keyboard, or otherwise a non-standard X keyboard setup?

Last edited by FrodeSolheim; 26 May 2012 at 00:46.
FrodeSolheim is offline  
 
Page generated in 0.04734 seconds with 11 queries