[hatari-devel] Keyboard mappings?

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Hi,

Host Page up & down keys aren't mapped to Atari
Help & Undo (0x62 & 0x61) keys with symbolic mapping
like they're with scancode mapping, and documented
to be mapped in Hatari manual.

They're mapped to 0x63 & 0x64 which are keys in
the Atari numpad.  End key mapping is even more
confusing.

See:
----------------------------------------------
$ for i in END PAGE; do grep $i keymap.c; done

	 case SDLK_END: code = 0x61; break;
	 case SDL_SCANCODE_END: return 0x2b;
	 case SDLK_END:      return 0x60;  /* End => "<>" on German Atari kbd */

	 case SDLK_PAGEUP: code = 0x63; break;
	 case SDLK_PAGEDOWN: code = 0x64; break;
	 case SDL_SCANCODE_PAGEUP: return 0x62;
	 case SDL_SCANCODE_PAGEDOWN: return 0x61;
	 case SDLK_PAGEUP:   return 0x62;  /* F11 => Help */
	 case SDLK_PAGEDOWN: return 0x61;  /* F12 => Undo */
----------------------------------------------
(matched in symbolic, SDL2 scancode, SDL1 scancode order)


Is there some specific reason for these differences?


With attached patch, Help & Undo are mapped as
documented in hatari.1 manual page.


	- Eero
diff -r 8bb857975e66 src/keymap.c
--- a/src/keymap.c	Mon Oct 31 21:31:24 2016 +0200
+++ b/src/keymap.c	Mon Oct 31 22:23:43 2016 +0200
@@ -178,8 +178,8 @@
 	 case SDLK_INSERT: code = 0x52; break;
 	 case SDLK_HOME: code = 0x47; break;
 	 case SDLK_END: code = 0x61; break;
-	 case SDLK_PAGEUP: code = 0x63; break;
-	 case SDLK_PAGEDOWN: code = 0x64; break;
+	 case SDLK_PAGEUP: code = 0x62; break;
+	 case SDLK_PAGEDOWN: code = 0x61; break;
 	 /* Function keys */
 	 case SDLK_F1: code = 0x3B; break;
 	 case SDLK_F2: code = 0x3C; break;


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/