Eike Cochu
Eike Cochu

Reputation: 3435

Objective-C/Cocoa: get key code

hi to set my applications hotkeys i need to convert a character into its keycode. how is that possible?

i have multiple checkboxes for the modifier keys and a small textfield for the key. but im sure i saw textfields which display the whole key combination which is pressed... because i didnt find anything i took a simple textfield. so now i need the key code of the char in this field.

(my idea: my own nstextview, overwrite keydown or keyup and get the [event keycode] or something similar. but i want to use a textfield!)

Upvotes: 0

Views: 2293

Answers (2)

Kirk Kelsey
Kirk Kelsey

Reputation: 4544

There is a small application called Key Codes that should do what you want.

Upvotes: 3

Dave DeLong
Dave DeLong

Reputation: 243156

I think you're looking for Shortcut Recorder. It's a control you can use in your interfaces for recording keyboard shortcuts.

Upvotes: 3

Related Questions