From a6fa50c31af627f7479d588065efcd6597f9cd3e Mon Sep 17 00:00:00 2001 From: scheffle Date: Mon, 11 Nov 2024 12:50:49 +0100 Subject: [PATCH] [fix] HOME and END go to line start/end on Windows and Linux --- vstgui/lib/ctexteditor.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/vstgui/lib/ctexteditor.cpp b/vstgui/lib/ctexteditor.cpp index 277b705f8..d9bdf3756 100644 --- a/vstgui/lib/ctexteditor.cpp +++ b/vstgui/lib/ctexteditor.cpp @@ -1269,12 +1269,26 @@ void TextEditorView::onKeyboardEvent (KeyboardEvent& event) { case VirtualKey::Home: { +#if !MAC + if (event.modifiers.has (ModifierKey::Control) == false) + { + key = static_cast (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 (event.virt) | VIRTUAL_KEY_BIT; + break; + } +#endif gotoLine (md.model.lines.size () - 1); event.consumed = true; break;