SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2011-07-07 19:42:10

WASD
Member
From: Sweden
Registered: 2011-07-04
Posts: 20
Website

[Solved] Binding a mousebutton to a command

Edit: Thanks to machinebacon for the solution in post 9.

I am running #! Statler 64bit with OpenBox. I have an Mx518 mouse that has a button that does nothing. When I test it in xev I get this:

ButtonPress event, serial 39, synthetic NO, window 0x2e00001,
    root 0x11d, subw 0x0, time 22183158, (168,0), root:(293,459),
    state 0x10, button 10, same_screen YES

ButtonRelease event, serial 39, synthetic NO, window 0x2e00001,
    root 0x11d, subw 0x0, time 22183398, (168,0), root:(293,459),
    state 0x10, button 10, same_screen YES

I would like to bind it to a command in the same way that this thread explains how to bind a keyboard key to a command: http://crunchbanglinux.org/forums/topic … e-buttons/ But I can't figure out how to do it with mouse buttons.

Last edited by WASD (2011-07-11 10:32:00)

Offline

Help fund CrunchBang, donate to the project!

#2 2011-07-07 19:55:03

machinebacon
#! unstable
From: China
Registered: 2009-07-02
Posts: 6,825
Website

Re: [Solved] Binding a mousebutton to a command

Is it the middle button?


Sweaty lads picking up the soap | I love the new "Ignore user" button

Offline

#3 2011-07-07 20:01:09

WASD
Member
From: Sweden
Registered: 2011-07-04
Posts: 20
Website

Re: [Solved] Binding a mousebutton to a command

It is in the middle but it's not middle click. It's the small round one above the logitech logo: http://www.everythingusb.com/images/lis … lution.jpg

It only does something if you use windows along with a logitech software. Every other button works as intended in #! without having to fiddle with any settings.

Last edited by WASD (2011-07-07 20:06:15)

Offline

#4 2011-07-07 20:06:55

machinebacon
#! unstable
From: China
Registered: 2009-07-02
Posts: 6,825
Website

Re: [Solved] Binding a mousebutton to a command

Ah, a Logitech. Have you tried

sudo apt-get install lomoco ? Thats for Logitech mice.


Sweaty lads picking up the soap | I love the new "Ignore user" button

Offline

#5 2011-07-07 20:12:09

machinebacon
#! unstable
From: China
Registered: 2009-07-02
Posts: 6,825
Website

Re: [Solved] Binding a mousebutton to a command

http://ubuntuforums.org/showthread.php?t=1039534

This is similar to your problem, I think.


Sweaty lads picking up the soap | I love the new "Ignore user" button

Offline

#6 2011-07-07 20:14:32

WASD
Member
From: Sweden
Registered: 2011-07-04
Posts: 20
Website

Re: [Solved] Binding a mousebutton to a command

I installed it but found nothing interesting. I simply want to bind one button to a command. The rest of the mouse is perfectly fine.

I'll have a look at that thread. It's not the DPI buttons i want to remap but they are also kinda useless since I only use one DPI setting so I might as well remap them as well, which would give me a total of 3 buttons for commands of my choice smile

Last edited by WASD (2011-07-07 20:16:52)

Offline

#7 2011-07-07 20:19:54

machinebacon
#! unstable
From: China
Registered: 2009-07-02
Posts: 6,825
Website

Re: [Solved] Binding a mousebutton to a command

If xev doesn't show feedback, it means the button doesn't send events. As long as the configuration for the button is not working, there is nothing which can be remapped, because the keycode is unknown.


Sweaty lads picking up the soap | I love the new "Ignore user" button

Offline

#8 2011-07-07 20:36:22

WASD
Member
From: Sweden
Registered: 2011-07-04
Posts: 20
Website

Re: [Solved] Binding a mousebutton to a command

The DPI buttons does not register in xev, but those are not the buttons i want to map. There is a third button bellow that that does register in xev as I pointed out in my first post.

http://i.imgur.com/zAbal.jpg

The green is the DPI buttons, they don't show up in xev. The red is a button that doesn't do anything but it does show up in xev and I wan't to remap it.

Offline

#9 2011-07-08 20:23:23

machinebacon
#! unstable
From: China
Registered: 2009-07-02
Posts: 6,825
Website

Re: [Solved] Binding a mousebutton to a command

Sorry, I have misunderstood the post.

It is seemingly Button 10, so configure your ~/.config/openox/rc.xml like this in the section   <!-- Menus --> (quite at the end of the file, for me ~line 670)

      <mousebind button="Button10" action="Press">
        <action name="Execute">
          <command>sh ~/path/to/file.sh</command>
        </action>
      </mousebind>

I can't test it as I don't have this Logimouse, but basically this is how it works.

Last edited by machinebacon (2011-07-08 20:24:39)


Sweaty lads picking up the soap | I love the new "Ignore user" button

Offline

#10 2011-07-11 10:30:49

WASD
Member
From: Sweden
Registered: 2011-07-04
Posts: 20
Website

Re: [Solved] Binding a mousebutton to a command

It works, thanks big_smile Just what I was looking for.

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo