mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 04:39:06 +00:00
TextEditor: Allow typing AltGr+letter into editor
Previous check did not allow AltGr+letter to be used due to AltGr being emulated as Ctrl+Alt. That caused .ctrl() to be true. In the new code we check that ctrl() is not set or if it is set, it is with altgr() and if so, we pass the character into the editor.
This commit is contained in:
parent
235e977e3a
commit
26be6176ad
Notes:
sideshowbarker
2024-07-19 17:05:31 +09:00
Author: https://github.com/pawlos 🔰
Commit: 26be6176ad
Pull-request: https://github.com/SerenityOS/serenity/pull/14025
1 changed files with 2 additions and 1 deletions
|
@ -931,7 +931,8 @@ void TextEditor::keydown_event(KeyEvent& event)
|
|||
return;
|
||||
}
|
||||
|
||||
if (!event.ctrl() && !event.alt() && event.code_point() != 0) {
|
||||
// AltGr is emulated as Ctrl+Alt; if Ctrl is set check if it's not for AltGr
|
||||
if ((!event.ctrl() || event.altgr()) && !event.alt() && event.code_point() != 0) {
|
||||
TemporaryChange change { m_should_keep_autocomplete_box, true };
|
||||
add_code_point(event.code_point());
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue