1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-21 14:45:07 +00:00

LibWeb: Allow inserting text at the cursor by typing characters :^)

This works everywhere right now, but it's obviously not going to stay
that way forever. :^)

Note that this does not advance the cursor correctly for whitespace
since the cursor is DOM-based and doesn't take whitespace collapsing
into account yet.
This commit is contained in:
Andreas Kling 2020-08-02 12:10:01 +02:00
parent 2c679d0c8b
commit bc299754f6
7 changed files with 35 additions and 0 deletions

View file

@ -335,6 +335,8 @@ void PageView::mouseup_event(GUI::MouseEvent& event)
void PageView::keydown_event(GUI::KeyEvent& event)
{
page().handle_keydown(event.key(), event.modifiers(), event.code_point());
if (event.modifiers() == 0) {
switch (event.key()) {
case Key_Home: