mirror of
https://github.com/RGBCube/serenity
synced 2025-05-21 15:45:07 +00:00
LibGUI: Replace text attribute on KeyEvent with code_point attribute
This commit is contained in:
parent
0aad21fff2
commit
53227f400c
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