Skip to content

Commit

Permalink
Fix some incorrect scancodes on macOS
Browse files Browse the repository at this point in the history
The A, N, M, and Keypad + and * keys had the wrong scancodes for OS X. A
was due to a copy-paste error on my part, whereas N and M were also due
to a copy-paste error, but this time in a comment in the DOSBox code.
The Keypad + and * keys were an off-by-one in the table.

The angle bracket key <> on German QWERTZ layouts still seems to be
broken, and will be fixed in a future commit.
  • Loading branch information
sulix authored and icculus committed Jul 19, 2021
1 parent 19abb9c commit 613fe54
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/SDL12_compat.c
Expand Up @@ -2768,7 +2768,7 @@ Scancode20to12(SDL_Scancode sc)
CASESCANCODE20TO12(7, 0x10, 0x1A);
CASESCANCODE20TO12(8, 0x11, 0x1C);
CASESCANCODE20TO12(9, 0x12, 0x19);
CASESCANCODE20TO12(A, 0x26, 0x19);
CASESCANCODE20TO12(A, 0x26, 0x00);
CASESCANCODE20TO12(APOSTROPHE, 0x30, 0x27);
CASESCANCODE20TO12(B, 0x38, 0x0B);
CASESCANCODE20TO12(BACKSLASH, 0x33, 0x2A);
Expand Down Expand Up @@ -2818,19 +2818,19 @@ Scancode20to12(SDL_Scancode sc)
CASESCANCODE20TO12(KP_ENTER, 0x00, 0x4C);
CASESCANCODE20TO12(KP_EQUALS, 0x00, 0x51);
CASESCANCODE20TO12(KP_MINUS, 0x52, 0x4E);
CASESCANCODE20TO12(KP_MULTIPLY, 0x3F, 0x42);
CASESCANCODE20TO12(KP_MULTIPLY, 0x3F, 0x43);
CASESCANCODE20TO12(KP_PERIOD, 0x5B, 0x41);
CASESCANCODE20TO12(KP_PLUS, 0x56, 0x44);
CASESCANCODE20TO12(KP_PLUS, 0x56, 0x45);
CASESCANCODE20TO12(L, 0x2E, 0x25);
CASESCANCODE20TO12(LALT, 0x40, 0x00);
CASESCANCODE20TO12(LCTRL, 0x25, 0x00);
CASESCANCODE20TO12(LEFT, 0x00, 0x7B);
CASESCANCODE20TO12(LEFTBRACKET, 0x22, 0x21);
CASESCANCODE20TO12(LGUI, 0x85, 0x00);
CASESCANCODE20TO12(LSHIFT, 0x32, 0x00);
CASESCANCODE20TO12(M, 0x3A, 0x29);
CASESCANCODE20TO12(M, 0x3A, 0x2E);
CASESCANCODE20TO12(MINUS, 0x14, 0x1B);
CASESCANCODE20TO12(N, 0x39, 0x28);
CASESCANCODE20TO12(N, 0x39, 0x2D);
CASESCANCODE20TO12(NUMLOCKCLEAR, 0x4D, 0x47);
CASESCANCODE20TO12(O, 0x20, 0x1F);
CASESCANCODE20TO12(P, 0x21, 0x23);
Expand Down

0 comments on commit 613fe54

Please sign in to comment.