mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:38:12 +00:00
LibGUI: Only reset GlyphMapWidget selection on Escape
and when using unmodified arrows.
This commit is contained in:
parent
4c81fbc8c4
commit
673afffd5a
2 changed files with 10 additions and 1 deletions
|
@ -263,7 +263,15 @@ void GlyphMapWidget::keydown_event(KeyEvent& event)
|
|||
return;
|
||||
}
|
||||
|
||||
if (!event.ctrl() && !event.shift() && event.key() != KeyCode::Key_Delete) {
|
||||
if (event.key() == KeyCode::Key_Escape) {
|
||||
m_selection.set_size(1);
|
||||
m_selection.set_start(m_active_glyph);
|
||||
if (on_escape_pressed)
|
||||
on_escape_pressed();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!event.modifiers() && event.is_arrow_key()) {
|
||||
m_selection.set_size(1);
|
||||
m_selection.set_start(m_active_glyph);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue