show "Space" if the character value is ' ', regardless of the KEY_ value

This commit is contained in:
Glenn Maynard
2006-06-15 06:17:46 +00:00
parent 1d4601eca7
commit 81ddf2d8e0
@@ -141,7 +141,6 @@ RString InputHandler::GetLocalizedInputString( const DeviceInput &di )
case KEY_END: return END.GetValue();
case KEY_UP: return UP.GetValue();
case KEY_DOWN: return DOWN.GetValue();
case KEY_SPACE: return SPACE.GetValue();
case KEY_LSHIFT: case KEY_RSHIFT: return SHIFT.GetValue();
case KEY_LCTRL: case KEY_RCTRL: return CTRL.GetValue();
case KEY_LALT: case KEY_RALT: return ALT.GetValue();
@@ -153,7 +152,12 @@ RString InputHandler::GetLocalizedInputString( const DeviceInput &di )
default:
wchar_t c = DeviceButtonToChar(di.button,false);
if( c )
return Capitalize( WStringToRString(wstring()+c) );
{
if( c == L' ' )
return Capitalize( SPACE.GetValue() ); // Don't show "Key " for space.
else
return Capitalize( WStringToRString(wstring()+c) );
}
return Capitalize( DeviceButtonToString(di.button) );
}