mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:48:12 +00:00
WindowServer+LibGUI: Support the 4th and 5th mouse buttons
We'll call the "Back" and "Forward" since that's what they are normally mapped to in some other systems.
This commit is contained in:
parent
c5882d3a18
commit
67b92a7d5f
6 changed files with 16 additions and 0 deletions
|
@ -257,6 +257,8 @@ enum MouseButton : u8 {
|
|||
Left = 1,
|
||||
Right = 2,
|
||||
Middle = 4,
|
||||
Back = 8,
|
||||
Forward = 16,
|
||||
};
|
||||
|
||||
class KeyEvent final : public Event {
|
||||
|
|
|
@ -178,6 +178,10 @@ MouseButton to_gmousebutton(u32 button)
|
|||
return MouseButton::Right;
|
||||
case 4:
|
||||
return MouseButton::Middle;
|
||||
case 8:
|
||||
return MouseButton::Back;
|
||||
case 16:
|
||||
return MouseButton::Forward;
|
||||
default:
|
||||
ASSERT_NOT_REACHED();
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue