[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

OS X Convert Scan Code to Unicode

Posted on 2008-06-12
2
Medium Priority
?
1,525 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 6

Accepted Solution

by:
clausbroch earned 2000 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

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

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

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
In this article we will discuss some EI Capitan Mail app issues and provide some manual process to resolve them.
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.

649 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