-
Notifications
You must be signed in to change notification settings - Fork 346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added a simple printing of the key/button pressed #567
Conversation
neo/framework/KeyInput.h
Outdated
@@ -312,6 +312,7 @@ class idKeyInput { | |||
static const char * BindingFromKey( const char *key ); | |||
static bool KeyIsBoundTo( int keyNum, const char *binding ); | |||
static void WriteBindings( idFile *f ); | |||
static void KeyReveal( int keyNum ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please indent with a tab, like the lines above
neo/framework/KeyInput.cpp
Outdated
*/ | ||
void idKeyInput::KeyReveal( int keyNum ) { | ||
const char* keyName = KeyNumToString( keyNum, false ); | ||
common->Printf( "pressed the \"%s\"key.\n", keyName ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add a space between \"%s\"
and key
good idea, apart from the small issues I commented on this looks good to me :) |
now done, i made the requested changes changes :) |
merged, thank you! :) |
added a simple helper print method to know what key/button is being pressed, controlled via a bool cvar "in_namePressed" 1 or 0. I tested it and it works with keyboard, mouse and gamepad.
added a simple helper print method to know what key/button is being pressed, controlled via a bool cvar "in_namePressed" 1 or 0, I tested it and it works with keyboard, mouse and gamepad.