Key Codes

General discussion for players of Oolite.

Moderators: winston, another_commander

Post Reply
User avatar
byronarn
Dangerous
Dangerous
Posts: 85
Joined: Thu Nov 18, 2010 6:08 am
Location: United States

Key Codes

Post by byronarn »

I need a list of the key codes for each button on my keyboard so that I can change the keyboard layout for when I am playing. Specifically, I need the right [Shift], right [CTRL], [ENTER], [PG UP], and [PG DWN].

It would probably be better to be given a link to the entire code list rather than someone just giving me the numbers for the buttons listed above. That way, if I decide to change it again later on, I won't have to post here again to ask what some other button is. :lol:

Thanks for any and all your help! :D
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

The web page I normally refer to is here
User avatar
byronarn
Dangerous
Dangerous
Posts: 85
Joined: Thu Nov 18, 2010 6:08 am
Location: United States

Post by byronarn »

Thargoid wrote:
The web page I normally refer to is here
That can't be right. That list has the arrow keys as being the 30s, whereas keyconfig.plist has the arrow keys as being in the 250s.
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6683
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

byronarn wrote:
Thargoid wrote:
The web page I normally refer to is here
That can't be right. That list has the arrow keys as being the 30s, whereas keyconfig.plist has the arrow keys as being in the 250s.
That's because Oolite uses some "special" key coding. I am not sure why this is (I found it this way when I first landed here, could be for Mac compatibility?), but if you want to have the full actual list used by the game, have a look at src/SDL/MyOpenGLView.h (look for the GameViewKeys enum) and inside the file SDL_keysym.h, found in the SDL-1.2.13.zip file inside deps/Cross-platform-deps/SDL in the Oolite source.
Post Reply