Skip to content

Commit

Permalink
[fix] HOME and END go to line start/end on Windows and Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
scheffle committed Nov 11, 2024
1 parent ebd154d commit a6fa50c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions vstgui/lib/ctexteditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1269,12 +1269,26 @@ void TextEditorView::onKeyboardEvent (KeyboardEvent& event)
{
case VirtualKey::Home:
{
#if !MAC
if (event.modifiers.has (ModifierKey::Control) == false)
{
key = static_cast<uint32_t> (event.virt) | VIRTUAL_KEY_BIT;
break;
}
#endif
gotoLine (0);
event.consumed = true;
break;
}
case VirtualKey::End:
{
#if !MAC
if (event.modifiers.has (ModifierKey::Control) == false)
{
key = static_cast<uint32_t> (event.virt) | VIRTUAL_KEY_BIT;
break;
}
#endif
gotoLine (md.model.lines.size () - 1);
event.consumed = true;
break;
Expand Down

0 comments on commit a6fa50c

Please sign in to comment.