mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 01:07:34 +00: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:
parent
9550564767
commit
11fa3e4f92
3 changed files with 11 additions and 0 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue