Topic: Creating new input keys
Can I have an example on how to do that?
Let's say I want to be able to use the Numpad +.
Thanks.
You are not logged in. Please login or register.
Can I have an example on how to do that?
Let's say I want to be able to use the Numpad +.
Thanks.
If you have the event (which won't work for Numpad +)
you have to call input->createKey("MyKey"); in the plugin init
and then downKey("MyKey"); and upKey("MyKey"); depending on your event.
Numpad + is not recognized as a separate key in MGui-1,
but let's say you want to add "INSERT" that exist as a separate key and is missing from the input context :
open Maratis/Common/MGameWinEvents.h (in getKeyName, add MKEY_INSERT event returning "INSERT")
open Maratis/Common/MInput/MInput.cpp (in the constructor, add createKey("INSERT"))
No, I want to add keys that are not recognized. I was not able to find how Maratis read the input (from square one I mean, at the lowest level of abstraction) so I don't know what to change.
for MGui1 (trunk version) the lowest level is :
MGui/Sources/WIN32 for windows
MGui/Sources/X11 for linux
MGui/Sources/COCOA for osx
then it's Maratis/Common/MGameWinEvents.h and Maratis/Common/MInput/MInput.cpp
Ooook thank you.
Powered by PunBB, supported by Informer Technologies, Inc.
Currently installed 3 official extensions. Copyright © 2003–2009 PunBB.