1

This question is a particular case of this one.

Is there any program that can assign the key combination CTRL+TAB to the gesture RIGHT-CLICK+Mouse-wheel-up/down?

Explanation: I haven't managed to make this exact gesture work with neither compiz nor easystroke as they apparently only allow mouse gestures of the form One-Mouse-Button+CTRL/ALT/Super/Shift, and not One-Mouse-Button+Mouse-Wheel. (Maybe it's actually possible and I haven't found the right box to tick).

Reason: This gesture is very useful for switching through tabs in a web browser. It's possible to use it in Opera (natively), in Firefox (with FireGestures extension) and in Chrome (with crxMouse extension), but I can't get this functionality in other browsers like Tor (doesn't allow extensions).

As most web browsers use the key combination CTRL+TAB to switch to the next tab, it would be ideal assigning the gesture to that key combination GLOBALLY in order to use the gesture no matter the browser I'm using.

Remark: I'm not looking for a partial solution, but a global one. And I'm looking for the exact gesture RIGHT-CLICK+Mouse-wheel-up/down, not another one. I'm sure there must be a way, I mean this is Linux, not iOS.

Thanks in advance.

100r
  • 86

1 Answers1

1

First, install xbindkeys and xautomation...

sudo apt-get update
sudo apt-get install xbindkeys
sudo apt-get install xbindkeys-config
sudo apt-get install xautomation

Understand that configuring these can be difficult, but there are plenty of examples for different .xbindkeysrc online. Here's mine, just to get you started... you'll note that I already have a mouse wheel setup, but it's commented out, as I don't use it...

###########################
# xbindkeys configuration #
###########################
#
# Version: 0.1.3
#
# If you edit this, do not forget to uncomment any lines that you change.
# The pound(#) symbol may be used anywhere for comments.
#
# A list of keys is in /usr/include/X11/keysym.h and in
# /usr/include/X11/keysymdef.h 
# The XK_ is not needed. 
#
# List of modifier (on my keyboard): 
#   Control, Shift, Mod1 (Alt), Mod2 (NumLock), 
#   Mod3 (CapsLock), Mod4, Mod5 (Scroll). 
#
# Another way to specifie a key is to use 'xev' and set the 
# keycode with c:nnn or the modifier with m:nnn where nnn is 
# the keycode or the state returned by xev 
#
# This file is created by xbindkey_config 
# The structure is : 
# # Remark 
# "command" 
# m:xxx + c:xxx 
# Shift+... 


#keystate_numlock = enable
#keystate_scrolllock = enable
#keystate_capslock = enable


"xbindkeys_show"
   control + shift + q

#Zoom In
"xte 'keydown Control_L' 'key KP_Add' 'keyup Control_L'"
b:13 + Release

#Zoom Out
"xte 'keydown Control_L' 'key KP_Subtract' 'keyup Control_L'"
b:10 + Release

#Tab Left
#"xte 'keydown Control_L' 'keydown Shift_L' 'key ISO_Left_Tab' 'keyup Control_L' 'keyup Shift_L'"
#b:6 + Release

#Tab Right
#"xte 'keydown Control_L' 'key ISO_Left_Tab' 'keyup Control_L'"
#b:7 + Release

#bind shift + vertical scroll to horizontal scroll events
#(xbindkey '(shift "b:4") "xte 'mouseclick 6'")
#(xbindkey '(shift "b:5") "xte 'mouseclick 7'")

#Horz scroll Left
"xte 'key KP_Right'"
b:6 + Release

#Horz scroll Right
"xte 'key KP_Left'"
b:7 + Release

#
# End of xbindkeys configuration
heynnema
  • 73,649