mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibGUI: Replace text attribute on KeyEvent with code_point attribute
This commit is contained in:
parent
0aad21fff2
commit
53227f400c
Notes:
sideshowbarker
2024-07-19 05:37:29 +09:00
Author: https://github.com/asliturk
Commit: 53227f400c
Pull-request: https://github.com/SerenityOS/serenity/pull/2541
3 changed files with 25 additions and 18 deletions
|
@ -889,8 +889,11 @@ void TextEditor::keydown_event(KeyEvent& event)
|
|||
return;
|
||||
}
|
||||
|
||||
if (!is_readonly() && !event.ctrl() && !event.alt() && !event.text().is_empty()) {
|
||||
insert_at_cursor_or_replace_selection(event.text());
|
||||
if (!is_readonly() && !event.ctrl() && !event.alt() && event.code_point() != 0) {
|
||||
StringBuilder sb;
|
||||
sb.append_codepoint(event.code_point());
|
||||
|
||||
insert_at_cursor_or_replace_selection(sb.to_string());
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue