You are not logged in.

#1 2010-08-13 02:41:28

Cadynum
Member
Registered: 2010-04-15
Posts: 20

[Solved] Binding a mouse button to control

Hi. I'm searching for a way to bind a mouse button to act exactly like Control.

If you would like to bind Caps Lock to act as Control you would do the following for example:

remove lock = Caps_Lock
add Control = Caps_Lock
keysym Caps_Lock = Control_L

It appears that xmodmap doesn't work this way for mouse buttons this way however.
The motivation for this is to have convenient key-bindings for an old game which doesn't support remapping.

Thanks!

Last edited by Cadynum (2010-08-14 18:34:27)

Offline

#2 2010-08-13 02:53:38

Acecero
Member
Registered: 2008-06-21
Posts: 1,373

Re: [Solved] Binding a mouse button to control

Use xvkbd and xbindkeys instead.

Offline

#3 2010-08-13 03:08:00

Cadynum
Member
Registered: 2010-04-15
Posts: 20

Re: [Solved] Binding a mouse button to control

Acecero wrote:

Use xvkbd and xbindkeys instead.

I'm pretty sure I already tried that and it didn't work.

The problem is that I'm after using control as a modifier, which means a scenario could look like this:
1. Hold Control (as a mouse button)
2. Press another key
3. Release Control (as a mouse button)

So it would need to handle both the clicking and releasing, I don't think that's a possibility with xbindkeys and xvkbd.

Offline

#4 2010-08-14 14:28:08

Asthma
Member
Registered: 2010-07-21
Posts: 3

Re: [Solved] Binding a mouse button to control

I'm using this:

http://wiki.archlinux.org/index.php/Get … g#evrouter

my /root/.evrouterrc

"Razer DeathAdder" "/dev/input/event*" any key/276 "XKey/Alt_L"
"Razer DeathAdder" "/dev/input/event*" any key/275 "XKey/Shift_L"

This binds two side buttons on my DeathAdder to alt and shift and to launch it I simply run as root evrouter /dev/input/event* .

Offline

#5 2010-08-14 18:34:10

Cadynum
Member
Registered: 2010-04-15
Posts: 20

Re: [Solved] Binding a mouse button to control

Asthma wrote:

I'm using this:

http://wiki.archlinux.org/index.php/Get … g#evrouter

my /root/.evrouterrc

"Razer DeathAdder" "/dev/input/event*" any key/276 "XKey/Alt_L"
"Razer DeathAdder" "/dev/input/event*" any key/275 "XKey/Shift_L"

This binds two side buttons on my DeathAdder to alt and shift and to launch it I simply run as root evrouter /dev/input/event* .

That worked perfectly, thanks!
The wiki mentions something about not(?) using the evdev driver in X. However no modifications were necessary here.

Offline

Board footer

Powered by FluxBB