Hex key codes

Member
Posts: 105
Joined: 2007.03
Post: #1
Hi, can anyone give me either a refference to, or the actual hex key codes for the standard apple keyboard layout, I've had an impossible time trying to find them so far.
Quote this message in a reply
Sage
Posts: 1,403
Joined: 2005.07
Post: #2
Damn...
well I found two links
http://classicteck.com/rbarticles/mackeyboard.php
http://www.cocoadev.com/index.pl?KeyCodesAndCharCodes

I dunno seems like no one can be bothered to press every key on the keyboard and make a list of it :[

Sir, e^iπ + 1 = 0, hence God exists; reply!
Quote this message in a reply
Sage
Posts: 1,232
Joined: 2002.10
Post: #3
What is the "Standard Apple keyboard layout"?
The US English keyboard? Desktop? Powerbook?
The UK English keyboard?
The Japanese keyboard?
The Norwegian keyboard?
etc...

If you're trying to map hex codes to key locations, you're going the wrong direction, because different keyboards have different keys, in different locations.
Quote this message in a reply
Moderator
Posts: 3,572
Joined: 2003.06
Post: #4
I don't understand exactly what you're looking for, but I guess if you're using Cocoa you could try adding this to your key view to get the hex code for whatever key(s) you type:
Code:
- (void)keyDown:(NSEvent *)theEvent
{
    unsigned int    i, characterCount;
    NSString        *characters;
    unichar         c;
    
    characters = [theEvent charactersIgnoringModifiers];
    characterCount = [characters length];
    for (i = 0; i < characterCount; i++)
    {
        c = [characters characterAtIndex:i];
        NSLog(@"%X", c);
    }
}
Quote this message in a reply
Member
Posts: 105
Joined: 2007.03
Post: #5
Thanks a lot for the link with the virtual key codes Uknown, that was very helpful.

arekkusu Wrote:What is the "Standard Apple keyboard layout"?

Keep in mind you are posting on a predominantly US Enlgish board, I think when I said "Standard Apple keyboard layout" it should be quite apparent to almost anyone that the key codes I needed were US English.

arekkusu Wrote:The US English keyboard? Desktop? Powerbook?
The UK English keyboard?
The Japanese keyboard?
The Norwegian keyboard?
etc...

Nice of you to ask, but in the future if I need Japanese key codes I'll make sure to specify it in my post. Aslo If I cared about the differences in laptop and desktop keyboards I would have posted that as well.


arekkusu Wrote:If you're trying to map hex codes to key locations, you're going the wrong direction, because different keyboards have different keys, in different location.

Again your reading way too deep into what I said, if I cared about the differences in specific keyboard layouts(which I don't) I would have mentioned that.
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #6
There's no need to be rude... it's not an unreasonable assumption that you're making a program for the global market, and you did *not* make it clear from your first post that you cared only about the keyboard you happen to have.
Quote this message in a reply
Moderator
Posts: 592
Joined: 2002.12
Post: #7
Leroy Wrote:Keep in mind you are posting on a predominantly US Enlgish board, I think when I said "Standard Apple keyboard layout" it should be quite apparent to almost anyone that the key codes I needed were US English.

For future reference you should be aware that this site has a very high amount of non US English traffic. The site was run from Japan for a very long time.

Some of the most active members are from the UK, New Zealand (a high percentage of the key knowledge (sorry no pun intended) seems to be down there!), Europe and Scandinavia.
Quote this message in a reply
Member
Posts: 105
Joined: 2007.03
Post: #8
OneSadCookie Wrote:There's no need to be rude...

I was not intending to be rude, I was simply responding to what I felt to be a needlessly antagonistic post with a bit of sarcasm.


BeyondCloister Wrote:For future reference you should be aware that this site has a very high amount of non US English traffic.

Okay, you got me on that one.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Carbon Key / Char Codes dave05 0 3,585 Sep 25, 2005 08:41 AM
Last Post: dave05