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!)
I think you're looking for Shortcut Recorder. It's a control you can use in your interfaces for recording keyboard shortcuts.
There is a small application called Key Codes that should do what you want.
精彩评论