src/video/haiku/SDL_bkeyboard.cc
changeset 12201 8bdc4d340419
parent 12082 09999a0e8f9a
child 12503 806492103856
     1.1 --- a/src/video/haiku/SDL_bkeyboard.cc	Sat Aug 18 17:23:40 2018 -0400
     1.2 +++ b/src/video/haiku/SDL_bkeyboard.cc	Mon Sep 24 11:49:25 2018 -0700
     1.3 @@ -42,143 +42,143 @@
     1.4  static int8 keystate[KEYMAP_SIZE];
     1.5  
     1.6  void HAIKU_InitOSKeymap(void) {
     1.7 -		for( uint i = 0; i < SDL_TABLESIZE(keymap); ++i ) {
     1.8 -			keymap[i] = SDL_SCANCODE_UNKNOWN;
     1.9 -		}
    1.10 +        for( uint i = 0; i < SDL_TABLESIZE(keymap); ++i ) {
    1.11 +            keymap[i] = SDL_SCANCODE_UNKNOWN;
    1.12 +        }
    1.13  
    1.14 -		for( uint i = 0; i < KEYMAP_SIZE; ++i ) {
    1.15 -			keystate[i] = SDL_RELEASED;
    1.16 -		}
    1.17 +        for( uint i = 0; i < KEYMAP_SIZE; ++i ) {
    1.18 +            keystate[i] = SDL_RELEASED;
    1.19 +        }
    1.20  
    1.21 -		keymap[0x01]		= SDL_GetScancodeFromKey(SDLK_ESCAPE);
    1.22 -		keymap[B_F1_KEY]	= SDL_GetScancodeFromKey(SDLK_F1);
    1.23 -		keymap[B_F2_KEY]	= SDL_GetScancodeFromKey(SDLK_F2);
    1.24 -		keymap[B_F3_KEY]	= SDL_GetScancodeFromKey(SDLK_F3);
    1.25 -		keymap[B_F4_KEY]	= SDL_GetScancodeFromKey(SDLK_F4);
    1.26 -		keymap[B_F5_KEY]	= SDL_GetScancodeFromKey(SDLK_F5);
    1.27 -		keymap[B_F6_KEY]	= SDL_GetScancodeFromKey(SDLK_F6);
    1.28 -		keymap[B_F7_KEY]	= SDL_GetScancodeFromKey(SDLK_F7);
    1.29 -		keymap[B_F8_KEY]	= SDL_GetScancodeFromKey(SDLK_F8);
    1.30 -		keymap[B_F9_KEY]	= SDL_GetScancodeFromKey(SDLK_F9);
    1.31 -		keymap[B_F10_KEY]	= SDL_GetScancodeFromKey(SDLK_F10);
    1.32 -		keymap[B_F11_KEY]	= SDL_GetScancodeFromKey(SDLK_F11);
    1.33 -		keymap[B_F12_KEY]	= SDL_GetScancodeFromKey(SDLK_F12);
    1.34 -		keymap[B_PRINT_KEY]	= SDL_GetScancodeFromKey(SDLK_PRINTSCREEN);
    1.35 -		keymap[B_SCROLL_KEY]	= SDL_GetScancodeFromKey(SDLK_SCROLLLOCK);
    1.36 -		keymap[B_PAUSE_KEY]	= SDL_GetScancodeFromKey(SDLK_PAUSE);
    1.37 -		keymap[0x11]		= SDL_GetScancodeFromKey(SDLK_BACKQUOTE);
    1.38 -		keymap[0x12]		= SDL_GetScancodeFromKey(SDLK_1);
    1.39 -		keymap[0x13]		= SDL_GetScancodeFromKey(SDLK_2);
    1.40 -		keymap[0x14]		= SDL_GetScancodeFromKey(SDLK_3);
    1.41 -		keymap[0x15]		= SDL_GetScancodeFromKey(SDLK_4);
    1.42 -		keymap[0x16]		= SDL_GetScancodeFromKey(SDLK_5);
    1.43 -		keymap[0x17]		= SDL_GetScancodeFromKey(SDLK_6);
    1.44 -		keymap[0x18]		= SDL_GetScancodeFromKey(SDLK_7);
    1.45 -		keymap[0x19]		= SDL_GetScancodeFromKey(SDLK_8);
    1.46 -		keymap[0x1a]		= SDL_GetScancodeFromKey(SDLK_9);
    1.47 -		keymap[0x1b]		= SDL_GetScancodeFromKey(SDLK_0);
    1.48 -		keymap[0x1c]		= SDL_GetScancodeFromKey(SDLK_MINUS);
    1.49 -		keymap[0x1d]		= SDL_GetScancodeFromKey(SDLK_EQUALS);
    1.50 -		keymap[0x1e]		= SDL_GetScancodeFromKey(SDLK_BACKSPACE);
    1.51 -		keymap[0x1f]		= SDL_GetScancodeFromKey(SDLK_INSERT);
    1.52 -		keymap[0x20]		= SDL_GetScancodeFromKey(SDLK_HOME);
    1.53 -		keymap[0x21]		= SDL_GetScancodeFromKey(SDLK_PAGEUP);
    1.54 -		keymap[0x22]		= SDL_GetScancodeFromKey(SDLK_NUMLOCKCLEAR);
    1.55 -		keymap[0x23]		= SDL_GetScancodeFromKey(SDLK_KP_DIVIDE);
    1.56 -		keymap[0x24]		= SDL_GetScancodeFromKey(SDLK_KP_MULTIPLY);
    1.57 -		keymap[0x25]		= SDL_GetScancodeFromKey(SDLK_KP_MINUS);
    1.58 -		keymap[0x26]		= SDL_GetScancodeFromKey(SDLK_TAB);
    1.59 -		keymap[0x27]		= SDL_GetScancodeFromKey(SDLK_q);
    1.60 -		keymap[0x28]		= SDL_GetScancodeFromKey(SDLK_w);
    1.61 -		keymap[0x29]		= SDL_GetScancodeFromKey(SDLK_e);
    1.62 -		keymap[0x2a]		= SDL_GetScancodeFromKey(SDLK_r);
    1.63 -		keymap[0x2b]		= SDL_GetScancodeFromKey(SDLK_t);
    1.64 -		keymap[0x2c]		= SDL_GetScancodeFromKey(SDLK_y);
    1.65 -		keymap[0x2d]		= SDL_GetScancodeFromKey(SDLK_u);
    1.66 -		keymap[0x2e]		= SDL_GetScancodeFromKey(SDLK_i);
    1.67 -		keymap[0x2f]		= SDL_GetScancodeFromKey(SDLK_o);
    1.68 -		keymap[0x30]		= SDL_GetScancodeFromKey(SDLK_p);
    1.69 -		keymap[0x31]		= SDL_GetScancodeFromKey(SDLK_LEFTBRACKET);
    1.70 -		keymap[0x32]		= SDL_GetScancodeFromKey(SDLK_RIGHTBRACKET);
    1.71 -		keymap[0x33]		= SDL_GetScancodeFromKey(SDLK_BACKSLASH);
    1.72 -		keymap[0x34]		= SDL_GetScancodeFromKey(SDLK_DELETE);
    1.73 -		keymap[0x35]		= SDL_GetScancodeFromKey(SDLK_END);
    1.74 -		keymap[0x36]		= SDL_GetScancodeFromKey(SDLK_PAGEDOWN);
    1.75 -		keymap[0x37]		= SDL_GetScancodeFromKey(SDLK_KP_7);
    1.76 -		keymap[0x38]		= SDL_GetScancodeFromKey(SDLK_KP_8);
    1.77 -		keymap[0x39]		= SDL_GetScancodeFromKey(SDLK_KP_9);
    1.78 -		keymap[0x3a]		= SDL_GetScancodeFromKey(SDLK_KP_PLUS);
    1.79 -		keymap[0x3b]		= SDL_GetScancodeFromKey(SDLK_CAPSLOCK);
    1.80 -		keymap[0x3c]		= SDL_GetScancodeFromKey(SDLK_a);
    1.81 -		keymap[0x3d]		= SDL_GetScancodeFromKey(SDLK_s);
    1.82 -		keymap[0x3e]		= SDL_GetScancodeFromKey(SDLK_d);
    1.83 -		keymap[0x3f]		= SDL_GetScancodeFromKey(SDLK_f);
    1.84 -		keymap[0x40]		= SDL_GetScancodeFromKey(SDLK_g);
    1.85 -		keymap[0x41]		= SDL_GetScancodeFromKey(SDLK_h);
    1.86 -		keymap[0x42]		= SDL_GetScancodeFromKey(SDLK_j);
    1.87 -		keymap[0x43]		= SDL_GetScancodeFromKey(SDLK_k);
    1.88 -		keymap[0x44]		= SDL_GetScancodeFromKey(SDLK_l);
    1.89 -		keymap[0x45]		= SDL_GetScancodeFromKey(SDLK_SEMICOLON);
    1.90 -		keymap[0x46]		= SDL_GetScancodeFromKey(SDLK_QUOTE);
    1.91 -		keymap[0x47]		= SDL_GetScancodeFromKey(SDLK_RETURN);
    1.92 -		keymap[0x48]		= SDL_GetScancodeFromKey(SDLK_KP_4);
    1.93 -		keymap[0x49]		= SDL_GetScancodeFromKey(SDLK_KP_5);
    1.94 -		keymap[0x4a]		= SDL_GetScancodeFromKey(SDLK_KP_6);
    1.95 -		keymap[0x4b]		= SDL_GetScancodeFromKey(SDLK_LSHIFT);
    1.96 -		keymap[0x4c]		= SDL_GetScancodeFromKey(SDLK_z);
    1.97 -		keymap[0x4d]		= SDL_GetScancodeFromKey(SDLK_x);
    1.98 -		keymap[0x4e]		= SDL_GetScancodeFromKey(SDLK_c);
    1.99 -		keymap[0x4f]		= SDL_GetScancodeFromKey(SDLK_v);
   1.100 -		keymap[0x50]		= SDL_GetScancodeFromKey(SDLK_b);
   1.101 -		keymap[0x51]		= SDL_GetScancodeFromKey(SDLK_n);
   1.102 -		keymap[0x52]		= SDL_GetScancodeFromKey(SDLK_m);
   1.103 -		keymap[0x53]		= SDL_GetScancodeFromKey(SDLK_COMMA);
   1.104 -		keymap[0x54]		= SDL_GetScancodeFromKey(SDLK_PERIOD);
   1.105 -		keymap[0x55]		= SDL_GetScancodeFromKey(SDLK_SLASH);
   1.106 -		keymap[0x56]		= SDL_GetScancodeFromKey(SDLK_RSHIFT);
   1.107 -		keymap[0x57]		= SDL_GetScancodeFromKey(SDLK_UP);
   1.108 -		keymap[0x58]		= SDL_GetScancodeFromKey(SDLK_KP_1);
   1.109 -		keymap[0x59]		= SDL_GetScancodeFromKey(SDLK_KP_2);
   1.110 -		keymap[0x5a]		= SDL_GetScancodeFromKey(SDLK_KP_3);
   1.111 -		keymap[0x5b]		= SDL_GetScancodeFromKey(SDLK_KP_ENTER);
   1.112 -		keymap[0x5c]		= SDL_GetScancodeFromKey(SDLK_LCTRL);
   1.113 -		keymap[0x5d]		= SDL_GetScancodeFromKey(SDLK_LALT);
   1.114 -		keymap[0x5e]		= SDL_GetScancodeFromKey(SDLK_SPACE);
   1.115 -		keymap[0x5f]		= SDL_GetScancodeFromKey(SDLK_RALT);
   1.116 -		keymap[0x60]		= SDL_GetScancodeFromKey(SDLK_RCTRL);
   1.117 -		keymap[0x61]		= SDL_GetScancodeFromKey(SDLK_LEFT);
   1.118 -		keymap[0x62]		= SDL_GetScancodeFromKey(SDLK_DOWN);
   1.119 -		keymap[0x63]		= SDL_GetScancodeFromKey(SDLK_RIGHT);
   1.120 -		keymap[0x64]		= SDL_GetScancodeFromKey(SDLK_KP_0);
   1.121 -		keymap[0x65]		= SDL_GetScancodeFromKey(SDLK_KP_PERIOD);
   1.122 -		keymap[0x66]		= SDL_GetScancodeFromKey(SDLK_LGUI);
   1.123 -		keymap[0x67]		= SDL_GetScancodeFromKey(SDLK_RGUI);
   1.124 -		keymap[0x68]		= SDL_GetScancodeFromKey(SDLK_MENU);
   1.125 -		keymap[0x69]		= SDL_GetScancodeFromKey(SDLK_2); /* SDLK_EURO */
   1.126 -		keymap[0x6a]		= SDL_GetScancodeFromKey(SDLK_KP_EQUALS);
   1.127 -		keymap[0x6b]		= SDL_GetScancodeFromKey(SDLK_POWER);
   1.128 +        keymap[0x01]        = SDL_GetScancodeFromKey(SDLK_ESCAPE);
   1.129 +        keymap[B_F1_KEY]    = SDL_GetScancodeFromKey(SDLK_F1);
   1.130 +        keymap[B_F2_KEY]    = SDL_GetScancodeFromKey(SDLK_F2);
   1.131 +        keymap[B_F3_KEY]    = SDL_GetScancodeFromKey(SDLK_F3);
   1.132 +        keymap[B_F4_KEY]    = SDL_GetScancodeFromKey(SDLK_F4);
   1.133 +        keymap[B_F5_KEY]    = SDL_GetScancodeFromKey(SDLK_F5);
   1.134 +        keymap[B_F6_KEY]    = SDL_GetScancodeFromKey(SDLK_F6);
   1.135 +        keymap[B_F7_KEY]    = SDL_GetScancodeFromKey(SDLK_F7);
   1.136 +        keymap[B_F8_KEY]    = SDL_GetScancodeFromKey(SDLK_F8);
   1.137 +        keymap[B_F9_KEY]    = SDL_GetScancodeFromKey(SDLK_F9);
   1.138 +        keymap[B_F10_KEY]    = SDL_GetScancodeFromKey(SDLK_F10);
   1.139 +        keymap[B_F11_KEY]    = SDL_GetScancodeFromKey(SDLK_F11);
   1.140 +        keymap[B_F12_KEY]    = SDL_GetScancodeFromKey(SDLK_F12);
   1.141 +        keymap[B_PRINT_KEY]    = SDL_GetScancodeFromKey(SDLK_PRINTSCREEN);
   1.142 +        keymap[B_SCROLL_KEY]    = SDL_GetScancodeFromKey(SDLK_SCROLLLOCK);
   1.143 +        keymap[B_PAUSE_KEY]    = SDL_GetScancodeFromKey(SDLK_PAUSE);
   1.144 +        keymap[0x11]        = SDL_GetScancodeFromKey(SDLK_BACKQUOTE);
   1.145 +        keymap[0x12]        = SDL_GetScancodeFromKey(SDLK_1);
   1.146 +        keymap[0x13]        = SDL_GetScancodeFromKey(SDLK_2);
   1.147 +        keymap[0x14]        = SDL_GetScancodeFromKey(SDLK_3);
   1.148 +        keymap[0x15]        = SDL_GetScancodeFromKey(SDLK_4);
   1.149 +        keymap[0x16]        = SDL_GetScancodeFromKey(SDLK_5);
   1.150 +        keymap[0x17]        = SDL_GetScancodeFromKey(SDLK_6);
   1.151 +        keymap[0x18]        = SDL_GetScancodeFromKey(SDLK_7);
   1.152 +        keymap[0x19]        = SDL_GetScancodeFromKey(SDLK_8);
   1.153 +        keymap[0x1a]        = SDL_GetScancodeFromKey(SDLK_9);
   1.154 +        keymap[0x1b]        = SDL_GetScancodeFromKey(SDLK_0);
   1.155 +        keymap[0x1c]        = SDL_GetScancodeFromKey(SDLK_MINUS);
   1.156 +        keymap[0x1d]        = SDL_GetScancodeFromKey(SDLK_EQUALS);
   1.157 +        keymap[0x1e]        = SDL_GetScancodeFromKey(SDLK_BACKSPACE);
   1.158 +        keymap[0x1f]        = SDL_GetScancodeFromKey(SDLK_INSERT);
   1.159 +        keymap[0x20]        = SDL_GetScancodeFromKey(SDLK_HOME);
   1.160 +        keymap[0x21]        = SDL_GetScancodeFromKey(SDLK_PAGEUP);
   1.161 +        keymap[0x22]        = SDL_GetScancodeFromKey(SDLK_NUMLOCKCLEAR);
   1.162 +        keymap[0x23]        = SDL_GetScancodeFromKey(SDLK_KP_DIVIDE);
   1.163 +        keymap[0x24]        = SDL_GetScancodeFromKey(SDLK_KP_MULTIPLY);
   1.164 +        keymap[0x25]        = SDL_GetScancodeFromKey(SDLK_KP_MINUS);
   1.165 +        keymap[0x26]        = SDL_GetScancodeFromKey(SDLK_TAB);
   1.166 +        keymap[0x27]        = SDL_GetScancodeFromKey(SDLK_q);
   1.167 +        keymap[0x28]        = SDL_GetScancodeFromKey(SDLK_w);
   1.168 +        keymap[0x29]        = SDL_GetScancodeFromKey(SDLK_e);
   1.169 +        keymap[0x2a]        = SDL_GetScancodeFromKey(SDLK_r);
   1.170 +        keymap[0x2b]        = SDL_GetScancodeFromKey(SDLK_t);
   1.171 +        keymap[0x2c]        = SDL_GetScancodeFromKey(SDLK_y);
   1.172 +        keymap[0x2d]        = SDL_GetScancodeFromKey(SDLK_u);
   1.173 +        keymap[0x2e]        = SDL_GetScancodeFromKey(SDLK_i);
   1.174 +        keymap[0x2f]        = SDL_GetScancodeFromKey(SDLK_o);
   1.175 +        keymap[0x30]        = SDL_GetScancodeFromKey(SDLK_p);
   1.176 +        keymap[0x31]        = SDL_GetScancodeFromKey(SDLK_LEFTBRACKET);
   1.177 +        keymap[0x32]        = SDL_GetScancodeFromKey(SDLK_RIGHTBRACKET);
   1.178 +        keymap[0x33]        = SDL_GetScancodeFromKey(SDLK_BACKSLASH);
   1.179 +        keymap[0x34]        = SDL_GetScancodeFromKey(SDLK_DELETE);
   1.180 +        keymap[0x35]        = SDL_GetScancodeFromKey(SDLK_END);
   1.181 +        keymap[0x36]        = SDL_GetScancodeFromKey(SDLK_PAGEDOWN);
   1.182 +        keymap[0x37]        = SDL_GetScancodeFromKey(SDLK_KP_7);
   1.183 +        keymap[0x38]        = SDL_GetScancodeFromKey(SDLK_KP_8);
   1.184 +        keymap[0x39]        = SDL_GetScancodeFromKey(SDLK_KP_9);
   1.185 +        keymap[0x3a]        = SDL_GetScancodeFromKey(SDLK_KP_PLUS);
   1.186 +        keymap[0x3b]        = SDL_GetScancodeFromKey(SDLK_CAPSLOCK);
   1.187 +        keymap[0x3c]        = SDL_GetScancodeFromKey(SDLK_a);
   1.188 +        keymap[0x3d]        = SDL_GetScancodeFromKey(SDLK_s);
   1.189 +        keymap[0x3e]        = SDL_GetScancodeFromKey(SDLK_d);
   1.190 +        keymap[0x3f]        = SDL_GetScancodeFromKey(SDLK_f);
   1.191 +        keymap[0x40]        = SDL_GetScancodeFromKey(SDLK_g);
   1.192 +        keymap[0x41]        = SDL_GetScancodeFromKey(SDLK_h);
   1.193 +        keymap[0x42]        = SDL_GetScancodeFromKey(SDLK_j);
   1.194 +        keymap[0x43]        = SDL_GetScancodeFromKey(SDLK_k);
   1.195 +        keymap[0x44]        = SDL_GetScancodeFromKey(SDLK_l);
   1.196 +        keymap[0x45]        = SDL_GetScancodeFromKey(SDLK_SEMICOLON);
   1.197 +        keymap[0x46]        = SDL_GetScancodeFromKey(SDLK_QUOTE);
   1.198 +        keymap[0x47]        = SDL_GetScancodeFromKey(SDLK_RETURN);
   1.199 +        keymap[0x48]        = SDL_GetScancodeFromKey(SDLK_KP_4);
   1.200 +        keymap[0x49]        = SDL_GetScancodeFromKey(SDLK_KP_5);
   1.201 +        keymap[0x4a]        = SDL_GetScancodeFromKey(SDLK_KP_6);
   1.202 +        keymap[0x4b]        = SDL_GetScancodeFromKey(SDLK_LSHIFT);
   1.203 +        keymap[0x4c]        = SDL_GetScancodeFromKey(SDLK_z);
   1.204 +        keymap[0x4d]        = SDL_GetScancodeFromKey(SDLK_x);
   1.205 +        keymap[0x4e]        = SDL_GetScancodeFromKey(SDLK_c);
   1.206 +        keymap[0x4f]        = SDL_GetScancodeFromKey(SDLK_v);
   1.207 +        keymap[0x50]        = SDL_GetScancodeFromKey(SDLK_b);
   1.208 +        keymap[0x51]        = SDL_GetScancodeFromKey(SDLK_n);
   1.209 +        keymap[0x52]        = SDL_GetScancodeFromKey(SDLK_m);
   1.210 +        keymap[0x53]        = SDL_GetScancodeFromKey(SDLK_COMMA);
   1.211 +        keymap[0x54]        = SDL_GetScancodeFromKey(SDLK_PERIOD);
   1.212 +        keymap[0x55]        = SDL_GetScancodeFromKey(SDLK_SLASH);
   1.213 +        keymap[0x56]        = SDL_GetScancodeFromKey(SDLK_RSHIFT);
   1.214 +        keymap[0x57]        = SDL_GetScancodeFromKey(SDLK_UP);
   1.215 +        keymap[0x58]        = SDL_GetScancodeFromKey(SDLK_KP_1);
   1.216 +        keymap[0x59]        = SDL_GetScancodeFromKey(SDLK_KP_2);
   1.217 +        keymap[0x5a]        = SDL_GetScancodeFromKey(SDLK_KP_3);
   1.218 +        keymap[0x5b]        = SDL_GetScancodeFromKey(SDLK_KP_ENTER);
   1.219 +        keymap[0x5c]        = SDL_GetScancodeFromKey(SDLK_LCTRL);
   1.220 +        keymap[0x5d]        = SDL_GetScancodeFromKey(SDLK_LALT);
   1.221 +        keymap[0x5e]        = SDL_GetScancodeFromKey(SDLK_SPACE);
   1.222 +        keymap[0x5f]        = SDL_GetScancodeFromKey(SDLK_RALT);
   1.223 +        keymap[0x60]        = SDL_GetScancodeFromKey(SDLK_RCTRL);
   1.224 +        keymap[0x61]        = SDL_GetScancodeFromKey(SDLK_LEFT);
   1.225 +        keymap[0x62]        = SDL_GetScancodeFromKey(SDLK_DOWN);
   1.226 +        keymap[0x63]        = SDL_GetScancodeFromKey(SDLK_RIGHT);
   1.227 +        keymap[0x64]        = SDL_GetScancodeFromKey(SDLK_KP_0);
   1.228 +        keymap[0x65]        = SDL_GetScancodeFromKey(SDLK_KP_PERIOD);
   1.229 +        keymap[0x66]        = SDL_GetScancodeFromKey(SDLK_LGUI);
   1.230 +        keymap[0x67]        = SDL_GetScancodeFromKey(SDLK_RGUI);
   1.231 +        keymap[0x68]        = SDL_GetScancodeFromKey(SDLK_MENU);
   1.232 +        keymap[0x69]        = SDL_GetScancodeFromKey(SDLK_2); /* SDLK_EURO */
   1.233 +        keymap[0x6a]        = SDL_GetScancodeFromKey(SDLK_KP_EQUALS);
   1.234 +        keymap[0x6b]        = SDL_GetScancodeFromKey(SDLK_POWER);
   1.235  }
   1.236  
   1.237  SDL_Scancode HAIKU_GetScancodeFromBeKey(int32 bkey) {
   1.238 -	if(bkey > 0 && bkey < (int32)SDL_TABLESIZE(keymap)) {
   1.239 -		return keymap[bkey];
   1.240 -	} else {
   1.241 -		return SDL_SCANCODE_UNKNOWN;
   1.242 -	}
   1.243 +    if(bkey > 0 && bkey < (int32)SDL_TABLESIZE(keymap)) {
   1.244 +        return keymap[bkey];
   1.245 +    } else {
   1.246 +        return SDL_SCANCODE_UNKNOWN;
   1.247 +    }
   1.248  }
   1.249  
   1.250  int8 HAIKU_GetKeyState(int32 bkey) {
   1.251 -	if(bkey > 0 && bkey < KEYMAP_SIZE) {
   1.252 -		return keystate[bkey];
   1.253 -	} else {
   1.254 -		return SDL_RELEASED;
   1.255 -	}
   1.256 +    if(bkey > 0 && bkey < KEYMAP_SIZE) {
   1.257 +        return keystate[bkey];
   1.258 +    } else {
   1.259 +        return SDL_RELEASED;
   1.260 +    }
   1.261  }
   1.262  
   1.263  void HAIKU_SetKeyState(int32 bkey, int8 state) {
   1.264 -	if(bkey > 0 && bkey < KEYMAP_SIZE) {
   1.265 -		keystate[bkey] = state;
   1.266 -	}
   1.267 +    if(bkey > 0 && bkey < KEYMAP_SIZE) {
   1.268 +        keystate[bkey] = state;
   1.269 +    }
   1.270  }
   1.271  
   1.272  #ifdef __cplusplus