mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-28 10:35:43 -05:00
Fixup for previous commit.
This commit is contained in:
parent
81b9086de5
commit
2443718b9f
1 changed files with 14 additions and 8 deletions
|
@ -308,16 +308,22 @@ namespace entry
|
|||
{
|
||||
m_eventQueue.postExitEvent();
|
||||
}
|
||||
else if (0 != (modifiers & (Modifier::LeftShift|Modifier::RightShift) )
|
||||
&& ( (Key::Key0 <= key && key <= Key::KeyZ) || (Key::Esc <= key && key <= Key::Minus) ) )
|
||||
{
|
||||
m_eventQueue.postCharEvent(s_defaultWindow, 1, pressedChar);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_eventQueue.postKeyEvent(s_defaultWindow, key, modifiers, true);
|
||||
return false;
|
||||
enum { ShiftMask = Modifier::LeftShift|Modifier::RightShift };
|
||||
const bool nonShiftModifiers = (0 != (modifiers&(~ShiftMask) ) );
|
||||
const bool isCharPressed = (Key::Key0 <= key && key <= Key::KeyZ) || (Key::Esc <= key && key <= Key::Minus) ;
|
||||
const bool isText = isCharPressed && !nonShiftModifiers;
|
||||
if (isText)
|
||||
{
|
||||
m_eventQueue.postCharEvent(s_defaultWindow, 1, pressedChar);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_eventQueue.postKeyEvent(s_defaultWindow, key, modifiers, true);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue