R
R
Ruslan Kalinin2015-04-07 12:48:54
Mouse
Ruslan Kalinin, 2015-04-07 12:48:54

How to assign hotkeys to the wheel in Ubuntu?

How can I assign hotkeys to scroll the wheel up and down and click? But so that it does not work globally, but only in one program.
I have ubuntu gnome 14.10 and in dota2 I want to assign inventory items to the wheel. Cannot be assigned through DotA settings or the console. It didn't work through imwheel. I am not familiar with linux, under windows I used the XMouseButtonControl program.
Tell me the best option
UPD: Options using xbindkeys + dotool, xbindkeys + xvkbd, imwheel do not work in DotA

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
monah_tuk, 2015-04-07
@rushzx

To bind an event to a mouse, try xbindkeys: blog.hanschen.org/2009/10/13/mouse-shortcuts-with-... (search for: Mouse shortcuts). Wheel generates two mouse keys, usually 4 and 5 (how to find out exactly is described in the article: xev).
as a reaction to a hotkey ("hot button" in our case), assign the xdotool command with the required parameters: www.semicomplete.com/projects/xdotool/xdotool.xhtml
Or this knowledge concentrate: https://wiki.archlinux.org/ index.php/All_Mouse_But...
The fact that the article for ArchLinux does not play a special role. The same xbindkeys, but xvkbd instead of xdotool.
Those. Step by step :
1. Set up xbindkeys to handle the wheel (that is, two buttons). As an action, you can, for starters, specify:
"echo Up > /tmp/mouse_up.log"
and
"echo Down > /tmp/mouse_down.log"
so it will be easier, going through the buttons to find the right
ones 2. And then you form a command using xdotool or xvkbd and write it instead of echo Up/Down .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question