Solved

OS X Convert Scan Code to Unicode

Posted on 2008-06-12
2
1,487 Views
Last Modified: 2013-12-26
I'm working in OSX and I've got an event handler on an OpenGL window. When a key is pressed, I end up with a scancode when I do GetEventParameter(event, kEventParamKeyCode, ...). I want to convert this scancode into unicode based on the keyboard profile. How can I do this?

Thanks.
0
Comment
Question by:Evlich
2 Comments
 
LVL 6

Accepted Solution

by:
clausbroch earned 500 total points
ID: 21811228
If you use kEventParamUnicodes instead of kEventParamKeyCode you will get the unicode character directly. Mac OS X will automatically take the current keyboard layout into account.

For more information you can have a look at this Q&A from Apple:
http://developer.apple.com/qa/qa2005/qa1446.html
0
 
LVL 1

Author Comment

by:Evlich
ID: 21817279
Excellent, this is exactly what I'm looking for. Is there a way to discriminate the function keys? They seem to all report Unicode #16.

Thanks.
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
The error "There was an error performing the update" occurred on a Mac OS X client workstation running  Symantec AntiVirus for Mac (http://www.symantec.com/business/products/purchasing.jsp?pcid=pcat_security&pvid=825_1) - the Enterprise product vers…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now