Char to keycode looks pretty impossible... But I think I found a script that does it...
Why Char to keycode?
Well, for readability.
Example: keyBoardListener.BindKeyToFunction("K",true,theFunction);
K = the K key.
true = case sensitive. AKA, bind to capital K, not the k key.
theFunction = the function that will execute when you press the k key.
This Andy guy looks to have done a badass job at what I need:
http://stackoverflow.com/questions/1659444/get-keycode-from-string
http://stackoverflow.com/users/267998/andy-li
No comments:
Post a Comment