Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to realize the interchange of left and right mouse buttons in linux

Shulou Source: shulou.com Published: 2022-06-01 20:49:35 10月01日 Update

How to realize the interchange of left and right mouse buttons in linux? Many novices are not very clear about this. In order to help you solve this problem, the following editor will explain it in detail. People with this need can come and learn. I hope you can gain something.

Lr= "l" for id in `xinput list | grep "pointer" | sed-r's pointer. Roomid = ([0-9] +). * /\ 1bot'` Do if [[$lr = = "r"]] then xinput-- set-button-map $id 1 2 32 > / dev/null else xinput-- set-button-map $id 3 2 12 > / dev/null fidonefilepath=$0if [[$lr = = "r"]] then echo "now is right hand." Sed-I'1s now is left hand LR = "r" / lr= "l" /'$filepathelse echo "now is left hand." Sed-I'1s bind LR = "l" / lr= "r" /'$filepathfi

Ubuntu command toggles the left and right mouse button

Without saying much, let's start switching:

First of all, let's switch the mouse to the backhand (the word backhand is used here because some people may be left-handed, some may be right-handed "and right-handed? "):

Xmodmap-e'pointer = 3 21'

Please take out your little mouse and shake it a little bit

Have you switched to the backhand?!

Okay, let's switch back to:

Xmodmap-e'pointer = 1 23'

Please click again violently!

Are you fat again?!

But you have to enter 29 characters for each switch, Yazi butterfly!

Then give them a little nickname!

# filename .bashrc

Alias mr= "xmodmap-e'pointer = 3 21'"

Alias ml= "xmodmap-e 'pointer = 1 23'"

What is Linux system Linux is a free-to-use and free-spread UNIX-like operating system, is a POSIX-based multi-user, multi-task, multi-threaded and multi-CPU operating system, using Linux can run major Unix tools, applications and network protocols.

Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.

Tags: Toggle mouse backhand system operating system help support solid clear free reason task content again command character for this tools tool software left-handed Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn Xiaomi Microsoft MySQL OPPO Reno