Ask Your Question
1

xbindkeys mouse button detection problem fedora 18

asked 2013-08-23 21:28:39 -0600

Rod gravatar image

updated 2013-08-24 08:02:06 -0600

FranciscoD_ gravatar image

Thanks in advance for your help! 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 retag flag offensive close merge delete

Comments

Thank you for your answer. Indeed I used xbindkeys -k and I got this:

in $HOME/.xbindkeysrc to bind a key.

"(Scheme function)"

m:0x50 + c:40

Mod2+Mod4 + d

I get the same when I press the mouse button I want to reconfigure, Super_L + d and Super_R + d, but somehow the mouse button and Super_L + d don't work with this.

Rod gravatar imageRod ( 2013-08-24 05:04:24 -0600 )edit

2 Answers

Sort by » oldest newest most voted
1

answered 2013-08-25 10:21:56 -0600

Rod gravatar image

updated 2013-08-26 19:00:27 -0600

O.k. I got this solved thanks to Hans and his awesome http://blog.hanschen.org/2009/10/13/mouse-shortcuts-with-xbindkeys/#comment-2787 (tutorial). He provided great support to all of my questions.

The mouse middle mouse button command is:

xte 'mouseclick 2'

What I did is that I assigned this command to a shortcut on the keyboard settings menu, as I mentioned before. At first I found a problem, if I assigned the command: xte 'mouseclick 2' to the custom shortcut and directed it to the mouse button itself, it just didn't work. What I did is that I assigned it to Ctrl + Mouse button (Ctrl+Super+D) and it worked. This is very weird because if I assign the mouse button to an already given action or command on the shortcuts (not a custom one) like for example Show the desktop, it actually works.

Well I'm kind of happy now, I have a middle mouse button and a show the desktop button. I want to say thanks to Hans once again, for all his help, without it I would have never even tried to figure anything.

edit flag offensive delete link more
0

answered 2013-08-24 02:59:33 -0600

dfr gravatar image

You could use

xbindkeys -k

This will prompt you to press desired key combination and will show you corresponding config line.

Also this link could help: https://wiki.archlinux.org/index.php/Xbindkeys#Simulating_multimedia_keys

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-08-23 21:28:39 -0600

Seen: 1,651 times

Last updated: Aug 26 '13