From 5c27754b3935da5c7064b6de5a197d1fa5319d97 Mon Sep 17 00:00:00 2001 From: Martin Natano Date: Mon, 18 Jan 2021 21:50:59 +0100 Subject: [PATCH] Mark keypad buttons as such in the input mapping screen Both the slash key and the numpad slash key were displayed as 'Key /', so it's not obvious to the user which key actually has been bound. Let's display them as 'Key /' and 'KP /' instead. Same for other KP keys. --- src/arch/InputHandler/InputHandler.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/arch/InputHandler/InputHandler.cpp b/src/arch/InputHandler/InputHandler.cpp index bfd575560d..e715a59928 100644 --- a/src/arch/InputHandler/InputHandler.cpp +++ b/src/arch/InputHandler/InputHandler.cpp @@ -128,6 +128,9 @@ RString InputHandler::GetDeviceSpecificInputString( const DeviceInput &di ) if( di.device == DEVICE_KEYBOARD ) { + if( di.button >= KEY_KP_C0 && di.button <= KEY_KP_ENTER ) + return DeviceButtonToString( di.button ); + wchar_t c = DeviceButtonToChar( di.button, false ); if( c && c != L' ' ) // Don't show "Key " for space. return InputDeviceToString( di.device ) + " " + Capitalize( WStringToRString(wstring()+c) );