1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-18 21:15:09 +00:00

LibWeb: Send key events to the WebContent process

This makes contenteditable work in multi-process mode. :^)
This commit is contained in:
Andreas Kling 2020-08-03 19:58:59 +02:00
parent ea9ac3155d
commit 6e221adade
5 changed files with 15 additions and 0 deletions

View file

@ -76,6 +76,11 @@ void WebContentView::resize_event(GUI::ResizeEvent& event)
request_repaint();
}
void WebContentView::keydown_event(GUI::KeyEvent& event)
{
client().post_message(Messages::WebContentServer::KeyDown(event.key(), event.modifiers(), event.code_point()));
}
void WebContentView::mousedown_event(GUI::MouseEvent& event)
{
client().post_message(Messages::WebContentServer::MouseDown(to_content_position(event.position()), event.button(), event.buttons(), event.modifiers()));