Skip to content

Commit

Permalink
always mark navigation key events as consumed
Browse files Browse the repository at this point in the history
  • Loading branch information
scheffle committed Aug 19, 2024
1 parent c44c77a commit b6dfe62
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions vstgui/lib/ctexteditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1265,6 +1265,15 @@ void TextEditorView::onKeyboardEvent (KeyboardEvent& event)
key |= STB_TEXTEDIT_K_SHIFT;
if (callSTB ([&] () { stb_textedit_key (this, &md.editState, key); }))
event.consumed = true;
if (!event.consumed)
{
if (event.virt == VirtualKey::Up || event.virt == VirtualKey::Down ||
event.virt == VirtualKey::PageUp || event.virt == VirtualKey::PageDown ||
event.virt == VirtualKey::Left || event.virt == VirtualKey::Right)
{
event.consumed = true;
}
}
}

//------------------------------------------------------------------------
Expand Down

0 comments on commit b6dfe62

Please sign in to comment.