Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion SIDFactoryII/source/foundation/input/keyboard_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ namespace Foundation
return false;
if (static_cast<bool>(inModifiersToCheckAgainst & Keyboard::Alt) != static_cast<bool>(inModifierMask & Keyboard::Alt))
return false;
if (static_cast<bool>(inModifiersToCheckAgainst & Keyboard::Cmd) != static_cast<bool>(inModifierMask & Keyboard::Cmd))
return false;

return true;
}
Expand Down Expand Up @@ -77,4 +79,4 @@ namespace Foundation
return 0;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,21 @@ namespace Editor
switch (key_event)
{
case SDLK_DOWN:
DoCursorDown();
m_RequireRefresh = true;
return true;
if (inKeyboard.IsModifierEmpty())
{
DoCursorDown();
m_RequireRefresh = true;
return true;
}
break;
case SDLK_UP:
DoCursorUp();
m_RequireRefresh = true;
return true;
if (inKeyboard.IsModifierEmpty())
{
DoCursorUp();
m_RequireRefresh = true;
return true;
}
break;
case SDLK_PAGEDOWN:
DoPageDown();
m_RequireRefresh = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,14 @@ namespace Editor
switch(key_event)
{
case SDLK_DOWN:
if (DoCursorDown(1))
if (inKeyboard.IsModifierEmpty() && DoCursorDown(1))
{
m_RequireRefresh = true;
consume = true;
}
break;
case SDLK_UP:
if (DoCursorUp(1))
if (inKeyboard.IsModifierEmpty() && DoCursorUp(1))
{
m_RequireRefresh = true;
consume = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,20 +147,32 @@ namespace Editor
switch (key_event)
{
case SDLK_LEFT:
m_CursorX = m_CursorX > 0 ? (m_CursorX - 1) : 0;
consume = true;
if (inKeyboard.IsModifierEmpty())
{
m_CursorX = m_CursorX > 0 ? (m_CursorX - 1) : 0;
consume = true;
}
break;
case SDLK_RIGHT:
m_CursorX = m_CursorX < m_MaxCursorX ? (m_CursorX + 1) : m_MaxCursorX;
consume = true;
if (inKeyboard.IsModifierEmpty())
{
m_CursorX = m_CursorX < m_MaxCursorX ? (m_CursorX + 1) : m_MaxCursorX;
consume = true;
}
break;
case SDLK_UP:
DoCursorUp();
consume = true;
if (inKeyboard.IsModifierEmpty())
{
DoCursorUp();
consume = true;
}
break;
case SDLK_DOWN:
DoCursorDown();
consume = true;
if (inKeyboard.IsModifierEmpty())
{
DoCursorDown();
consume = true;
}
break;
case SDLK_INSERT:
if (m_InsertDeleteEnabled)
Expand Down