Jump to content
  • Advertisement
Sign in to follow this  
Futurulus

A quick portability question -- keyboard codes

This topic is 4060 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I'm making a program for Windows that I hope to later port to Linux and Mac. I'm trying to plan ahead by making my generic keycode enums fit as closely as possible to as many platform-specific keycodes as possible. I currently have the documentation for the WinAPI "VK_" keycodes, and I'm looking for something similar for Mac and for the X window system. I'm pretty sure X has very similar "XK_" codes, but I've been wading through [google], Wikipedia, and others for days and I haven't found anything useful. Can someone point me to a page where I can find this? I know this is probably the least of my problems when writing cross-platform programs, and especially when porting from Windows, but every little thing helps!

Share this post


Link to post
Share on other sites
Advertisement
The key-codes under Carbon on OS X are here, though I could swear there are some kConstants somewhere.

Edit: Here are the masks and such for Cocoa development.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!