Ask Your Question
0

How to use Microsoft mouse with Super Key

asked 2014-11-08 13:58:32 -0600

alfC gravatar image

updated 2014-11-10 18:29:27 -0600

I have this mouse http://www.microsoft.com/hardware/en-us/p/sculpt-ergonomic-mouse/L6V-00001 , which has a (blue Windows) Super Key.

In the past I was able to configure special mouse buttons to keys with ~/.xbindkeysrc. For example this:

# Copy with mouse
"xte 'key Super_L'"
 release + b:8

Which works, but not for the Windows button. In other words, I tried using b:1 ... b:25 and none of these buttons is the Windows button in the mouse. (other buttons like "Back" b:8 works and can be mapped to "Super_L").

Do you know what is the correct code for the Windows button in the mouse? Or if this is this is not possible with xbindkeys, what else can I use?

Notes, this is the information I got from xinput:

$ xinput list
⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ Microsoft Microsoft® 2.4GHz Transceiver v9.0  id=11   [slave  pointer  (2)]
⎜   ↳ Microsoft Microsoft® 2.4GHz Transceiver v9.0  id=12   [slave  pointer  (2)]
⎜   ↳ Logitech Unifying Device. Wireless PID:1017   id=13   [slave  pointer  (2)]
⎜   ↳ Logitech Unifying Device. Wireless PID:1017   id=14   [slave  pointer  (2)]
⎜   ↳ Logitech Unifying Device. Wireless PID:1017   id=15   [slave  pointer  (2)]
⎜   ↳ ALPS PS/2 Device                          id=19   [slave  pointer  (2)]
⎜   ↳ AlpsPS/2 ALPS GlidePoint                  id=18   [slave  pointer  (2)]
...


$ xinput test 11  #(or 12)
... nothing comes out from the "windows" button, all other buttons give a code.

xev on the other hand seems to return this while pressing this Windows key in the mouse. Although it doesn't work all the times I press it, (it may be just a motion event or something)

KeyPress event, serial 36, synthetic NO, window 0x1600001,
    root 0x9e, subw 0x0, time 29065836, (1225,550), root:(1226,597),
    state 0x0, keycode 134 (keysym 0xfe11, ISO_Level5_Shift), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 36, synthetic NO, window 0x1600001,
    root 0x9e, subw 0x0, time 29066428, (1225,550), root:(1226,597),
    state 0x20, keycode 134 (keysym 0xfe13, ISO_Level5_Lock), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

I also discovered that xbindkeys -k also can display codes, in this case the display is the following. And again it only works sometimes:

$ xbindkeys -k
Press combination of keys or/and click under the window.
You can use one of the two lines after "NoCommand"
in $HOME/.xbindkeysrc to bind a key.
"(Scheme function)"
    m:0x20 + c:134
    Mod3 + ISO_Level5_Shift
edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
1

answered 2014-11-12 20:20:17 -0600

alfC gravatar image

I got tired of looking for a solution with xbindkeys, so what I did was to edit the Keyboard -> Shortcut properties and associate a Custom Command to this misterious key.

The key in the mouse turned out to be Level5 Shift. To which I associated the command xte 'keydown Super_L' 'keyup Super_L'

This is how the configuration looks like (screenshot). It works although it is not as useful as I imagined it would be.

[sorry the askfedora didn't let me upload the screenshot, I got "Error uploading file. Please contact the site administrator. Thank you."]

edit flag offensive delete link more

Comments

This method stopped working in Fedora 22, since pressing the Windows key (in the mouse) now is not detected by any program (xev or xkeybind).

alfC gravatar imagealfC ( 2015-09-22 22:47:34 -0600 )edit
1

answered 2014-11-08 16:01:21 -0600

updated 2014-11-08 16:02:58 -0600

  1. List devices with xinput list
$ xinput list
⎡ Virtual core pointer                        id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                  id=4    [slave  pointer  (2)]
⎜   ↳ ELAN Touchscreen                            id=9    [slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad                  id=12   [slave  pointer  (2)]
⎣ Virtual core keyboard                       id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard                 id=5    [slave  keyboard (3)]
    ↳ Power Button                                id=6    [slave  keyboard (3)]
    ↳ Video Bus                                   id=7    [slave  keyboard (3)]
    ↳ Power Button                                id=8    [slave  keyboard (3)]
    ↳ Lenovo EasyCamera                           id=10   [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard                id=11   [slave  keyboard (3)]
  1. Test the device with xinput test $id - then press the button. ctl-c to exit.
$ xinput test 12
button press   1 
button release 1 
button press   3 
button release 3
edit flag offensive delete link more

Comments

Nothings comes out from xinput test ... from pressing this particular Windows button. I think Microsoft probably does some dark magic with the driver of this mouse. (I added the found details in the question). It is unlikely that xbindkeys alone will help therefore.

alfC gravatar imagealfC ( 2014-11-09 03:18:32 -0600 )edit

It isn't as straightforward, but xev might shed some light.

randomuser gravatar imagerandomuser ( 2014-11-09 05:04:00 -0600 )edit

I added some xev and xbindkeys -k information to the question. I got m:0x20 + c:134 but it doesn't work (or at least not all the time).

alfC gravatar imagealfC ( 2014-11-10 18:55:18 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2014-11-08 13:58:32 -0600

Seen: 1,358 times

Last updated: Nov 12 '14