Confusion over MyGUI KeyCodes

simed

20-10-2011 11:32:20

I'm confused about KeyCode - values don't map to any normal convention (AFAIK) which is making things tricky when Widget::eventKeyButtonReleased only receives the KeyCode, not the Char.

I'm trying to write my codebase not to be totally designed/dependent around MyGUI and this is causing me problems. Is there an underlying logic that makes this make sense better - am I missing something really silly?

Altren

24-10-2011 12:42:31

MyGUI use same keycodes that used in OIS and in DirectX, as far as I remember.
And what about eventKeyButtonReleased - why do you need to know Char?

simed

24-10-2011 12:54:09

Because I want to know what key was released without having to translate MyGUI codes. What's the use of telling me the Char on key-down, but not key-up?

Altren

24-10-2011 15:04:01

In injectKeyRelease Char is not passed, so it is not possible to figure if any Char was "released". Also it is not good idea to track key press/key release by chars, since not all keys have characters (Tab, Shift, Ctrl, etc).