Hi,
I'm trying to do a key binding system and Do It Right, like most commercial games do. Is that currently possible with OIS?
First, I have problems creating a default key binding file. I want the console mapped to the key left of number 1. It shouldn't matter which keyboard layout the player has. I want the raw keycodes for this purpose, where no layouts have been applied. The location of the key is more important than the text on top of it. OIS doesn't even seem to have a keycode for that particular key (§) in the scandinavian layout, so I'm forced to use translated characters in key binding files. That means that I'd need a default key binding file for every keyboard layout there is. By the way, is there a reason why open source input systems always use their own keycodes?
Second, I want to show those keys on screen as text. There's a function 'getAsString', but it doesn't seem to return anything consistent when it encounters an unknown key. Usually the returned string is called 'section' for some reason. (This might be fixed in a CVS release, though?) In the case of an unknown key, I'd like to show the text 'key x', where x is the unicode character for the key, or maybe just print an unique keycode.
I'd also like to know which platforms currently support Unicode translation, since that's quite essential especially if you can't trust that every key in a keyboard has its unique keycode.
On a side note, if you know of a clever way of doing key bindings in C++, please share it!