How to get a left-hand mouse? [solved]

Hi. Installed KS 18.0.8.7. Should have switch to this top notch distro well before :slight_smile:

I’m unable to change my mouse buttons for left-handed. Seems that required wayland compositor labwc. Search for info on this subject on many sites without success. Surely I’m not the only one user left-handed :woozy_face: Help appreciated.

1 Like

This can be set in labwc’s configuration as per:

Search for leftHanded to find the correct setting. You probably want something similar to the following in ~/.config/labwc/rc.xml:

<?xml version="1.0"?>
<labwc_config>
  <libinput>
    <device>
      <leftHanded>yes</leftHanded>
    </device>
  </libinput>
</labwc_config>

(Edit: I previously omitted the <device>...</device> tags by mistake. Fixed.)

(Edit 2: And I messed up the tag order. Sigh. Fixed that too.)

2 Likes

Thanks for the answer. Unfortunately, it doesn’t work as is. I tried your version

and version2:

<?xml version="1.0"?>
<labwc_config>
<mouse>
  <libinput>
    <leftHanded>yes</leftHanded>
  </libinput>
</mouse>
</labwc_config>

and version3: [following 1)]

<?xml version="1.0"?>
<labwc_config>
<mouse>
  <default />
  <libinput>
    <leftHanded>yes</leftHanded>
  </libinput>
</mouse>
</labwc_config>

I tried each version in all directory I could think of: [following 2)]

  • ~/.config/labwc/ (which initially didn’t exist)
  • ~/.config/labwc/wayland/
  • ~/.config/lxqt/labwc/
  • ~/.config/lxqt/wayland/
  • ~/.config/lxqt/wayland/labwc/
  • ~/.config/autostart/
  • ~/.config/autostart/labwc
  1. https://labwc.github.io/labwc-config.5.html#mouse
<mouse>
  <default/>
  <context name="Frame">
    <mousebind button="W-Left" action="Press"/>
    <mousebind button="W-Left" action="Drag"/>
  </context>
</mouse>

Load default mousebinds. This is an addition to the openbox specification and provides a way to keep config files simpler whilst allowing user specific binds. Note that if no rc.xml is found, or if no <mouse><mousebind> entries exist, the same default mousebinds will be loaded even if the <default /> element is not provided.
  1. https://lxqt-project.org/wiki/Wayland-Session.html

Compositors#

…For the supported compositors, minimal default settings based on their default settings are shipped and will be installed in ~/.config/lxqt/wayland/ folder at the first start, except for kwin_wayland and labwc, where the default configurations are used.

Thanks again for your knowledge. Where did you find the  command '<leftHanded>'  I couldn’t find it anywhere ?
2 Likes

Argh, I misread the docs. It should be:

<?xml version="1.0"?>
<labwc_config>
  <libinput>
    <device>
      <leftHanded>yes</leftHanded>
    </device>
  </libinput>
</labwc_config>

(I was missing the <device>...</device> tags previously.)

I just tested the above in a VM, the right mouse button is now treated as the left one and vice-versa.

~/.config/labwc/rc.xml is the correct folder to use. It’s fine if ~/.config/labwc doesn’t exist yet; it is expected that you need to create the directory.

It’s in the documentation page I linked to. If you open that page, press Ctrl+F, then search for “leftHanded”, you’ll find it. I figured the setting would be in labwc’s configuration, and so searched the text of the page until I found it.

2 Likes

Thanks @arraybolt3 for the time taken to patiently look further and his detailed explanation.

Your last version (#4) didn’t work on my plain external usb 500 GB SSD installation but with your additional info to look at ‘<libinput>’ instead of just ‘<mouse>’ actions, I tried a slightly different arrangement that works. Here is the version #5 that works when written in a file name rc.xml located in newly created ~/.config/labwc :

<?xml version="1.0"?>
<labwc_config>
  <libinput>
    <device>
      <leftHanded>yes</leftHanded>
    </device>
  </libinput>
</labwc_config>

3 Likes

I… how… sigh. Glad to hear it works, but I’m chagrined at my apparent inability to read. :-/ Fixed both my posts above, sorry that I messed it up twice.

2 Likes

Please document. Mouse - Kicksecure @nurmagoz

2 Likes