2

I'm using Ubuntu 21.10 with wayland. xdotool does not work with this setup.

I've trying to use dconf to bind a function to a mouse button (toggle-overview). I can not find anywhere a list of the valid sequences for keys in dconf.

I'm willing to use an xdotool equivalent, but I've yet to see a supported one for Wayland.

I've used xev to tell me it's button 10 that I want to bind, I just don't know how to tell dconf how to accept button 10.

I tried binding other key sequences (^C for one) just to see if those would work. Those sequences do just fine.

How does one specify a mouse button in dconf?

shown below in a image of the dconf-editor where I'm trying to enter the mouse button, the "mouse10" text. That value doesn't work. If I replace that with 'c' it will then work.

I'm trying to find the correct value to use for "mouse10"

enter image description here

kdubs
  • 95
  • 8
  • 1
    You are assuming you need to specify the mouse buttin in dconf? Please avoid the traps of an XY question (https://meta.stackexchange.com/questions/66377/what-is-the-xy-problem) : this distracts valuable resources of people willing to help. Also provide specific information about what you tried. – vanadium Dec 22 '21 at 08:43
  • I get what you are stating. I tweaked the question a little. – kdubs Dec 22 '21 at 13:26
  • I can’t believe nobody knows the syntax, nor have I been successful in finding it on the web. Baffling. – kdubs Dec 26 '21 at 01:28
  • I think the question is precise. how do you bind a mouse button in Dconf? what more is there to ask? – kdubs Dec 26 '21 at 19:48

1 Answers1

2

EDIT #2. Solution #3

If Solutions #1,2 below don't work for you, because you have Wayland or else, you may try with Key Mapper GUI (ref, ref) (note this was one of the Related links I have previously posted at the bottom), or mouse-bind with evemu, or wayland-mouse-mapper (patch) also with evemu.

See summary here. I didn't have time to test it myself, but I have read many reports that it works, and again it is very simple.

Related:

  1. https://www.reddit.com/r/linux4noobs/comments/fih5aw/how_to_change_or_assign_the_mouse_buttons_in/

EDIT #1. Solution #2

If Solution #1 below doesn't work for you, you may try with xautomation (ref, ref). I didn't have time to test it myself, but I have read many reports that it works, and it is as simple as xdotool.


Solution #1

I don't know why you want to force the mouse button binding via dconf. I don't even know if that is possible. The dconf menu you quote is for binding keys to actions, not mouse buttons to either keys or actions.

The "canonical" method for what you want to achieve (although not via dconf) is very simple, via xdotool.

  1. Install with

     $ sudo apt install xbindkeys x11-utils xdotool
    
  2. Create a basic .xbindkeysrc

     $ xbindkeys -d > ~/.xbindkeysrc
    
  3. Edit ~/.xbindkeysrc, appending

     "xdotool key 'Super'"
            b:10
    
  4. Start with

     $ xbindkeys
    

I have just tested and it works. If you want to recover the behavior of button #10, use killall xbindkeys.


Related:

  1. https://unix.stackexchange.com/questions/199325/what-are-the-differences-between-xdotool-and-xautomation
  2. https://stackoverflow.com/questions/31940669/xdotool-ctrl-key-and-keyboard-layouts
  3. How to bind mouse buttons to keys?