diff src/video/cocoa/SDL_cocoakeyboard.m @ 2305:fbe8ff44c519

First pass of new SDL scancode concept for X11.
author Sam Lantinga <slouken@libsdl.org>
date Thu, 07 Feb 2008 15:31:09 +0000
parents 50f58ce12497
children 99210400e8b9
line wrap: on
line diff
--- a/src/video/cocoa/SDL_cocoakeyboard.m	Tue Feb 05 07:30:50 2008 +0000
+++ b/src/video/cocoa/SDL_cocoakeyboard.m	Thu Feb 07 15:31:09 2008 +0000
@@ -22,9 +22,9 @@
 #include "SDL_config.h"
 
 #include "SDL_cocoavideo.h"
-#include "SDL_cocoakeys.h"
 
 #include "../../events/SDL_keyboard_c.h"
+#include "../../events/scancodes_darwin.h"
 
 #include <Carbon/Carbon.h>
 
@@ -372,13 +372,13 @@
         UInt32 keyboard_type = LMGetKbdType();
         OSStatus err;
 
-        for (i = 0; i < SDL_arraysize(scancode_table); i++) {
+        for (i = 0; i < SDL_arraysize(darwin_scancode_table); i++) {
             UniChar s[8];
             UniCharCount len;
             UInt32 dead_key_state;
 
             /* Make sure this scancode is a valid character scancode */
-            scancode = scancode_table[i];
+            scancode = darwin_scancode_table[i];
             if (scancode == SDL_SCANCODE_UNKNOWN ||
                 (keymap[scancode] & SDLK_SCANCODE_MASK)) {
                 continue;
@@ -407,7 +407,7 @@
             UInt32 c, state = 0;
 
             /* Make sure this scancode is a valid character scancode */
-            scancode = scancode_table[i];
+            scancode = darwin_scancode_table[i];
             if (scancode == SDL_SCANCODE_UNKNOWN ||
                 (keymap[scancode] & SDLK_SCANCODE_MASK)) {
                 continue;
@@ -487,8 +487,8 @@
         /* see comments in SDL_cocoakeys.h */
         scancode = 60 - scancode;
     }
-    if (scancode < SDL_arraysize(scancode_table)) {
-        code = scancode_table[scancode];
+    if (scancode < SDL_arraysize(darwin_scancode_table)) {
+        code = darwin_scancode_table[scancode];
     }
     else {
         /* Hmm, does this ever happen?  If so, need to extend the keymap... */