Anyone knows how to bind Alt + Tab shortcut to a mouse button on xfce?
1 Answers
xvkbd and xbindkeys
Let's say we want to bind some mouse buttons to keyboard ones. The problem we will encounter is that we do not know how to emulate a key press. Here comes in handy xvkbd
. We can use it along with xbindkeys
.
xbindkeys --defaults >> ~/.xbindkeysrc
xbindkeys
To restart xbindkeys type:
pkill -f xbindkeys
xbindkeys
Here's example ~/.xbindkeysrc config:
"xvkbd -text "\[F8]""
m:0x0 + b:8
"xvkbd -text "\[Shift]\[Left]""
m:0x0 + b:9
"xvkbd -text "\[Shift]\[Right]""
m:0x0 + b:10
"xvkbd -text 2"
m:0x0 + b:11
"xvkbd -text 3"
m:0x0 + b:12
If you want to check your mouse buttons number use xev
. Don't forget to type capital letters in xvkbd
-text usage and to escape opening bracket with \
or you get simply [Shift]
written.
Here is an example for xbindkeys
to enable x selection paste(third click pasting), you need both xsel
and xvkbd
installed, What it does it executes that command whenever button 13 of the mouse is pressed (in ~/.xbindkeysrc
) :
"xvkbd -no-jump-pointer -text "\D1$(xsel)" 2>/dev/null"
b:13
And yes, you can bind typing obscene words to mouse keys. Excerpt taken from ArchWiki

- 6,541