1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:17:36 +00:00

Userland: Actually use the correct character map index from KeyEvent

Instead of using a scan code, which for scan code set 2 will not
represent the expected character mapping index, we could just use
another variable in the KeyEvent structure that correctly points to the
character index.

This change is mostly relevant to the KeyboardMapper application, and
also to the WindowServer code, as both handle KeyEvents and need to
use the character mapping index in various situations.
This commit is contained in:
Liav A 2023-04-14 18:57:41 +03:00 committed by Andrew Kaster
parent b89cc81674
commit 60a96b3786
9 changed files with 41 additions and 32 deletions

View file

@ -33,8 +33,8 @@ private:
virtual void mouse_wheel(i32, Gfx::IntPoint, u32, u32, u32, i32, i32, i32, i32) override;
virtual void window_entered(i32) override;
virtual void window_left(i32) override;
virtual void key_down(i32, u32, u32, u32, u32) override;
virtual void key_up(i32, u32, u32, u32, u32) override;
virtual void key_down(i32, u32, u32, u8, u32, u32) override;
virtual void key_up(i32, u32, u32, u8, u32, u32) override;
virtual void window_activated(i32) override;
virtual void window_deactivated(i32) override;
virtual void window_input_preempted(i32) override;