1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 19:17:44 +00:00

LibWeb: Fire "keyup" events as well :^)

This was easy, now that we have KeyboardEvent.
This commit is contained in:
Andreas Kling 2021-09-28 15:39:35 +02:00
parent 554c344ffe
commit 0af0ee4293
10 changed files with 28 additions and 0 deletions

View file

@ -169,6 +169,11 @@ void ClientConnection::key_down(i32 key, unsigned int modifiers, u32 code_point)
page().handle_keydown((KeyCode)key, modifiers, code_point);
}
void ClientConnection::key_up(i32 key, unsigned int modifiers, u32 code_point)
{
page().handle_keyup((KeyCode)key, modifiers, code_point);
}
void ClientConnection::debug_request(const String& request, const String& argument)
{
if (request == "dump-dom-tree") {

View file

@ -47,6 +47,7 @@ private:
virtual void mouse_up(Gfx::IntPoint const&, unsigned, unsigned, unsigned) override;
virtual void mouse_wheel(Gfx::IntPoint const&, unsigned, unsigned, unsigned, i32) override;
virtual void key_down(i32, unsigned, u32) override;
virtual void key_up(i32, unsigned, u32) override;
virtual void add_backing_store(i32, Gfx::ShareableBitmap const&) override;
virtual void remove_backing_store(i32) override;
virtual void debug_request(String const&, String const&) override;

View file

@ -23,6 +23,7 @@ endpoint WebContentServer
mouse_wheel(Gfx::IntPoint position, unsigned button, unsigned buttons, unsigned modifiers, i32 wheel_delta) =|
key_down(i32 key, unsigned modifiers, u32 code_point) =|
key_up(i32 key, unsigned modifiers, u32 code_point) =|
debug_request(String request, String argument) =|
get_source() =|