src/video/uikit/keyinfotable.h
branchgsoc2008_iphone
changeset 2407 6c31bbd56c49
child 2447 7683a2e0e5e9
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/video/uikit/keyinfotable.h	Tue Jul 29 17:23:50 2008 +0000
     1.3 @@ -0,0 +1,153 @@
     1.4 +/*
     1.5 + *  scancodes_iphoneos.h
     1.6 + *  SDLiPhoneOS
     1.7 + *
     1.8 + *  Created by Holmes Futrell on 7/25/08.
     1.9 + *  Copyright 2008 __MyCompanyName__. All rights reserved.
    1.10 + *
    1.11 + */
    1.12 +
    1.13 +#ifndef _UIKIT_KeyInfo
    1.14 +#define _UIKIT_KeyInfo
    1.15 +
    1.16 +#include "SDL_scancode.h"
    1.17 +
    1.18 +typedef struct {
    1.19 +	SDL_scancode code;
    1.20 +	Uint16 mod;
    1.21 +} UIKitKeyInfo;
    1.22 +
    1.23 +/* So far only ASCII characters here */
    1.24 +static UIKitKeyInfo unicharToUIKeyInfoTable[] = {
    1.25 +
    1.26 +/*  0 */  {  SDL_SCANCODE_UNKNOWN, 0 },
    1.27 +/*  1 */  {  SDL_SCANCODE_UNKNOWN, 0 },
    1.28 +/*  2 */  {  SDL_SCANCODE_UNKNOWN, 0 },
    1.29 +/*  3 */  {  SDL_SCANCODE_UNKNOWN, 0 },
    1.30 +/*  4 */  {  SDL_SCANCODE_UNKNOWN, 0 },
    1.31 +/*  5 */  {  SDL_SCANCODE_UNKNOWN, 0 },
    1.32 +/*  6 */  {  SDL_SCANCODE_UNKNOWN, 0 },
    1.33 +/*  7 */  {  SDL_SCANCODE_UNKNOWN, 0 },
    1.34 +/*  8 */  {  SDL_SCANCODE_UNKNOWN, 0 },
    1.35 +/*  9 */  {  SDL_SCANCODE_UNKNOWN, 0 },
    1.36 +/*  10 */ {   SDL_SCANCODE_UNKNOWN, 0 },
    1.37 +/*  11 */ {   SDL_SCANCODE_UNKNOWN, 0 },
    1.38 +/*  12 */ {   SDL_SCANCODE_UNKNOWN, 0 },
    1.39 +/*  13 */ {   SDL_SCANCODE_UNKNOWN, 0 },
    1.40 +/*  14 */ {   SDL_SCANCODE_UNKNOWN, 0 },
    1.41 +/*  15 */ {   SDL_SCANCODE_UNKNOWN, 0 },
    1.42 +/*  16 */ {   SDL_SCANCODE_UNKNOWN, 0 },
    1.43 +/*  17 */ {   SDL_SCANCODE_UNKNOWN, 0 },
    1.44 +/*  18 */ {   SDL_SCANCODE_UNKNOWN, 0 },
    1.45 +/*  19 */ {   SDL_SCANCODE_UNKNOWN, 0 },
    1.46 +/*  20 */ {   SDL_SCANCODE_UNKNOWN, 0 },
    1.47 +/*  21 */ {   SDL_SCANCODE_UNKNOWN, 0 },
    1.48 +/*  22 */ {   SDL_SCANCODE_UNKNOWN, 0 },
    1.49 +/*  23 */ {   SDL_SCANCODE_UNKNOWN, 0 },
    1.50 +/*  24 */ {   SDL_SCANCODE_UNKNOWN, 0 },
    1.51 +/*  25 */ {   SDL_SCANCODE_UNKNOWN, 0 },
    1.52 +/*  26 */ {   SDL_SCANCODE_UNKNOWN, 0 },
    1.53 +/*  27 */ {   SDL_SCANCODE_UNKNOWN, 0 },
    1.54 +/*  28 */ {   SDL_SCANCODE_UNKNOWN, 0 },
    1.55 +/*  29 */ {   SDL_SCANCODE_UNKNOWN, 0 },
    1.56 +/*  30 */ {   SDL_SCANCODE_UNKNOWN, 0 },
    1.57 +/*  31 */ {   SDL_SCANCODE_UNKNOWN, 0 },
    1.58 +/*  32 */ {   SDL_SCANCODE_SPACE, 0 },
    1.59 +/*  33 */ {   SDL_SCANCODE_1,	KMOD_SHIFT },		/* plus shift modifier '!' */
    1.60 +/*  34 */ {   SDL_SCANCODE_APOSTROPHE, KMOD_SHIFT },	/* plus shift modifier '"' */
    1.61 +/*  35 */ {   SDL_SCANCODE_3, KMOD_SHIFT },			/* plus shift modifier '#' */
    1.62 +/*  36 */ {   SDL_SCANCODE_4, KMOD_SHIFT },			/* plus shift modifier '$' */
    1.63 +/*  37 */ {   SDL_SCANCODE_5, KMOD_SHIFT },			/* plus shift modifier '%' */
    1.64 +/*  38 */ {   SDL_SCANCODE_7, KMOD_SHIFT },			/* plus shift modifier '&' */
    1.65 +/*  39 */ {   SDL_SCANCODE_APOSTROPHE, 0 },	/* '''					   */
    1.66 +/*  40 */ {   SDL_SCANCODE_9, KMOD_SHIFT },	 		/* plus shift modifier '(' */
    1.67 +/*  41 */ {   SDL_SCANCODE_0, KMOD_SHIFT },			/* plus shift modifier ')' */
    1.68 +/*  42 */ {   SDL_SCANCODE_8, KMOD_SHIFT },			/* '*' */
    1.69 +/*  43 */ {   SDL_SCANCODE_EQUALS, KMOD_SHIFT },		/* plus shift modifier '+' */
    1.70 +/*  44 */ {   SDL_SCANCODE_COMMA, 0 },		/* ','					   */
    1.71 +/*  45 */ {   SDL_SCANCODE_MINUS, 0 },		/* '-'					   */
    1.72 +/*  46 */ {   SDL_SCANCODE_PERIOD, 0 },		/* '.'					   */
    1.73 +/*  47 */ {   SDL_SCANCODE_SLASH, 0 },		/* '/'					   */
    1.74 +/*  48 */ {   SDL_SCANCODE_0, 0	},		
    1.75 +/*  49 */ {   SDL_SCANCODE_1, 0 },
    1.76 +/*  50 */ {   SDL_SCANCODE_2, 0 },
    1.77 +/*  51 */ {   SDL_SCANCODE_3, 0 },
    1.78 +/*  52 */ {   SDL_SCANCODE_4, 0 },
    1.79 +/*  53 */ {   SDL_SCANCODE_5, 0 },
    1.80 +/*  54 */ {   SDL_SCANCODE_6, 0 },
    1.81 +/*  55 */ {   SDL_SCANCODE_7, 0 },
    1.82 +/*  56 */ {   SDL_SCANCODE_8, 0 },
    1.83 +/*  57 */ {   SDL_SCANCODE_9, 0 },
    1.84 +/*  58 */ {   SDL_SCANCODE_SEMICOLON,  KMOD_SHIFT },	/* plus shift modifier ';' */
    1.85 +/*  59 */ {   SDL_SCANCODE_SEMICOLON, 0 },
    1.86 +/*  60 */ {   SDL_SCANCODE_COMMA,  KMOD_SHIFT },	 	/* plus shift modifier '<' */
    1.87 +/*  61 */ {   SDL_SCANCODE_EQUALS, 0 },
    1.88 +/*  62 */ {   SDL_SCANCODE_PERIOD,  KMOD_SHIFT },		/* plus shift modifier '>' */
    1.89 +/*  63 */ {   SDL_SCANCODE_SLASH,  KMOD_SHIFT },		/* plus shift modifier '?' */
    1.90 +/*  64 */ {   SDL_SCANCODE_2,  KMOD_SHIFT },			/* plus shift modifier '@' */
    1.91 +/*  65 */ {   SDL_SCANCODE_A,  KMOD_SHIFT },			/* all the following need shift modifiers */
    1.92 +/*  66 */ {   SDL_SCANCODE_B,  KMOD_SHIFT },
    1.93 +/*  67 */ {   SDL_SCANCODE_C,  KMOD_SHIFT },
    1.94 +/*  68 */ {   SDL_SCANCODE_D,  KMOD_SHIFT },
    1.95 +/*  69 */ {   SDL_SCANCODE_E,  KMOD_SHIFT },
    1.96 +/*  70 */ {   SDL_SCANCODE_F,  KMOD_SHIFT },
    1.97 +/*  71 */ {   SDL_SCANCODE_G,  KMOD_SHIFT },
    1.98 +/*  72 */ {   SDL_SCANCODE_H,  KMOD_SHIFT },
    1.99 +/*  73 */ {   SDL_SCANCODE_I,  KMOD_SHIFT },
   1.100 +/*  74 */ {   SDL_SCANCODE_J,  KMOD_SHIFT },
   1.101 +/*  75 */ {   SDL_SCANCODE_K,  KMOD_SHIFT },
   1.102 +/*  76 */ {   SDL_SCANCODE_L,  KMOD_SHIFT },
   1.103 +/*  77 */ {   SDL_SCANCODE_M,  KMOD_SHIFT },
   1.104 +/*  78 */ {   SDL_SCANCODE_N,  KMOD_SHIFT },
   1.105 +/*  79 */ {   SDL_SCANCODE_O,  KMOD_SHIFT },
   1.106 +/*  80 */ {   SDL_SCANCODE_P,  KMOD_SHIFT },
   1.107 +/*  81 */ {   SDL_SCANCODE_Q,  KMOD_SHIFT },
   1.108 +/*  82 */ {   SDL_SCANCODE_R,  KMOD_SHIFT },
   1.109 +/*  83 */ {   SDL_SCANCODE_S,  KMOD_SHIFT },
   1.110 +/*  84 */ {	 SDL_SCANCODE_T,  KMOD_SHIFT },
   1.111 +/*  85 */ {   SDL_SCANCODE_U,  KMOD_SHIFT },
   1.112 +/*  86 */ {   SDL_SCANCODE_V,  KMOD_SHIFT },
   1.113 +/*  87 */ {   SDL_SCANCODE_W,  KMOD_SHIFT },
   1.114 +/*  88 */ {   SDL_SCANCODE_X,  KMOD_SHIFT },
   1.115 +/*  89 */ {   SDL_SCANCODE_Y,  KMOD_SHIFT },
   1.116 +/*  90 */ {  SDL_SCANCODE_Z,  KMOD_SHIFT },
   1.117 +/*  91 */ {   SDL_SCANCODE_LEFTBRACKET, 0 },
   1.118 +/*  92 */ {   SDL_SCANCODE_BACKSLASH, 0 },
   1.119 +/*  93 */ {   SDL_SCANCODE_RIGHTBRACKET, 0 },
   1.120 +/*  94 */ {   SDL_SCANCODE_6,  KMOD_SHIFT },				/* plus shift modifier '^' */
   1.121 +/*  95 */ {   SDL_SCANCODE_MINUS,  KMOD_SHIFT },			/* plus shift modifier '_' */
   1.122 +/*  96 */ {   SDL_SCANCODE_GRAVE,  KMOD_SHIFT },			/* '`'
   1.123 +/*  97 */ {   SDL_SCANCODE_A, 0	},	
   1.124 +/*  98 */ {   SDL_SCANCODE_B, 0 },
   1.125 +/*  99 */ {   SDL_SCANCODE_C, 0 },
   1.126 +/*  100 */{    SDL_SCANCODE_D, 0 },
   1.127 +/*  101 */{    SDL_SCANCODE_E, 0 },
   1.128 +/*  102 */{    SDL_SCANCODE_F, 0 },
   1.129 +/*  103 */{    SDL_SCANCODE_G, 0 },
   1.130 +/*  104 */{    SDL_SCANCODE_H, 0 },
   1.131 +/*  105 */{    SDL_SCANCODE_I, 0 },
   1.132 +/*  106 */{    SDL_SCANCODE_J, 0 },
   1.133 +/*  107 */{    SDL_SCANCODE_K, 0 },
   1.134 +/*  108 */{    SDL_SCANCODE_L, 0 },
   1.135 +/*  109 */{    SDL_SCANCODE_M, 0 },
   1.136 +/*  110 */{    SDL_SCANCODE_N, 0 },
   1.137 +/*  111 */{    SDL_SCANCODE_O, 0 },
   1.138 +/*  112 */{    SDL_SCANCODE_P, 0 },
   1.139 +/*  113 */{    SDL_SCANCODE_Q, 0 },
   1.140 +/*  114 */{    SDL_SCANCODE_R, 0 },
   1.141 +/*  115 */{    SDL_SCANCODE_S, 0 },
   1.142 +/*  116 */{    SDL_SCANCODE_T, 0 },
   1.143 +/*  117 */{    SDL_SCANCODE_U, 0 },
   1.144 +/*  118 */{    SDL_SCANCODE_V, 0 },
   1.145 +/*  119 */{    SDL_SCANCODE_W, 0 },
   1.146 +/*  120 */{	  SDL_SCANCODE_X, 0 },
   1.147 +/*  121 */{    SDL_SCANCODE_Y, 0 },
   1.148 +/*  122 */{    SDL_SCANCODE_Z, 0 },
   1.149 +/*  123 */{    SDL_SCANCODE_LEFTBRACKET, KMOD_SHIFT },		/* plus shift modifier '{' */
   1.150 +/*  124 */{    SDL_SCANCODE_BACKSLASH, KMOD_SHIFT },		/* plus shift modifier '|' */
   1.151 +/*  125 */{    SDL_SCANCODE_RIGHTBRACKET, KMOD_SHIFT },	/* plus shift modifier '}' */
   1.152 +/*  126 */{    SDL_SCANCODE_GRAVE, KMOD_SHIFT },		 	/* plus shift modifier '~' */
   1.153 +/*  127 */{    SDL_SCANCODE_DELETE, KMOD_SHIFT }
   1.154 +};
   1.155 +
   1.156 +#endif /* UIKitKeyInfo */