Results 1 to 8 of 8

Thread: [SOLVED] Make "xinput set-button-map" permanent?

  1. #1

    [SOLVED] Make "xinput set-button-map" permanent?

    Afternoon,

    My Evoluent Mouse works fine - but I need to remap the buttons to get the best use of it.

    I use
    Code:
    xinput set-button-map "Kingsis Peripherals  Evoluent VerticalMouse 3" 0 2 4 3 5 6 7 8 1
    to map the buttons to my preference.

    However, when I reboot, the mapping disappears. Is there any way to make xinput run during boot?

    Running 8.10 on a Dell Latitude D430.

    Thanks

    T
    Last edited by terryeden; November 26th, 2008 at 10:34 AM. Reason: Added distro info.

  2. #2
    Join Date
    Nov 2008
    Beans
    1

    Re: Make "xinput set-button-map" permanent?

    I'd like to know too. I think I've seen some references to putting it in a login script (like one of the rc scripts in /etc/), but I'm not sure that would do too well for me since I also lose my button map when the computer wakes up from sleep.
    Last edited by S_A_M; November 27th, 2008 at 06:16 PM. Reason: updated reference to rc... was mixed up with another distro

  3. #3

    Re: Make "xinput set-button-map" permanent?

    I used the method described at http://the-moni-blog.blogspot.com/20...r-tm-c300.html

    Basically, go to System - Preferences - Sessions.

    On the "Startup Programs" tab, click "Add".

    In the "Command" field type / paste
    Code:
    /usr/X11R6/bin/xinput set-button-map "Kingsis Peripherals  Evoluent VerticalMouse 3" 0 2 3 4 5 6 7 8 1
    (Or whatever your preferences are).

    Give it a Name and a Comment so you remember what you have done, then hit "Save".

    The next time you reboot or log in - your mouse will know your preferences!

    Hurrah!

  4. #4
    Join Date
    Sep 2006
    Location
    Sonoma, Ca
    Beans
    2

    Re: [SOLVED] Make "xinput set-button-map" permanent?

    If you're running fluxbox, follow the above instructions and enter in your ~/.fluxbox/startup file.

  5. #5
    Join Date
    Jun 2008
    Beans
    10

    Re: [SOLVED] Make "xinput set-button-map" permanent?

    Although the above solution provided by terryeden works, I found another way of doing it without having to add to you're startup programs and is probably the 'correct' way of doing it. I have an Evoluent Vertical Mouse (version 2) and in Jaunty (9.04) I got it to work with the following fdi file contents which is placed in /etc/hal/fdi/policy/:-

    <?xml version="1.0" encoding="ISO-8859-1"?>
    <deviceinfo version="0.2">
    <device>
    <match key="info.product" string="Kingsis Peripherals Evoluent VerticalMouse 2">
    <merge key="input.x11_driver" type="string">evdev</merge>
    <merge key="input.x11_options.ButtonMapping" type="string">1 2 3 4 5 6 7 9 8</merge>
    <merge key="input.x11_options.EmulateWheel" type="string">true</merge>
    <merge key="input.x11_options.EmulateWheelButton" type="string">8</merge>
    <merge key="input.x11_options.Emulate3Buttons" type="string">false</merge>
    </match>
    </device>
    </deviceinfo>
    I named the above file as evoluent2-x11-mouse.fdi.

    This method is a direct replacement for the old input parameters one previously entered in the xorg.conf file. A more detailed explanation can be found here:- http://volatileint.blogspot.com/2009...s-for-hal.html
    Last edited by nitindb; June 10th, 2009 at 08:58 AM. Reason: Button mapping was previously not correct

  6. #6
    Join Date
    Aug 2005
    Location
    Bardstown, KY, USA
    Beans
    200
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: [SOLVED] Make &quot;xinput set-button-map&quot; permanent?

    Sorry to necro this thread, but I thought it'd be better than starting a whole new one.

    Can anyone tell me how to do this in KDE 4.x? I'm trying to add "xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Synaptics Tap Action" 8 0 0 0 0 0 0 0" to my startup so I don't have to run it manually each time I login (this is to disable the touchpad tap-to-click option).

    /Kevin

  7. #7

    Re: [SOLVED] Make &quot;xinput set-button-map&quot; permanent?

    It seems that the update to 10.10 has fundamentally broken this. See http://daniel.hahler.de/hal-configur...erticalmouse-3

    Additionally, xinput seems to have a but preventing it from recognising the device name. As the id changes every time you re-plug your USB mouse, this is very annoying.

    This is a quick fix for it.

    This command will look for the ID of your mouse, then map the buttons to your choosing.

    Code:
    xinput set-button-map `xinput list | grep 'Kingsis Peripherals  Evoluent VerticalMouse 3' | grep -o [0-9][0-9]` 0 2 3 4 5 6 7 8 1 10 11 12 13

  8. #8
    Join Date
    Jan 2008
    Location
    Groningen, Netherlands
    Beans
    13
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: [SOLVED] Make &quot;xinput set-button-map&quot; permanent?

    Quote Originally Posted by terryeden View Post
    It seems that the update to 10.10 has fundamentally broken this. See http://daniel.hahler.de/hal-configur...erticalmouse-3

    Additionally, xinput seems to have a but preventing it from recognising the device name. As the id changes every time you re-plug your USB mouse, this is very annoying.

    This is a quick fix for it.

    This command will look for the ID of your mouse, then map the buttons to your choosing.

    Code:
    xinput set-button-map `xinput list | grep 'Kingsis Peripherals  Evoluent VerticalMouse 3' | grep -o [0-9][0-9]` 0 2 3 4 5 6 7 8 1 10 11 12 13
    Thanks, this worked great. Just one problem for me: my mouse was listed twice in xinput list, so I had to slightly modify your code.

    Code:
    for id in `/usr/bin/xinput list | /bin/grep 'Logitech USB Receiver' | /bin/grep -o [0-9][0-9]`; do xinput set-button-map $id 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 17 16; done;

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •