fix NumPad keys
This commit is contained in:
@@ -36,7 +36,7 @@ void InputHandler::ButtonPressed( DeviceInput di, bool Down )
|
||||
|
||||
wchar_t InputHandler::DeviceButtonToChar( DeviceButton button, bool bUseCurrentKeyModifiers )
|
||||
{
|
||||
wchar_t c;
|
||||
wchar_t c = '\0';
|
||||
switch( button )
|
||||
{
|
||||
default:
|
||||
@@ -53,6 +53,8 @@ wchar_t InputHandler::DeviceButtonToChar( DeviceButton button, bool bUseCurrentK
|
||||
case KEY_KP_EQUAL: c ='='; break;
|
||||
}
|
||||
|
||||
// Handle some default US keyboard modifiers for derived InputHandlers that
|
||||
// don't implement DeviceButtonToChar.
|
||||
if( bUseCurrentKeyModifiers )
|
||||
{
|
||||
bool bHoldingShift =
|
||||
@@ -95,7 +97,7 @@ wchar_t InputHandler::DeviceButtonToChar( DeviceButton button, bool bUseCurrentK
|
||||
|
||||
}
|
||||
|
||||
return '\0';
|
||||
return c;
|
||||
}
|
||||
|
||||
RString InputHandler::GetDeviceSpecificInputString( const DeviceInput &di )
|
||||
|
||||
@@ -679,7 +679,9 @@ wchar_t InputHandler_DInput::DeviceButtonToChar( DeviceButton button, bool bUseC
|
||||
ZERO( keys );
|
||||
if( bUseCurrentKeyModifiers )
|
||||
GetKeyboardState(keys);
|
||||
return ScancodeAndKeysToChar( i->ofs, keys );
|
||||
wchar_t c = ScancodeAndKeysToChar( i->ofs, keys );
|
||||
if( c )
|
||||
return c;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user