Wintermute Engine Forum

General Category => General Discussion => Topic started by: odnorf on April 12, 2003, 02:54:17 PM

Title: key codes
Post by: odnorf on April 12, 2003, 02:54:17 PM
My games' interface works in two ways. The first one is an interface similar to the one in the wme_demo and the second one is only shortcuts (it's faster). But I have one problem. It seems that some key codes (ASCII codes???) are the same for different keys. For example "t" keycode is 116 same to F5, "u" keycode is 117 same to F6...etc. It's not a great issue but is there a way to solve this problem by scripting?

My english sucks so I only hope that what I said makes sense to you. If not please ask me to make it more clear (if I can).
Title: Re:key codes
Post by: Mnemonic on April 12, 2003, 04:06:44 PM
You can differentiate between those two by querying the Keyboard.Printable attribute. While it will return true for the "t" character, it will be false for the F5 key.