Mercurial > sdl-ios-xcode
comparison src/video/cocoa/SDL_cocoakeyboard.m @ 2304:50f58ce12497
Christian's comment:
/* Actually returns a UInt32 containing two character codes (and two 'reserved' bytes), but we're only interested in the second (or only) one */
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Tue, 05 Feb 2008 07:30:50 +0000 |
parents | d87417504c75 |
children | fbe8ff44c519 |
comparison
equal
deleted
inserted
replaced
2303:d87417504c75 | 2304:50f58ce12497 |
---|---|
411 if (scancode == SDL_SCANCODE_UNKNOWN || | 411 if (scancode == SDL_SCANCODE_UNKNOWN || |
412 (keymap[scancode] & SDLK_SCANCODE_MASK)) { | 412 (keymap[scancode] & SDLK_SCANCODE_MASK)) { |
413 continue; | 413 continue; |
414 } | 414 } |
415 | 415 |
416 c = KeyTranslate (chr_data, i, &state); | 416 c = KeyTranslate (chr_data, i, &state) & 255; |
417 if (state) { | 417 if (state) { |
418 /* Dead key, process key up */ | 418 /* Dead key, process key up */ |
419 c = KeyTranslate (chr_data, i | 128, &state); | 419 c = KeyTranslate (chr_data, i | 128, &state) & 255; |
420 } | 420 } |
421 | 421 |
422 if (c != 0 && c != 0x10 && c < 256) { | 422 if (c != 0 && c != 0x10) { |
423 /* MacRoman to Unicode table, taken from X.org sources */ | 423 /* MacRoman to Unicode table, taken from X.org sources */ |
424 static const unsigned short macroman_table[128] = { | 424 static const unsigned short macroman_table[128] = { |
425 0xc4, 0xc5, 0xc7, 0xc9, 0xd1, 0xd6, 0xdc, 0xe1, | 425 0xc4, 0xc5, 0xc7, 0xc9, 0xd1, 0xd6, 0xdc, 0xe1, |
426 0xe0, 0xe2, 0xe4, 0xe3, 0xe5, 0xe7, 0xe9, 0xe8, | 426 0xe0, 0xe2, 0xe4, 0xe3, 0xe5, 0xe7, 0xe9, 0xe8, |
427 0xea, 0xeb, 0xed, 0xec, 0xee, 0xef, 0xf1, 0xf3, | 427 0xea, 0xeb, 0xed, 0xec, 0xee, 0xef, 0xf1, 0xf3, |