Ask Your Question
1

Bind Gnome 3 Overview mode to a mouse button

asked 2011-11-16 02:49:08 -0500

kparal gravatar image

updated 2013-08-23 21:19:46 -0500

FranciscoD_ gravatar image

I have several extra buttons on my mouse. It would be great to activate the Overview mode of Gnome 3 (the same as when you click on Activities) using a mouse button. Does anyone know how to do that?

I have found one solution [1], but I would prefer using no external tool, just editing some configuration file.

[1] http://ubuntuforums.org/showthread.php?p=11413312

edit retag flag offensive close merge delete

3 Answers

Sort by » oldest newest most voted
3

answered 2012-01-27 15:13:54 -0500

Paul d'Aoust gravatar image

Here's a novel solution; it does require installing two packages and editing a (very small) config file though: http://www.bohemianalps.com/blog/2011/gnome-3-activate-overlay-and-more-by-mouse-button/ In summary, you install the packages xdotool and xbindkeys:

$ yum install xdotool xbindkeys

then find out what number your favoured button is by running xev from the terminal, moving your mouse pointer to the small window that pops up, and pressing that button. Check the console for a line that starts with ButtonRelease event, and take note of the button x on the third line (in my case, it's button 8).

Close xev, and create a new config file for xbindkeys:

$ gedit ~/.xbindkeysrc

And add these lines:

"xdotool key Super_L"
release + b:8

(b:8 is the button number; replace this with yours -- also, if you want to map a different button, you'll want to replace Super_L with Menu or what-have-you). Now you'll want to run xbindkeys & from the terminal and test out your configuration.

Last step: you want to start this up at the beginning of your session, so run 'Startup Applications' (you can find it by bringing up the Overlay with your newly mapped button and typing in the app name) and adding xbindkeys as a startup application. Click 'Add', enter a name (I put in 'Bind button 8 to Start button') and the command (xbindkeys) and click 'Add'.

You're done!

Full credit goes to Jason Simanek, the author of the linked-to blog post, and the sources he's quoted.

edit flag offensive delete link more
1

answered 2011-11-16 09:22:12 -0500

SoumyaC gravatar image

You can do it easily if you have gconf-editor installed in your Fedora box

1) Open gconf-editor and press "Ctrl+F" to open the Find window.

2) Search for the string "Super_L" in the Find window and check both the checkboxes below and click on Find.

3) You should get a single entry of "/apps/mutter/general/overlaykey". In that entry change the value of overlaykey from "Super_L" to whatever key or Mouse Buttons you want to set.

4) Close the gconf-editor and do a reload of Gnome Shell (Alt+F2 and r)

The key set in that value now should work as Overview mode shortcut.

edit flag offensive delete link more

Comments

All the above entries of overlaykey will be overlay_key (I have no idea why it came like this)

SoumyaC gravatar imageSoumyaC ( 2011-11-16 09:26:16 -0500 )edit

I also tried with few mouse button options but it didn't work. Probably we need to get the mouse button map (like keyboard layout map) for Gnome. I don't think we can put more than one key as binding for Overview mode as of now in Gnome 3

SoumyaC gravatar imageSoumyaC ( 2011-11-16 09:59:43 -0500 )edit

@kparal : Did a lot of googling and forums, but what I am now almost sure is you have to take the help of other external tool if you want to map your mouse buttons. Your keyboard layout can be mapped anytime with the above procedure.

SoumyaC gravatar imageSoumyaC ( 2011-11-18 15:25:48 -0500 )edit
0

answered 2013-08-23 21:15:51 -0500

Rod gravatar image

Great and useful post, thank you! I'm using fedora 18, and I'm having problems setting a mouse button to do any xte or xdotool command. When I use xev to see what the mouse button triggers I get this:

FocusOut event, serial 31, synthetic NO, window 0x2200001, mode NotifyGrab, detail NotifyAncestor

FocusOut event, serial 31, synthetic NO, window 0x2200001, mode NotifyUngrab, detail NotifyPointer

FocusIn event, serial 31, synthetic NO, window 0x2200001, mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 31, synthetic NO, window 0x0, keys: 4294967199 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0
32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

KeyPress event, serial 31, synthetic NO, window 0x2200001, root 0x9f, subw 0x0, time 573916, (45,4), root:(46,95), state 0x50, keycode 40 (keysym 0x64, d), same_screen YES, XLookupString gives 1 bytes: (64) "d" XmbLookupString gives 1 bytes: (64) "d" XFilterEvent returns: False

KeyRelease event, serial 31, synthetic NO, window 0x2200001, root 0x9f, subw 0x0, time 573950, (45,4), root:(46,95), state 0x50, keycode 40 (keysym 0x64, d), same_screen YES, XLookupString gives 1 bytes: (64) "d" XFilterEvent returns: False

KeyRelease event, serial 31, synthetic NO, window 0x2200001, root 0x9f, subw 0x0, time 573982, (45,4), root:(46,95), state 0x50, keycode 133 (keysym 0xffeb, Super_L), same_screen YES, XLookupString gives 0 bytes: XFilterEvent returns: False

As for this, I get a combination like Mod2+Mod4+ d for the mouse button press. But when I put this in to the .xbindkeysrc like for example:

#Mozilla

"firefox"

 m:0x50 + c:40 

 Mod2+Mod4+d

It doesn't work with the mouse button and I just keep getting a "d" everytime I press the button. Nevertheless if I press the keyboard key Super_R + d it does open firefox. But if I press the key Super_L + d it doesn't. I managed to notice that pressing Super_L + d + d (pressing d repeteadly twice) opens firefox.

Somehow this mouse button is linked to my Super_L physical key. when I press Super_L by itself, it show's the activities overview (the same as alt+F1 in the keyboard shortcuts, or going with the mouse pointer to the upper left corner activities menu). I did try the keyboard layout distribution map, to see which keys highlight when I press one on my physical keyboard. I noticed that when I press the right Super key, control, alt, etc, the appropriate key highlights on the map. Nonetheless when I press the left Super key it doesn’t highlight any keys on the layout map.

I do have xmodmap but haven't done anything strange with it. This is the output I get when running xmodmap and seems to be fine.

xmodmap: up to 4 keys per modifier, (keycodes in parentheses):

shift Shift_L (0×32), Shift_R (0x3e)

lock Caps_Lock (0×42)

control Control_L (0×25), Control_R (0×69)

mod1 Alt_L (0×40), Alt_R (0x6c), Meta_L (0xcd)

mod2 Num_Lock (0x4d)

mod3

mod4 Super_L ...
(more)
edit flag offensive delete link more

Comments

@Rod: please post a new question for the issue you're facing. This one was asked and answered a long time ago and seemed to work for the op. When you've asked a new question, I'll delete this "answer" that you've posted since it's more a comment than an answer. Thanks.

FranciscoD_ gravatar imageFranciscoD_ ( 2013-08-23 21:22:48 -0500 )edit

Question Tools

3 followers

Stats

Asked: 2011-11-16 02:49:08 -0500

Seen: 12,871 times

Last updated: Aug 23 '13