This commit is contained in:
Steve Checkoway
2006-09-15 19:03:21 +00:00
parent 89c3ef56d4
commit 87d3d0e043
@@ -101,18 +101,18 @@ wchar_t InputHandler::DeviceButtonToChar( DeviceButton button, bool bUseCurrentK
return c; return c;
} }
static LocalizedString HOME ( "DeviceButton", "Home" ); static LocalizedString HOME ( "DeviceButton", "Home" );
static LocalizedString END ( "DeviceButton", "End" ); static LocalizedString END ( "DeviceButton", "End" );
static LocalizedString UP ( "DeviceButton", "Up" ); static LocalizedString UP ( "DeviceButton", "Up" );
static LocalizedString DOWN ( "DeviceButton", "Down" ); static LocalizedString DOWN ( "DeviceButton", "Down" );
static LocalizedString SPACE ( "DeviceButton", "Space" ); static LocalizedString SPACE ( "DeviceButton", "Space" );
static LocalizedString SHIFT ( "DeviceButton", "Shift" ); static LocalizedString SHIFT ( "DeviceButton", "Shift" );
static LocalizedString CTRL ( "DeviceButton", "Ctrl" ); static LocalizedString CTRL ( "DeviceButton", "Ctrl" );
static LocalizedString ALT ( "DeviceButton", "Alt" ); static LocalizedString ALT ( "DeviceButton", "Alt" );
static LocalizedString INSERT ( "DeviceButton", "Insert" ); static LocalizedString INSERT ( "DeviceButton", "Insert" );
static LocalizedString DEL ( "DeviceButton", "Delete" ); static LocalizedString DEL ( "DeviceButton", "Delete" );
static LocalizedString PGUP ( "DeviceButton", "PgUp" ); static LocalizedString PGUP ( "DeviceButton", "PgUp" );
static LocalizedString PGDN ( "DeviceButton", "PgDn" ); static LocalizedString PGDN ( "DeviceButton", "PgDn" );
static LocalizedString BACKSLASH ( "DeviceButton", "Backslash" ); static LocalizedString BACKSLASH ( "DeviceButton", "Backslash" );
RString InputHandler::GetDeviceSpecificInputString( const DeviceInput &di ) RString InputHandler::GetDeviceSpecificInputString( const DeviceInput &di )
@@ -124,12 +124,12 @@ RString InputHandler::GetDeviceSpecificInputString( const DeviceInput &di )
{ {
wchar_t c = DeviceButtonToChar( di.button, false ); wchar_t c = DeviceButtonToChar( di.button, false );
if( c && c != L' ' ) // Don't show "Key " for space. if( c && c != L' ' ) // Don't show "Key " for space.
return InputDeviceToString(di.device) + " " + Capitalize( WStringToRString(wstring()+c) ); return InputDeviceToString( di.device ) + " " + Capitalize( WStringToRString(wstring()+c) );
} }
RString s = DeviceButtonToString(di.button); RString s = DeviceButtonToString( di.button );
if( di.device != DEVICE_KEYBOARD ) if( di.device != DEVICE_KEYBOARD )
s = InputDeviceToString(di.device) + " " + s; s = InputDeviceToString( di.device ) + " " + s;
return s; return s;
} }
@@ -137,25 +137,25 @@ RString InputHandler::GetLocalizedInputString( const DeviceInput &di )
{ {
switch( di.button ) switch( di.button )
{ {
case KEY_HOME: return HOME.GetValue(); case KEY_HOME: return HOME.GetValue();
case KEY_END: return END.GetValue(); case KEY_END: return END.GetValue();
case KEY_UP: return UP.GetValue(); case KEY_UP: return UP.GetValue();
case KEY_DOWN: return DOWN.GetValue(); case KEY_DOWN: return DOWN.GetValue();
case KEY_SPACE: return SPACE.GetValue(); case KEY_SPACE: return SPACE.GetValue();
case KEY_LSHIFT: case KEY_RSHIFT: return SHIFT.GetValue(); case KEY_LSHIFT: case KEY_RSHIFT: return SHIFT.GetValue();
case KEY_LCTRL: case KEY_RCTRL: return CTRL.GetValue(); case KEY_LCTRL: case KEY_RCTRL: return CTRL.GetValue();
case KEY_LALT: case KEY_RALT: return ALT.GetValue(); case KEY_LALT: case KEY_RALT: return ALT.GetValue();
case KEY_INSERT: return INSERT.GetValue(); case KEY_INSERT: return INSERT.GetValue();
case KEY_DEL: return DEL.GetValue(); case KEY_DEL: return DEL.GetValue();
case KEY_PGUP: return PGUP.GetValue(); case KEY_PGUP: return PGUP.GetValue();
case KEY_PGDN: return PGDN.GetValue(); case KEY_PGDN: return PGDN.GetValue();
case KEY_BACKSLASH: return BACKSLASH.GetValue(); case KEY_BACKSLASH: return BACKSLASH.GetValue();
default: default:
wchar_t c = DeviceButtonToChar(di.button,false); wchar_t c = DeviceButtonToChar( di.button, false );
if( c && c != L' ' ) // Don't show "Key " for space. if( c && c != L' ' ) // Don't show "Key " for space.
return Capitalize( WStringToRString(wstring()+c) ); return Capitalize( WStringToRString(wstring()+c) );
return DeviceButtonToString(di.button); return DeviceButtonToString( di.button );
} }
} }