[hatari-devel] Feature request: allow alternate mapping of Help/Undo keys

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

The attached patch should make it possible to use F11/F12 as help/undo keys, 
if their default mapping (being used as shortcuts for Options/Fullscreen) has 
been changed. Main reason for me is because a) F11/F12 are also used in other 
emulators in this manner and b) more importantly, the other mappings of Help 
(SDLK_HELP/SDLK_F13) are not present on most AT style keyboards.
diff -r e5b97785addb src/keymap.c
--- a/src/keymap.c	Sun Sep 09 18:20:36 2018 +0200
+++ b/src/keymap.c	Wed Sep 12 10:17:33 2018 +0200
@@ -192,6 +192,8 @@
 	 case SDLK_F8: code = 0x42; break;
 	 case SDLK_F9: code = 0x43; break;
 	 case SDLK_F10: code = 0x44; break;
+	 case SDLK_F11: code = 0x62; break;
+	 case SDLK_F12: code = 0x61; break;
 	 case SDLK_F13: code = 0x62; break;
 	 /* Key state modifier keys */
 	 case SDLK_CAPSLOCK: code = 0x3A; break;
@@ -286,6 +288,8 @@
 	 case SDL_SCANCODE_F8: return 0x42;
 	 case SDL_SCANCODE_F9: return 0x43;
 	 case SDL_SCANCODE_F10: return 0x44;
+	 case SDL_SCANCODE_F11: return 0x62;
+	 case SDL_SCANCODE_F12: return 0x61;
 	 case SDL_SCANCODE_PRINTSCREEN: return 0x62;
 	 case SDL_SCANCODE_SCROLLLOCK: return 0x61;
 	 case SDL_SCANCODE_PAUSE: return 0x61;

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