Actually handle more than 3 mouse buttons
The code in input_server was pretty much all set for this, but there was no way to configure the extra buttons. Add them to the mouse view in Input preferences (up to 5 buttons are handled now) Define a new B_MOUSE_BUTTON(n) macro to generate the bitmask for a given button (numbered from 1). Change-Id: I9091082277937d89b08464ff474e7bbb5db82401 Reviewed-on: https://review.haiku-os.org/c/haiku/+/180 Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
6ae1da352b
commit
5bbf7f1be0
@@ -29,6 +29,11 @@
|
||||
\var B_PRIMARY_MOUSE_BUTTON
|
||||
\brief Primary mouse button mask parameter.
|
||||
|
||||
The primary mouse button should be used for main operations (selecting,
|
||||
dragging, or opening objects).
|
||||
|
||||
This maps to B_MOUSE_BUTTON(1).
|
||||
|
||||
\since BeOS R3
|
||||
*/
|
||||
|
||||
@@ -37,6 +42,11 @@
|
||||
\var B_SECONDARY_MOUSE_BUTTON
|
||||
\brief Secondary mouse button mask parameter.
|
||||
|
||||
The secondary button should be used for additional operations on the
|
||||
pointed objects, such as popup menus.
|
||||
|
||||
This maps to B_MOUSE_BUTTON(2).
|
||||
|
||||
\since BeOS R3
|
||||
*/
|
||||
|
||||
@@ -45,10 +55,27 @@
|
||||
\var B_TERTIARY_MOUSE_BUTTON
|
||||
\brief Tertiary mouse button mask parameter.
|
||||
|
||||
The tertiary button should be used for clipboard paste.
|
||||
|
||||
This maps to B_MOUSE_BUTTON(3).
|
||||
|
||||
\since BeOS R3
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\var B_MOUSE_BUTTON(n)
|
||||
\brief Compute mouse button mask for button n
|
||||
|
||||
Buttons are numbered from 1 to 32.
|
||||
|
||||
Some mice may not have more than 2 buttons, so the extra buttons should
|
||||
only be used as shortcuts for actions that can be done in alternative ways.
|
||||
|
||||
\since Haiku R1
|
||||
*/
|
||||
|
||||
|
||||
// mouse transit
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user