Carbon Key / Char Codes
Just in case anyone other than me still uses carbon events rather than NSevents (I plan to make the change soon-ish), here's how I figured out character codes for non-ascii characters:
the user presses a key, then:
if anyone's interested, here are a few:
#define key_UpArrow 30
#define key_DownArrow 31
#define key_LeftArrow 28
#define key_RightArrow 29
#define key_ForwardDelete 127
the user presses a key, then:
Code:
GetEventParameter(event,
kEventParamKeyMacCharCodes,
typeChar, nil,
sizeof(charCode), nil,
&charCode);
printf("%d\n", (int)charCode);if anyone's interested, here are a few:
#define key_UpArrow 30
#define key_DownArrow 31
#define key_LeftArrow 28
#define key_RightArrow 29
#define key_ForwardDelete 127
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Game name service. Free promo-codes! | Metalkille | 1 | 3,505 |
Feb 21, 2012 11:25 AM Last Post: Mediacitygames |
|
| Hex key codes | Leroy | 7 | 5,559 |
Apr 22, 2007 10:12 AM Last Post: Leroy |
|
| char array versus pointer to string constant question | WhatMeWorry | 7 | 6,641 |
Jan 30, 2007 12:26 PM Last Post: bronxbomber92 |
|
| Killing the char on the end of a char array | wyrmmage | 3 | 2,943 |
Dec 4, 2006 08:55 PM Last Post: wyrmmage |
|
| two-dimensional dynamic array, const char* adding | wyrmmage | 2 | 4,355 |
Nov 22, 2006 04:53 PM Last Post: wyrmmage |
|

