mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
Terminal/LibGUI::TextEditor: Add shift+return to search forwards
This adds support for shift+return key combo in single line TextEditor fields. Used in this case for searching backwards/forwards in the Terminal find window.
This commit is contained in:
committed by
Andreas Kling
parent
9550564767
commit
11fa3e4f92
Notes:
sideshowbarker
2024-07-18 17:00:21 +09:00
Author: https://github.com/metmo Commit: https://github.com/SerenityOS/serenity/commit/11fa3e4f923 Pull-request: https://github.com/SerenityOS/serenity/pull/7694 Issue: https://github.com/SerenityOS/serenity/issues/7465
@@ -731,6 +731,12 @@ void TextEditor::keydown_event(KeyEvent& event)
|
||||
if (event.key() == KeyCode::Key_Tab)
|
||||
return AbstractScrollableWidget::keydown_event(event);
|
||||
|
||||
if (event.modifiers() == KeyModifier::Mod_Shift && event.key() == KeyCode::Key_Return) {
|
||||
if (on_shift_return_pressed)
|
||||
on_shift_return_pressed();
|
||||
return;
|
||||
}
|
||||
|
||||
if (event.key() == KeyCode::Key_Return) {
|
||||
if (on_return_pressed)
|
||||
on_return_pressed();
|
||||
|
||||
Reference in New Issue
Block a user