Previous Thread
Next Thread
Print Thread
Mame + Apollo keyboard #117449 06/15/20 07:50 PM
Joined: Jun 2020
Posts: 2
W
Wawavoun Offline OP
Member
OP Offline
Member
W
Joined: Jun 2020
Posts: 2
Hello there,

Where can I find explanations of how keyboard is working under Mame...

I use azerty french keyboard and run Apollo dn3500 under Mame... This is a qwerty and only qwerty machine I think...

It is very unclear how I can improve key translations for a more handy usage...

In the input menu I assume that the left column show a physical qwerty layout and at right we get the possible translation...

But if I have a physical key marqued with "," and "?" when shifted ("m" in qwerty layout) should I indicate that "m" should be translated to "," ?
And how to say that shifted "m" should be translated to "?" ?

I have not find any very clear explanations about that in Mame doc.

Thanks for the help.
Regards.
Philippe

Re: Mame + Apollo keyboard [Re: Wawavoun] #117450 06/15/20 07:53 PM
Joined: Jun 2020
Posts: 2
W
Wawavoun Offline OP
Member
OP Offline
Member
W
Joined: Jun 2020
Posts: 2
I forgot :

Linux is my primary choice but the problem look same under Windows 10...
Natural option (result to no keyboard at all in the dn3500) and trying km_fr_LINUX.map did not help !

Re: Mame + Apollo keyboard [Re: Wawavoun] #117459 06/22/20 12:04 AM
Joined: Feb 2014
Posts: 383
G
Golden Child Online Content
Senior Member
Online Content
Senior Member
G
Joined: Feb 2014
Posts: 383
You might try to fashion your own custom keymap starting with the keymap/km_fr_LINUX.map :

There's a program called testkeys that gets built if you compile with make TOOLS=1 REGENIE=1.

If you run this and type keys on your keyboard it will tell you what SDL keycodes get generated. I think that even if you have a non-us keyboard, that the SDL keycodes will be based on US keyboards.

so try to run ./testkeys and see what responses your keyboard gives:

this is what my qwerty keyboard gives me:

ITEM_ID_XY SDL_SCANCODE_TAB
ITEM_ID_XY SDL_SCANCODE_TAB
ITEM_ID_XY SDL_SCANCODE_Q
ITEM_ID_XY SDL_SCANCODE_Q q
ITEM_ID_XY SDL_SCANCODE_W
ITEM_ID_XY SDL_SCANCODE_W w
ITEM_ID_XY SDL_SCANCODE_E
ITEM_ID_XY SDL_SCANCODE_E e
ITEM_ID_XY SDL_SCANCODE_R
ITEM_ID_XY SDL_SCANCODE_R r
ITEM_ID_XY SDL_SCANCODE_T
ITEM_ID_XY SDL_SCANCODE_T t

and you can specify -keymap -keymap_file keymaps/mykmap.map on the command line


My hacked version (just fiddling around so the keymap wouldn't give me errors), but it does generate A in place of Q.

Before I'd see all this:
Keymap: Error on line 11 - sdl key not found: ITEM_ID_TILDE SDL_SCANCODE_WORLD_18 ²
Keymap: Error on line 12 - sdl key not found: ITEM_ID_1 SDL_SCANCODE_AMPERSAND &
Keymap: Error on line 13 - sdl key not found: ITEM_ID_2 SDL_SCANCODE_WORLD_73 é
Keymap: Error on line 14 - sdl key not found: ITEM_ID_3 SDL_SCANCODE_QUOTEDBL "
Keymap: Error on line 15 - sdl key not found: ITEM_ID_4 SDL_SCANCODE_QUOTE '
Keymap: Error on line 16 - sdl key not found: ITEM_ID_5 SDL_SCANCODE_LEFTPAREN (
Keymap: Error on line 18 - sdl key not found: ITEM_ID_7 SDL_SCANCODE_WORLD_72 è
...

Code
[SDL2]
# MAME/MESS keymap for French AZERTY 105-keys keyboard (Linux)
#

#  hacked just to make it not generate errors  (I'm sure this isn't going to work properly)

# Row 1
#
ITEM_ID_TILDE      SDL_SCANCODE_GRAVE ²
ITEM_ID_1          SDL_SCANCODE_1  &
ITEM_ID_2          SDL_SCANCODE_2  é
ITEM_ID_3          SDL_SCANCODE_3  "
ITEM_ID_4          SDL_SCANCODE_4  '
ITEM_ID_5          SDL_SCANCODE_5  (
ITEM_ID_6          SDL_SCANCODE_6  -
ITEM_ID_7          SDL_SCANCODE_7  è
ITEM_ID_8          SDL_SCANCODE_8 _
ITEM_ID_9          SDL_SCANCODE_9   ç
ITEM_ID_0          SDL_SCANCODE_0   à
ITEM_ID_MINUS      SDL_SCANCODE_MINUS )
#
# Row 2
#
ITEM_ID_Q          SDL_SCANCODE_A          A
ITEM_ID_W          SDL_SCANCODE_Z          Z
ITEM_ID_OPENBRACE  SDL_SCANCODE_LEFTBRACKET  ^
ITEM_ID_CLOSEBRACE SDL_SCANCODE_RIGHTBRACKET  $
#
# Row 3
#
ITEM_ID_A          SDL_SCANCODE_Q          Q
ITEM_ID_COLON      SDL_SCANCODE_M          M
ITEM_ID_QUOTE      SDL_SCANCODE_SEMICOLON   ù
ITEM_ID_BACKSLASH  SDL_SCANCODE_APOSTROPHE   *
#
# Row 4
#
ITEM_ID_BACKSLASH2 SDL_SCANCODE_NONUSBACKSLASH       <
ITEM_ID_Z          SDL_SCANCODE_W          W
ITEM_ID_M          SDL_SCANCODE_COMMA      ,
ITEM_ID_COMMA      SDL_SCANCODE_PERIOD  ;
ITEM_ID_STOP       SDL_SCANCODE_SLASH      :
ITEM_ID_SLASH      SDL_SCANCODE_NONUSHASH    !
#
# Row 5
#
ITEM_ID_RALT       SDL_SCANCODE_MODE       ALTGR



Note also that the keyboard for the dm3500 doesn't seem to work unless you hit enter first.


Also if you just wanted to remap a couple of keys, you can remap the keys inside mame quite easily in the menu Input(this machine). To "clear out" the existing mapping once you highlight the key, hit enter to specify the key, then hit ESC to clear it and it should say "none". Sometimes you have to do this more than once, and if you do it when it says none it will reset the key to the default. Once it says none, hit enter to redefine the key to what you want.


Moderated by  R. Belmont 

Who's Online Now
1 registered members (1 invisible), 53 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
ShoutChat Box
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics8,782
Posts115,558
Members4,908
Most Online890
Jan 17th, 2020
Powered by UBB.threads™ PHP Forum Software 7.7.3