summaryrefslogtreecommitdiffstats
path: root/keymaps
diff options
context:
space:
mode:
authorGravatarGravatar couriersud <couriersud@gmx.org>2019-02-16 16:44:21 +0100
committerGravatarGravatar couriersud <couriersud@gmx.org>2019-02-16 16:44:42 +0100
commit757436bbfba420a8bc35ee99c2be93ecf125df84 (patch) (github)
tree5475e0fde29990f5575277dbf265044564ab8db3 /keymaps
parent983ffa2de6b409709a41d28aa1690604c7efc1b7 (diff)
downloadmame-757436bbfba420a8bc35ee99c2be93ecf125df84.tar.bz2
mame-757436bbfba420a8bc35ee99c2be93ecf125df84.zip
Fixed sdl2 keymap processing. [Couriersud]
Keymaps must have been broken for ages: - It is now possible to map every scancode SDL2 defines. - Removed keycode field. This was a leftover from SDL1.x - Fixed bug preventing keymaps from working. - Fixed the DE keymap. - Converted other keymaps to new format and added a comment that they have to be reviewed and fixed.
Diffstat (limited to 'keymaps')
-rw-r--r--keymaps/km_be_LINUX.map61
-rw-r--r--keymaps/km_br_LINUX.map23
-rw-r--r--keymaps/km_ch_LINUX.map31
-rw-r--r--keymaps/km_de_LINUX.map28
-rw-r--r--keymaps/km_es_LINUX.map27
-rw-r--r--keymaps/km_fr_LINUX.map59
-rw-r--r--keymaps/km_fr_OSX.map29
-rw-r--r--keymaps/km_gb_LINUX.map13
-rw-r--r--keymaps/km_it_LINUX.map27
-rw-r--r--keymaps/km_pt_LINUX.map27
-rw-r--r--keymaps/km_se_LINUX.map25
-rw-r--r--keymaps/km_se_OSX.map25
12 files changed, 216 insertions, 159 deletions
diff --git a/keymaps/km_be_LINUX.map b/keymaps/km_be_LINUX.map
index 4462771f129..e15a4345321 100644
--- a/keymaps/km_be_LINUX.map
+++ b/keymaps/km_be_LINUX.map
@@ -1,44 +1,49 @@
+#
+# FIXME: This file produces errors and needs to be fixed.
+#
+
+[SDL2]
# MAME/MESS keymap for Belgian AZERTY 105-keys keyboard (Linux)
#
# Row 1
#
-ITEM_ID_TILDE SDLK_WORLD_18 0x31 0xb2 ²
-ITEM_ID_1 SDLK_AMPERSAND 0x0a 0x26 &
-ITEM_ID_2 SDLK_WORLD_73 0x0b 0xe9 é
-ITEM_ID_3 SDLK_QUOTEDBL 0x0c 0x22 "
-ITEM_ID_4 SDLK_QUOTE 0x0d 0x27 '
-ITEM_ID_5 SDLK_LEFTPAREN 0x0e 0x28 (
-ITEM_ID_6 SDLK_WORLD_7 0x0f 0xa7 §
-ITEM_ID_7 SDLK_WORLD_72 0x10 0xe8 è
-ITEM_ID_8 SDLK_EXCLAIM 0x11 0x21 !
-ITEM_ID_9 SDLK_WORLD_71 0x12 0xe7 ç
-ITEM_ID_0 SDLK_WORLD_64 0x13 0xe0 à
-ITEM_ID_MINUS SDLK_RIGHTPAREN 0x14 0x29 )
-ITEM_ID_EQUALS SDLK_MINUS 0x15 0x2d -
+ITEM_ID_TILDE SDL_SCANCODE_WORLD_18 ²
+ITEM_ID_1 SDL_SCANCODE_AMPERSAND &
+ITEM_ID_2 SDL_SCANCODE_WORLD_73 é
+ITEM_ID_3 SDL_SCANCODE_QUOTEDBL "
+ITEM_ID_4 SDL_SCANCODE_QUOTE '
+ITEM_ID_5 SDL_SCANCODE_LEFTPAREN (
+ITEM_ID_6 SDL_SCANCODE_WORLD_7 §
+ITEM_ID_7 SDL_SCANCODE_WORLD_72 è
+ITEM_ID_8 SDL_SCANCODE_EXCLAIM !
+ITEM_ID_9 SDL_SCANCODE_WORLD_71 ç
+ITEM_ID_0 SDL_SCANCODE_WORLD_64 à
+ITEM_ID_MINUS SDL_SCANCODE_RIGHTPAREN )
+ITEM_ID_EQUALS SDL_SCANCODE_MINUS -
#
# Row 2
#
-ITEM_ID_Q SDLK_a 0x18 0x61 A
-ITEM_ID_W SDLK_z 0x19 0x7a Z
-ITEM_ID_OPENBRACE SDLK_CARET 0x22 0x5e ^
-ITEM_ID_CLOSEBRACE SDLK_DOLLAR 0x23 0x24 $
+ITEM_ID_Q SDL_SCANCODE_A A
+ITEM_ID_W SDL_SCANCODE_Z Z
+ITEM_ID_OPENBRACE SDL_SCANCODE_CARET ^
+ITEM_ID_CLOSEBRACE SDL_SCANCODE_DOLLAR $
#
# Row 3
#
-ITEM_ID_A SDLK_q 0x26 0x71 Q
-ITEM_ID_COLON SDLK_m 0x2f 0x6d M
-ITEM_ID_QUOTE SDLK_WORLD_89 0x30 0xf9 ù
-ITEM_ID_BACKSLASH SDLK_WORLD_21 0x33 0xb5 µ
+ITEM_ID_A SDL_SCANCODE_Q Q
+ITEM_ID_COLON SDL_SCANCODE_M M
+ITEM_ID_QUOTE SDL_SCANCODE_WORLD_89 ù
+ITEM_ID_BACKSLASH SDL_SCANCODE_WORLD_21 µ
#
# Row 4
#
-ITEM_ID_BACKSLASH2 SDLK_LESS 0x5e 0x3c <
-ITEM_ID_Z SDLK_w 0x34 0x77 W
-ITEM_ID_M SDLK_COMMA 0x3a 0x2c ,
-ITEM_ID_COMMA SDLK_SEMICOLON 0x3b 0x3b ;
-ITEM_ID_STOP SDLK_COLON 0x3c 0x3a :
-ITEM_ID_SLASH SDLK_EQUALS 0x3d 0x3d =
+ITEM_ID_BACKSLASH2 SDL_SCANCODE_LESS <
+ITEM_ID_Z SDL_SCANCODE_W W
+ITEM_ID_M SDL_SCANCODE_COMMA ,
+ITEM_ID_COMMA SDL_SCANCODE_SEMICOLON ;
+ITEM_ID_STOP SDL_SCANCODE_COLON :
+ITEM_ID_SLASH SDL_SCANCODE_EQUALS =
#
# Row 5
#
-ITEM_ID_RALT SDLK_MODE 0x71 0x00 ALTGR \ No newline at end of file
+ITEM_ID_RALT SDL_SCANCODE_MODE ALTGR \ No newline at end of file
diff --git a/keymaps/km_br_LINUX.map b/keymaps/km_br_LINUX.map
index 19ded27bbef..fb764448380 100644
--- a/keymaps/km_br_LINUX.map
+++ b/keymaps/km_br_LINUX.map
@@ -1,3 +1,8 @@
+#
+# FIXME: This file produces errors and needs to be fixed.
+#
+
+[SDL2]
# MAME/MESS keymap for Brazilian QWERTY 107-keys keyboard (Linux)
#
# The 107-keys Brazilian keyboard has an extra key used to type "/".
@@ -10,24 +15,24 @@
#
# Row 1
#
-ITEM_ID_TILDE SDLK_QUOTE 0x31 0x27 '
+ITEM_ID_TILDE SDL_SCANCODE_QUOTE '
#
# Row 2
#
-ITEM_ID_OPENBRACE SDLK_COMPOSE 0x22 0x00 ´
-ITEM_ID_CLOSEBRACE SDLK_LEFTBRACKET 0x23 0x00 [
+ITEM_ID_OPENBRACE SDL_SCANCODE_COMPOSE ´
+ITEM_ID_CLOSEBRACE SDL_SCANCODE_LEFTBRACKET [
#
# Row 3
#
-ITEM_ID_COLON SDLK_WORLD_71 0x2f 0xe7 Ç
-ITEM_ID_QUOTE SDLK_COMPOSE 0x30 0x00 ~
-ITEM_ID_BACKSLASH SDLK_RIGHTBRACKET 0x33 0x00 ]
+ITEM_ID_COLON SDL_SCANCODE_WORLD_71 Ç
+ITEM_ID_QUOTE SDL_SCANCODE_COMPOSE ~
+ITEM_ID_BACKSLASH SDL_SCANCODE_RIGHTBRACKET ]
#
# Row 4
#
-ITEM_ID_BACKSLASH2 SDLK_LESS 0x5e 0x3c <
-ITEM_ID_SLASH SDLK_SEMICOLON 0x3d 0x3b ;
+ITEM_ID_BACKSLASH2 SDL_SCANCODE_LESS <
+ITEM_ID_SLASH SDL_SCANCODE_SEMICOLON ;
#
# Row 5
#
-ITEM_ID_RALT SDLK_MODE 0x71 0x00 ALTGR \ No newline at end of file
+ITEM_ID_RALT SDL_SCANCODE_MODE ALTGR \ No newline at end of file
diff --git a/keymaps/km_ch_LINUX.map b/keymaps/km_ch_LINUX.map
index 53595faa082..2e27dfd0997 100644
--- a/keymaps/km_ch_LINUX.map
+++ b/keymaps/km_ch_LINUX.map
@@ -1,29 +1,34 @@
+#
+# FIXME: This file produces errors and needs to be fixed.
+#
+
+[SDL2]
# MAME/MESS keymap for Swiss QWERTZ 105-keys keyboard (Linux)
#
# Row 1
#
-ITEM_ID_TILDE SDLK_WORLD_7 0x31 0xa7 §
-ITEM_ID_MINUS SDLK_QUOTE 0x14 0x27 '
-ITEM_ID_EQUALS SDLK_CARET 0x15 0x00 ^
+ITEM_ID_TILDE SDL_SCANCODE_WORLD_7 §
+ITEM_ID_MINUS SDL_SCANCODE_QUOTE '
+ITEM_ID_EQUALS SDL_SCANCODE_CARET ^
#
# Row 2
#
-ITEM_ID_Y SDLK_z 0x1d 0x7a Z
-ITEM_ID_OPENBRACE SDLK_WORLD_92 0x22 0xfc ü
-ITEM_ID_CLOSEBRACE SDLK_COMPOSE 0x23 0x00 ¨
+ITEM_ID_Y SDL_SCANCODE_Z Z
+ITEM_ID_OPENBRACE SDL_SCANCODE_WORLD_92 ü
+ITEM_ID_CLOSEBRACE SDL_SCANCODE_COMPOSE ¨
#
# Row 3
#
-ITEM_ID_COLON SDLK_WORLD_86 0x2f 0xf6 ö
-ITEM_ID_QUOTE SDLK_WORLD_68 0x30 0xe4 ä
-ITEM_ID_BACKSLASH SDLK_DOLLAR 0x33 0x24 $
+ITEM_ID_COLON SDL_SCANCODE_WORLD_86 ö
+ITEM_ID_QUOTE SDL_SCANCODE_WORLD_68 ä
+ITEM_ID_BACKSLASH SDL_SCANCODE_DOLLAR $
#
# Row 4
#
-ITEM_ID_BACKSLASH2 SDLK_LESS 0x5e 0x3c <
-ITEM_ID_Z SDLK_y 0x34 0x79 Y
-ITEM_ID_SLASH SDLK_MINUS 0x3d 0x2d -
+ITEM_ID_BACKSLASH2 SDL_SCANCODE_LESS <
+ITEM_ID_Z SDL_SCANCODE_Y Y
+ITEM_ID_SLASH SDL_SCANCODE_MINUS -
#
# Row 5
#
-ITEM_ID_RALT SDLK_MODE 0x71 0x00 ALTGR \ No newline at end of file
+ITEM_ID_RALT SDL_SCANCODE_MODE ALTGR \ No newline at end of file
diff --git a/keymaps/km_de_LINUX.map b/keymaps/km_de_LINUX.map
index 4b8ec55a793..c2a2b2d66fc 100644
--- a/keymaps/km_de_LINUX.map
+++ b/keymaps/km_de_LINUX.map
@@ -1,29 +1,31 @@
+[SDL2]
# MAME/MESS keymap for German QWERTZ 105-keys keyboard (Linux)
#
# Row 1
#
-ITEM_ID_TILDE SDLK_CARET 0x31 0x00 ^
-ITEM_ID_MINUS SDLK_WORLD_63 0x14 0xdf ß
-ITEM_ID_EQUALS SDLK_COMPOSE 0x15 0x00 ´
+ITEM_ID_TILDE SDL_SCANCODE_GRAVE ^
+ITEM_ID_MINUS SDL_SCANCODE_MINUS ß
+ITEM_ID_EQUALS SDL_SCANCODE_EQUALS ´
#
# Row 2
#
-ITEM_ID_Y SDLK_z 0x1d 0x7a Z
-ITEM_ID_OPENBRACE SDLK_WORLD_92 0x22 0xfc Ü
-ITEM_ID_CLOSEBRACE SDLK_PLUS 0x23 0x2b +
+ITEM_ID_Y SDL_SCANCODE_Z Z
+ITEM_ID_OPENBRACE SDL_SCANCODE_LEFTBRACKET Ü
+ITEM_ID_CLOSEBRACE SDL_SCANCODE_RIGHTBRACKET +
#
# Row 3
#
-ITEM_ID_COLON SDLK_WORLD_86 0x2f 0xf6 Ö
-ITEM_ID_QUOTE SDLK_WORLD_68 0x30 0xe4 Ä
-ITEM_ID_BACKSLASH SDLK_HASH 0x33 0x23 #
+ITEM_ID_COLON SDL_SCANCODE_SEMICOLON Ö
+ITEM_ID_QUOTE SDL_SCANCODE_APOSTROPHE Ä
+ITEM_ID_BACKSLASH SDL_SCANCODE_BACKSLASH #
#
# Row 4
#
-ITEM_ID_BACKSLASH2 SDLK_LESS 0x5e 0x3c <
-ITEM_ID_Z SDLK_y 0x34 0x79 Y
-ITEM_ID_SLASH SDLK_MINUS 0x3d 0x2d -
+ITEM_ID_BACKSLASH2 SDL_SCANCODE_NONUSBACKSLASH <
+ITEM_ID_Z SDL_SCANCODE_Y Y
+ITEM_ID_SLASH SDL_SCANCODE_SLASH -
#
# Row 5
#
-ITEM_ID_RALT SDLK_MODE 0x71 0x00 ALTGR \ No newline at end of file
+ITEM_ID_RALT SDL_SCANCODE_RALT ALTGR
+
diff --git a/keymaps/km_es_LINUX.map b/keymaps/km_es_LINUX.map
index 584d791a9d2..57c167cda74 100644
--- a/keymaps/km_es_LINUX.map
+++ b/keymaps/km_es_LINUX.map
@@ -1,3 +1,8 @@
+#
+# FIXME: This file produces errors and needs to be fixed.
+#
+
+[SDL2]
# MAME/MESS keymap for Spanish QWERTY 105-keys keyboard (Linux)
# SDL can tell the difference between the two COMPOSE keys but assigns them the same label
# thus both OPENBRACE and QUOTE appear like "` ´" in the user interface.
@@ -5,26 +10,26 @@
#
# Row 1
#
-ITEM_ID_TILDE SDLK_WORLD_26 0x31 0xba º
-ITEM_ID_MINUS SDLK_QUOTE 0x14 0x27 '
-ITEM_ID_EQUALS SDLK_WORLD_1 0x15 0xa1 ¡
+ITEM_ID_TILDE SDL_SCANCODE_WORLD_26 º
+ITEM_ID_MINUS SDL_SCANCODE_QUOTE '
+ITEM_ID_EQUALS SDL_SCANCODE_WORLD_1 ¡
#
# Row 2
#
-ITEM_ID_OPENBRACE SDLK_COMPOSE 0x22 0x00 `
-ITEM_ID_CLOSEBRACE SDLK_PLUS 0x23 0x00 +
+ITEM_ID_OPENBRACE SDL_SCANCODE_COMPOSE `
+ITEM_ID_CLOSEBRACE SDL_SCANCODE_PLUS +
#
# Row 3
#
-ITEM_ID_COLON SDLK_WORLD_81 0x2f 0xf1 Ñ
-ITEM_ID_QUOTE SDLK_COMPOSE 0x30 0x00 ´
-ITEM_ID_BACKSLASH SDLK_WORLD_71 0x33 0x00 Ç
+ITEM_ID_COLON SDL_SCANCODE_WORLD_81 Ñ
+ITEM_ID_QUOTE SDL_SCANCODE_COMPOSE ´
+ITEM_ID_BACKSLASH SDL_SCANCODE_WORLD_71 Ç
#
# Row 4
#
-ITEM_ID_BACKSLASH2 SDLK_LESS 0x5e 0x3c <
-ITEM_ID_SLASH SDLK_MINUS 0x3d 0x2d -
+ITEM_ID_BACKSLASH2 SDL_SCANCODE_LESS <
+ITEM_ID_SLASH SDL_SCANCODE_MINUS -
#
# Row 5
#
-ITEM_ID_RALT SDLK_MODE 0x71 0x00 ALTGR \ No newline at end of file
+ITEM_ID_RALT SDL_SCANCODE_MODE ALTGR \ No newline at end of file
diff --git a/keymaps/km_fr_LINUX.map b/keymaps/km_fr_LINUX.map
index f33c899b997..b2814536994 100644
--- a/keymaps/km_fr_LINUX.map
+++ b/keymaps/km_fr_LINUX.map
@@ -1,43 +1,48 @@
+#
+# FIXME: This file produces errors and needs to be fixed.
+#
+
+[SDL2]
# MAME/MESS keymap for French AZERTY 105-keys keyboard (Linux)
#
# Row 1
#
-ITEM_ID_TILDE SDLK_WORLD_18 0x31 0xb2 ²
-ITEM_ID_1 SDLK_AMPERSAND 0x0a 0x26 &
-ITEM_ID_2 SDLK_WORLD_73 0x0b 0xe9 é
-ITEM_ID_3 SDLK_QUOTEDBL 0x0c 0x22 "
-ITEM_ID_4 SDLK_QUOTE 0x0d 0x27 '
-ITEM_ID_5 SDLK_LEFTPAREN 0x0e 0x28 (
-ITEM_ID_6 SDLK_MINUS 0x0f 0x2d -
-ITEM_ID_7 SDLK_WORLD_72 0x10 0xe8 è
-ITEM_ID_8 SDLK_UNDERSCORE 0x11 0x5f _
-ITEM_ID_9 SDLK_WORLD_71 0x12 0xe7 ç
-ITEM_ID_0 SDLK_WORLD_64 0x13 0xe0 à
-ITEM_ID_MINUS SDLK_RIGHTPAREN 0x14 0x29 )
+ITEM_ID_TILDE SDL_SCANCODE_WORLD_18 ²
+ITEM_ID_1 SDL_SCANCODE_AMPERSAND &
+ITEM_ID_2 SDL_SCANCODE_WORLD_73 é
+ITEM_ID_3 SDL_SCANCODE_QUOTEDBL "
+ITEM_ID_4 SDL_SCANCODE_QUOTE '
+ITEM_ID_5 SDL_SCANCODE_LEFTPAREN (
+ITEM_ID_6 SDL_SCANCODE_MINUS -
+ITEM_ID_7 SDL_SCANCODE_WORLD_72 è
+ITEM_ID_8 SDL_SCANCODE_UNDERSCORE _
+ITEM_ID_9 SDL_SCANCODE_WORLD_71 ç
+ITEM_ID_0 SDL_SCANCODE_WORLD_64 à
+ITEM_ID_MINUS SDL_SCANCODE_RIGHTPAREN )
#
# Row 2
#
-ITEM_ID_Q SDLK_a 0x18 0x61 A
-ITEM_ID_W SDLK_z 0x19 0x7a Z
-ITEM_ID_OPENBRACE SDLK_CARET 0x22 0x00 ^
-ITEM_ID_CLOSEBRACE SDLK_DOLLAR 0x23 0x00 $
+ITEM_ID_Q SDL_SCANCODE_A A
+ITEM_ID_W SDL_SCANCODE_Z Z
+ITEM_ID_OPENBRACE SDL_SCANCODE_CARET ^
+ITEM_ID_CLOSEBRACE SDL_SCANCODE_DOLLAR $
#
# Row 3
#
-ITEM_ID_A SDLK_q 0x26 0x51 Q
-ITEM_ID_COLON SDLK_m 0x2f 0x6d M
-ITEM_ID_QUOTE SDLK_WORLD_89 0x30 0xf9 ù
-ITEM_ID_BACKSLASH SDLK_ASTERISK 0x33 0x2a *
+ITEM_ID_A SDL_SCANCODE_Q Q
+ITEM_ID_COLON SDL_SCANCODE_M M
+ITEM_ID_QUOTE SDL_SCANCODE_WORLD_89 ù
+ITEM_ID_BACKSLASH SDL_SCANCODE_ASTERISK *
#
# Row 4
#
-ITEM_ID_BACKSLASH2 SDLK_LESS 0x5e 0x3c <
-ITEM_ID_Z SDLK_w 0x34 0x77 W
-ITEM_ID_M SDLK_COMMA 0x3a 0x2c ,
-ITEM_ID_COMMA SDLK_SEMICOLON 0x3b 0x3b ;
-ITEM_ID_STOP SDLK_COLON 0x3c 0x3a :
-ITEM_ID_SLASH SDLK_EXCLAIM 0x3d 0x21 !
+ITEM_ID_BACKSLASH2 SDL_SCANCODE_LESS <
+ITEM_ID_Z SDL_SCANCODE_w W
+ITEM_ID_M SDL_SCANCODE_COMMA ,
+ITEM_ID_COMMA SDL_SCANCODE_SEMICOLON ;
+ITEM_ID_STOP SDL_SCANCODE_COLON :
+ITEM_ID_SLASH SDL_SCANCODE_EXCLAIM !
#
# Row 5
#
-ITEM_ID_RALT SDLK_MODE 0x71 0x00 ALTGR \ No newline at end of file
+ITEM_ID_RALT SDL_SCANCODE_MODE ALTGR \ No newline at end of file
diff --git a/keymaps/km_fr_OSX.map b/keymaps/km_fr_OSX.map
index 9a492ca2d3e..d2c11c7465b 100644
--- a/keymaps/km_fr_OSX.map
+++ b/keymaps/km_fr_OSX.map
@@ -1,15 +1,20 @@
+#
+# FIXME: This file produces errors and needs to be fixed.
+#
+
+[SDL2]
# MAME/MESS keymap for French AZERTY keyboard (OSX)
#
#
-ITEM_ID_1 SDLK_AMPERSAND 0x12 0x26 &
-ITEM_ID_2 SDLK_WORLD_0 0x13 0xe9
-ITEM_ID_3 SDLK_QUOTEDBL 0x14 0x22 "
-ITEM_ID_4 SDLK_QUOTE 0x15 0x27 '
-ITEM_ID_5 SDLK_LEFTPAREN 0x17 0x28 (
-ITEM_ID_6 SDLK_WORLD_1 0x16 0xa7
-ITEM_ID_7 SDLK_WORLD_3 0x1a 0xe8
-ITEM_ID_8 SDLK_EXCLAIM 0x1c 0x21 !
-ITEM_ID_9 SDLK_WORLD_2 0x19 0xe7
-ITEM_ID_0 SDLK_WORLD_4 0x1d 0xe0
-ITEM_ID_MINUS SDLK_RIGHTPAREN 0x1b 0x29 )
-ITEM_ID_EQUALS SDLK_MINUS 0x18 0x2d - \ No newline at end of file
+ITEM_ID_1 SDL_SCANCODE_AMPERSAND &
+ITEM_ID_2 SDL_SCANCODE_WORLD_0 �
+ITEM_ID_3 SDL_SCANCODE_QUOTEDBL "
+ITEM_ID_4 SDL_SCANCODE_QUOTE '
+ITEM_ID_5 SDL_SCANCODE_LEFTPAREN (
+ITEM_ID_6 SDL_SCANCODE_WORLD_1 �
+ITEM_ID_7 SDL_SCANCODE_WORLD_3 �
+ITEM_ID_8 SDL_SCANCODE_EXCLAIM !
+ITEM_ID_9 SDL_SCANCODE_WORLD_2 �
+ITEM_ID_0 SDL_SCANCODE_WORLD_4 �
+ITEM_ID_MINUS SDL_SCANCODE_RIGHTPAREN )
+ITEM_ID_EQUALS SDL_SCANCODE_MINUS - \ No newline at end of file
diff --git a/keymaps/km_gb_LINUX.map b/keymaps/km_gb_LINUX.map
index d4fa500cbce..f7d9f13c194 100644
--- a/keymaps/km_gb_LINUX.map
+++ b/keymaps/km_gb_LINUX.map
@@ -1,20 +1,25 @@
+#
+# FIXME: This file produces errors and needs to be fixed.
+#
+
+[SDL2]
# MAME/MESS keymap for British QWERTY 105-keys keyboard (Linux)
#
# Row 1
#
-ITEM_ID_TILDE SDLK_BACKQUOTE 0x31 0x60 `
+ITEM_ID_TILDE SDL_SCANCODE_BACKQUOTE `
#
# Row 2
#
#
# Row 3
#
-ITEM_ID_BACKSLASH SDLK_HASH 0x33 0x23 #
+ITEM_ID_BACKSLASH SDL_SCANCODE_HASH #
#
# Row 4
#
-ITEM_ID_BACKSLASH2 SDLK_BACKSLASH 0x5e 0x5c \
+ITEM_ID_BACKSLASH2 SDL_SCANCODE_BACKSLASH \
#
# Row 5
#
-ITEM_ID_RALT SDLK_MODE 0x71 0x00 ALTGR \ No newline at end of file
+ITEM_ID_RALT SDL_SCANCODE_MODE ALTGR \ No newline at end of file
diff --git a/keymaps/km_it_LINUX.map b/keymaps/km_it_LINUX.map
index b6fdfe329a2..96c641eb708 100644
--- a/keymaps/km_it_LINUX.map
+++ b/keymaps/km_it_LINUX.map
@@ -1,27 +1,32 @@
+#
+# FIXME: This file produces errors and needs to be fixed.
+#
+
+[SDL2]
# MAME/MESS keymap for Italian QWERTY 105-keys keyboard (Linux)
#
# Row 1
#
-ITEM_ID_TILDE SDLK_BACKSLASH 0x31 0x5c \
-ITEM_ID_MINUS SDLK_QUOTE 0x14 0x27 '
-ITEM_ID_EQUALS SDLK_WORLD_76 0x15 0xec ì
+ITEM_ID_TILDE SDL_SCANCODE_BACKSLASH \
+ITEM_ID_MINUS SDL_SCANCODE_QUOTE '
+ITEM_ID_EQUALS SDL_SCANCODE_WORLD_76 ì
#
# Row 2
#
-ITEM_ID_OPENBRACE SDLK_WORLD_72 0x22 0xe8 è
-ITEM_ID_CLOSEBRACE SDLK_PLUS 0x23 0x2b +
+ITEM_ID_OPENBRACE SDL_SCANCODE_WORLD_72 è
+ITEM_ID_CLOSEBRACE SDL_SCANCODE_PLUS +
#
# Row 3
#
-ITEM_ID_COLON SDLK_WORLD_82 0x2f 0xf2 ò
-ITEM_ID_QUOTE SDLK_WORLD_64 0x30 0xe0 à
-ITEM_ID_BACKSLASH SDLK_WORLD_89 0x33 0xf9 ù
+ITEM_ID_COLON SDL_SCANCODE_WORLD_82 ò
+ITEM_ID_QUOTE SDL_SCANCODE_WORLD_64 à
+ITEM_ID_BACKSLASH SDL_SCANCODE_WORLD_89 ù
#
# Row 4
#
-ITEM_ID_BACKSLASH2 SDLK_LESS 0x5e 0x3c <
-ITEM_ID_SLASH SDLK_MINUS 0x3d 0x2d -
+ITEM_ID_BACKSLASH2 SDL_SCANCODE_LESS <
+ITEM_ID_SLASH SDL_SCANCODE_MINUS -
#
# Row 5
#
-ITEM_ID_RALT SDLK_MODE 0x71 0x00 ALTGR \ No newline at end of file
+ITEM_ID_RALT SDL_SCANCODE_MODE ALTGR \ No newline at end of file
diff --git a/keymaps/km_pt_LINUX.map b/keymaps/km_pt_LINUX.map
index 3767058e2de..ff449e92f2d 100644
--- a/keymaps/km_pt_LINUX.map
+++ b/keymaps/km_pt_LINUX.map
@@ -1,3 +1,8 @@
+#
+# FIXME: This file produces errors and needs to be fixed.
+#
+
+[SDL2]
# MAME/MESS keymap for Portuguese QWERTY 105-keys keyboard (Linux)
# SDL can tell the difference between the two COMPOSE keys but assigns them the same label
# thus both CLOSEBRACE and BACKSLASH appear like "´ ~" in the user interface.
@@ -5,26 +10,26 @@
#
# Row 1
#
-ITEM_ID_TILDE SDLK_BACKSLASH 0x31 0x5c \
-ITEM_ID_MINUS SDLK_QUOTE 0x14 0x27 '
-ITEM_ID_EQUALS SDLK_WORLD_11 0x15 0xab «
+ITEM_ID_TILDE SDL_SCANCODE_BACKSLASH \
+ITEM_ID_MINUS SDL_SCANCODE_QUOTE '
+ITEM_ID_EQUALS SDL_SCANCODE_WORLD_11 «
#
# Row 2
#
-ITEM_ID_OPENBRACE SDLK_PLUS 0x22 0x2b +
-ITEM_ID_CLOSEBRACE SDLK_COMPOSE 0x23 0x00 ´
+ITEM_ID_OPENBRACE SDL_SCANCODE_PLUS +
+ITEM_ID_CLOSEBRACE SDL_SCANCODE_COMPOSE ´
#
# Row 3
#
-ITEM_ID_COLON SDLK_WORLD_71 0x2f 0xe7 Ç
-ITEM_ID_QUOTE SDLK_WORLD_26 0x30 0xba º
-ITEM_ID_BACKSLASH SDLK_COMPOSE 0x33 0x00 ~
+ITEM_ID_COLON SDL_SCANCODE_WORLD_71 Ç
+ITEM_ID_QUOTE SDL_SCANCODE_WORLD_26 º
+ITEM_ID_BACKSLASH SDL_SCANCODE_COMPOSE ~
#
# Row 4
#
-ITEM_ID_BACKSLASH2 SDLK_LESS 0x5e 0x3c <
-ITEM_ID_SLASH SDLK_MINUS 0x3d 0x2d -
+ITEM_ID_BACKSLASH2 SDL_SCANCODE_LESS <
+ITEM_ID_SLASH SDL_SCANCODE_MINUS -
#
# Row 5
#
-ITEM_ID_RALT SDLK_MODE 0x71 0x00 ALTGR \ No newline at end of file
+ITEM_ID_RALT SDL_SCANCODE_MODE ALTGR \ No newline at end of file
diff --git a/keymaps/km_se_LINUX.map b/keymaps/km_se_LINUX.map
index 7cc737baf21..1d127ec5b29 100644
--- a/keymaps/km_se_LINUX.map
+++ b/keymaps/km_se_LINUX.map
@@ -1,23 +1,28 @@
+#
+# FIXME: This file produces errors and needs to be fixed.
+#
+
+[SDL2]
# MAME/MESS keymap for Swedish/Finnish QWERTY 105-keys keyboard (Linux)
#
# Row 1
#
-ITEM_ID_TILDE SDLK_LESS 0x32 0x3c <
-ITEM_ID_MINUS SDLK_PLUS 0x1b 0x2b +
-ITEM_ID_EQUALS SDLK_WORLD_1 0x18 0x00
+ITEM_ID_TILDE SDL_SCANCODE_LESS <
+ITEM_ID_MINUS SDL_SCANCODE_PLUS +
+ITEM_ID_EQUALS SDL_SCANCODE_WORLD_1 0x00
#
# Row 2
#
-ITEM_ID_OPENBRACE SDLK_WORLD_3 0x21 0xe5 å
-ITEM_ID_CLOSEBRACE SDLK_WORLD_2 0x1e 0x00
+ITEM_ID_OPENBRACE SDL_SCANCODE_WORLD_3 å
+ITEM_ID_CLOSEBRACE SDL_SCANCODE_WORLD_2
#
# Row 3
#
-ITEM_ID_COLON SDLK_WORLD_5 0x29 0xf6 ö
-ITEM_ID_QUOTE SDLK_WORLD_4 0x27 0xe4 ä
-ITEM_ID_BACKSLASH2 SDLK_QUOTE 0x2a 0x27 '
+ITEM_ID_COLON SDL_SCANCODE_WORLD_5 ö
+ITEM_ID_QUOTE SDL_SCANCODE_WORLD_4 ä
+ITEM_ID_BACKSLASH2 SDL_SCANCODE_QUOTE '
#
# Row 4
#
-ITEM_ID_BACKSLASH SDLK_WORLD_0 0x0a 0xa7 §
-ITEM_ID_SLASH SDLK_MINUS 0x2c 0x2d -
+ITEM_ID_BACKSLASH SDL_SCANCODE_WORLD_0 §
+ITEM_ID_SLASH SDL_SCANCODE_MINUS -
diff --git a/keymaps/km_se_OSX.map b/keymaps/km_se_OSX.map
index 36d629fb97c..02f6512856d 100644
--- a/keymaps/km_se_OSX.map
+++ b/keymaps/km_se_OSX.map
@@ -1,23 +1,28 @@
+#
+# FIXME: This file produces errors and needs to be fixed.
+#
+
+[SDL2]
# MAME/MESS keymap for Swedish/Finnish QWERTY compact keyboard (OSX)
#
# Row 1
#
-ITEM_ID_TILDE SDLK_WORLD_0 0x0a 0xa7 §
-ITEM_ID_MINUS SDLK_PLUS 0x1b 0x2b +
-ITEM_ID_EQUALS SDLK_WORLD_1 0x18 0x00
+ITEM_ID_TILDE SDL_SCANCODE_WORLD_0 §
+ITEM_ID_MINUS SDL_SCANCODE_PLUS +
+ITEM_ID_EQUALS SDL_SCANCODE_WORLD_1 0x00
#
# Row 2
#
-ITEM_ID_OPENBRACE SDLK_WORLD_3 0x21 0xe5 å
-ITEM_ID_CLOSEBRACE SDLK_WORLD_2 0x1e 0x00
+ITEM_ID_OPENBRACE SDL_SCANCODE_WORLD_3 å
+ITEM_ID_CLOSEBRACE SDL_SCANCODE_WORLD_2
#
# Row 3
#
-ITEM_ID_COLON SDLK_WORLD_5 0x29 0xf6 ö
-ITEM_ID_QUOTE SDLK_WORLD_4 0x27 0xe4 ä
-ITEM_ID_BACKSLASH2 SDLK_QUOTE 0x2a 0x27 '
+ITEM_ID_COLON SDL_SCANCODE_WORLD_5 ö
+ITEM_ID_QUOTE SDL_SCANCODE_WORLD_4 ä
+ITEM_ID_BACKSLASH2 SDL_SCANCODE_QUOTE '
#
# Row 4
#
-ITEM_ID_BACKSLASH SDLK_LESS 0x32 0x3c <
-ITEM_ID_SLASH SDLK_MINUS 0x2c 0x2d -
+ITEM_ID_BACKSLASH SDL_SCANCODE_LESS <
+ITEM_ID_SLASH SDL_SCANCODE_MINUS -