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.
This commit is contained in:
Martin Natano
2021-01-18 21:54:30 +01:00
parent aab36dae8d
commit 5c27754b39
+3
View File
@@ -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) );