ubuntu:mouse:map_mouse_buttons
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
ubuntu:mouse:map_mouse_buttons [2021/10/25 09:14] – [Map the Mouse Buttons] peter | ubuntu:mouse:map_mouse_buttons [2021/10/26 14:07] (current) – peter | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Ubuntu - Mouse - Map Mouse Buttons ====== | ====== Ubuntu - Mouse - Map Mouse Buttons ====== | ||
+ | |||
+ | In most cases, | ||
+ | |||
+ | * Buttons 1, 2, 3 are interpreted as left, middle, right. | ||
+ | * Logical buttons 4, 5, 6, 7 are usually interpreted as scroll up, down, left, right. | ||
+ | * The fourth and fifth physical buttons on a device will thus send logical buttons 8 and 9. | ||
+ | |||
+ | ---- | ||
* [[Ubuntu: | * [[Ubuntu: | ||
Line 6: | Line 14: | ||
---- | ---- | ||
- | ===== Map the Mouse Buttons ===== | + | ===== Map a Mouse Button to Another Button ===== |
+ | |||
+ | This can be useful for changing | ||
+ | |||
+ | * The left and right buttons could be swapped around (the 3 and 1 are switched). | ||
+ | |||
+ | <code bash> | ||
+ | xinput set-button-map 8 3 2 1 4 5 6 7 8 9 | ||
+ | </ | ||
+ | |||
+ | <WRAP info> | ||
+ | **NOTE: | ||
+ | |||
+ | * The remaining **3 2 1 4 5 6 7 8 9** is the 9 mouse buttons as determined above. | ||
+ | |||
+ | * Usually this would be in the order **1 2 3**, where | ||
+ | * **1**: is the left mouse button. | ||
+ | * **2**: is the middle mouse button. | ||
+ | * **3**: is the right mouse button. | ||
+ | |||
+ | * Here, button 3 is swapped with button 1. | ||
+ | * This means that when the actual left button on the mouse is clicked it results in a right-click. | ||
+ | * Also, clicking on the actual right mouse button results in a left-click. | ||
+ | |||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Disable a Specific | ||
<code bash> | <code bash> | ||
Line 20: | Line 56: | ||
* This disables this button. | * This disables this button. | ||
- | * For left-handed people, | + | </ |
- | * **3 2 1 4 5 6 7 8 9** | + | |
+ | ---- | ||
+ | |||
+ | ====== Run at startup ====== | ||
+ | |||
+ | One approach is to create a shell script that performs | ||
+ | |||
+ | <code bash> | ||
+ | echo " | ||
+ | </ | ||
+ | |||
+ | Give it executable permission: | ||
+ | |||
+ | <code bash> | ||
+ | chmod +x leftmouseremap.sh | ||
+ | </ | ||
+ | |||
+ | <WRAP info> | ||
+ | **NOTE:** | ||
+ | |||
+ | * Follow any process to have this script run at boot if needed. | ||
+ | |||
+ | * Remember to configure ' | ||
+ | | ||
</ | </ | ||
+ | |||
---- | ---- | ||
Line 30: | Line 90: | ||
http:// | http:// | ||
+ | |||
+ | https:// | ||
+ | |||
+ | https:// |
ubuntu/mouse/map_mouse_buttons.1635153297.txt.gz · Last modified: 2021/10/25 09:14 by peter