ubuntu:mouse:determine_the_mouse_button_numbers
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
ubuntu:mouse:determine_the_mouse_button_numbers [2021/10/25 08:46] – peter | ubuntu:mouse:determine_the_mouse_button_numbers [2021/10/25 11:18] (current) – [Another Way to Determine the Mouse Buttons] peter | ||
---|---|---|---|
Line 42: | Line 42: | ||
* The result shows that the mouse has 9 buttons. | * The result shows that the mouse has 9 buttons. | ||
</ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
---- | ---- | ||
Line 48: | Line 51: | ||
<code bash> | <code bash> | ||
+ | xinput test | ||
+ | </ | ||
+ | |||
+ | returns: | ||
+ | |||
+ | <code bash> | ||
+ | ... | ||
+ | button press | ||
+ | button release 1 | ||
+ | ... | ||
+ | </ | ||
+ | |||
+ | <WRAP info> | ||
+ | **NOTE: | ||
+ | |||
+ | * In this case, the result shows **button press 1** when the left mouse button on the mouse was pressed. | ||
+ | * Determine the Button Number for every button. | ||
+ | |||
+ | * Usually left mouse button is shown as **button 1**. | ||
+ | * Usually middle mouse button is shown as **button 2**. | ||
+ | * Usually right mouse button is shown as **button 3**. | ||
+ | * Other buttons can be determined through trial and error. | ||
+ | * The scroll wheel on the mouse (both forwards and backward scrolls) also have a unique button id. | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Another Way to Determine the Mouse Buttons ===== | ||
+ | |||
+ | <code bash> | ||
+ | xev | grep button | ||
+ | |||
+ | or | ||
+ | |||
xev | xev | ||
</ | </ | ||
Line 61: | Line 100: | ||
---- | ---- | ||
- | ===== Identify Each Button Number | + | ==== Identify Each Button Number ==== |
With **xev** running, move the mouse pointer into the xev display and click each button on the mouse. | With **xev** running, move the mouse pointer into the xev display and click each button on the mouse. | ||
Line 74: | Line 113: | ||
**NOTE: | **NOTE: | ||
- | * In this case, the bottom line of the result shows **button 1**. | + | * In this case, the bottom line of the result shows **button 1** when the left mouse button on the mouse was pressed. |
+ | * Determine the Button Number for every button. | ||
* Usually left mouse button is shown as **button 1**. | * Usually left mouse button is shown as **button 1**. |
ubuntu/mouse/determine_the_mouse_button_numbers.1635151590.txt.gz · Last modified: 2021/10/25 08:46 by peter