Skip to content
Permalink
Browse files

Fix SHIFT + Fx reporting in GEM. Contributed by Miro Kropacek

  • Loading branch information
pmandin committed May 22, 2019
1 parent e7ea07e commit 7abdf7710b0b34a57a2a63aacfd1b531737ed186
Showing with 17 additions and 3 deletions.
  1. +5 −2 src/video/ataricommon/SDL_atarievents.c
  2. +12 −1 src/video/ataricommon/SDL_atarikeys.h
@@ -140,8 +140,11 @@ void SDL_Atari_InitInternalKeymap(_THIS)
keymap[i] = SDLK_UNKNOWN;

/* Functions keys */
for ( i = 0; i<10; i++ )
for ( i = 0; i<10; i++ ) {
keymap[SCANCODE_F1 + i] = SDLK_F1+i;
/* Shift state is handled separately */
keymap[SCANCODE_SHIFT_F1 + i] = SDLK_F1+i;
}

/* Cursor keypad */
keymap[SCANCODE_HELP] = SDLK_HELP;
@@ -229,7 +232,7 @@ SDL_keysym *SDL_Atari_TranslateKey(int scancode, SDL_keysym *keysym,
keysym->unicode = 0;

if (keysym->sym == SDLK_UNKNOWN) {
keysym->sym = asciicode = keytab_normal[scancode];
keysym->sym = asciicode = keytab_normal[scancode];
}

if (SDL_TranslateUNICODE && pressed) {
@@ -27,7 +27,7 @@
*/

#ifndef _SDL_ATARIKEYS_H_
#define _SDL_ATARIKEYS_H_
#define _SDL_ATARIKEYS_H_

/* --- Keyboard scancodes --- */
/* taken from svgalib/vgakeyboard.h */
@@ -107,6 +107,17 @@
#define SCANCODE_F9 0x43
#define SCANCODE_F10 0x44

#define SCANCODE_SHIFT_F1 0x54
#define SCANCODE_SHIFT_F2 0x55
#define SCANCODE_SHIFT_F3 0x56
#define SCANCODE_SHIFT_F4 0x57
#define SCANCODE_SHIFT_F5 0x58
#define SCANCODE_SHIFT_F6 0x59
#define SCANCODE_SHIFT_F7 0x5a
#define SCANCODE_SHIFT_F8 0x5b
#define SCANCODE_SHIFT_F9 0x5c
#define SCANCODE_SHIFT_F10 0x5d

/* Numeric keypad */
#define SCANCODE_KP0 0x70
#define SCANCODE_KP1 0x6d

0 comments on commit 7abdf77

Please sign in to comment.