(Notes) Notes (2018)

5-button mouse - a biggest problem of Linux

Nobody today can use ancient 3-button mouse, especially programmers. In Windows everybody use X-mouse, but in Linux similar program is absent. In Linux we can use additional button in Browser, but in stupid and meaningless function - Back. However, even for end-user main necessary function is Crtl-C and Ctrl-V and for programmers this is mandatory mouse function.

But no simple way to support this function in Linux, because KDE and Gnome not support 5-button mouse. So, in this form there are nothing function COPY, and there are nothing button4-button9.



But problem is dipper. Firstly, a lot of mouse (like A4 in my screen) has programmable button and special mouse driver is produced only for Windows. However not always mouse has programmable buttons. Most cheapest mouse has only number of button function.

There are simple Linux program Easystroke gestures. Goal of this program is absolutely another, it can use to accept gestures, but we can use this program to simple list all button in concrete mouse. For example, in my A4 tech mouse two additional mouse button Linux see as button 8 and button 9.


But how to map this buttons to command CTRL-C and CTRL-V ?



Solution


1.Install Imwheel (maper mouse input to keyboard input)

2.Install xbindkeys (event grabber to X-system)

3.Install xautomation (control X-system from command line)

4. Check button number by xev

5. Configure xbind (.xbindkeysrc)


   1:  #xev -event button
   2:  #xbindkeys_show
   3:  #killall xbindkeys && xbindkeys
   4:  "xte 'keydown Control_L' 'keydown C' 'keyup C' 'keyup Control_L'"
   5:    b:8
   6:  "xte 'keydown Control_L' 'keydown V' 'keyup V' 'keyup Control_L'"
   7:    b:9
   8:  "xte 'keydown Return' 'keyup Return'"
   9:    b:2
  10:  # For the benefit of emacs users: -*- shell-script -*-
  11:  ###########################
  12:  # xbindkeys configuration #
  13:  ###########################
  14:  #
  15:  # Version: 1.8.6
  ...  #

6. Add xdindkey to startup



Comments ( )
<00>  <01>  <02>  <03>  <04>  <05>  <06>  <07>  <08>  <09>  <10>  <11>  <12>  <13>  <14>  <15>  <16>  <17>  <18>  <19>  <20>  <21>  <22>  <23
Link to this page: //www.vb-net.com/5ButtonMouse/Index.htm
<SITEMAP>  <MVC>  <ASP>  <NET>  <DATA>  <KIOSK>  <FLEX>  <SQL>  <NOTES>  <LINUX>  <MONO>  <FREEWARE>  <DOCS>  <ENG>  <CHAT ME>  <ABOUT ME>  < THANKS ME>