You are not logged in.

#1 2022-01-10 14:04:12

Kritiqual
Member
Registered: 2021-09-10
Posts: 21

[Solved] Disable 4th and 5th mouse button behavior

When using thunar or some apps, my 4th and 5th mouse button goes back and forth recent directory, pages, etc, however, I want to use it with the function I defined in my wm config. So, I want to disable this "back and forth" feature in thunar, but I don't know how to do it, and how do I configure it that every apps does not recognize those buttons, only wm does?

Last edited by Kritiqual (2022-01-11 12:12:30)

Offline

#2 2022-01-10 14:56:11

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,500
Website

Re: [Solved] Disable 4th and 5th mouse button behavior

Depending on what WM you use, if it has an active grab of those buttons, other clients should not receive those events.

However, a more general solution would be to remap the buttons to higher numbers (I suspect you're talking about buttons 6+7 really).  If you map them to 11+12 pretty much all client programs will ignore them, and your WM can be configured to act on those higher-number buttons.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2022-01-10 17:20:12

Kritiqual
Member
Registered: 2021-09-10
Posts: 21

Re: [Solved] Disable 4th and 5th mouse button behavior

I'm using AwesomeWM, I have tried mapping it in the config, now, both the WM and the program recognize it. So, may be I'll try remap it, can you tell me how?

Offline

#4 2022-01-10 17:32:12

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,344

Re: [Solved] Disable 4th and 5th mouse button behavior

xmodmap or xinput will do but you can also define the pointer map in an xorg configlet
https://wiki.archlinux.org/title/Mouse_ … p_tweaking
https://man.archlinux.org/man/extra/xf8 … n#Option~3

Edt: thunar will likely through GDK use XI2, you can also try to "export GDK_CORE_DEVICE_EVENTS=1"

Last edited by seth (2022-01-10 17:33:41)

Offline

#5 2022-01-11 05:51:23

Kritiqual
Member
Registered: 2021-09-10
Posts: 21

Re: [Solved] Disable 4th and 5th mouse button behavior

I tried

xinput set-button-map 14 1 2 3 4 5 6 7 6 7

, since button 6  and 7 normally do nothing, so it works! Now only my WM recognize those buttons, but not other program. Also, I want to set it permanently, can you show me an example of xorg.conf, I'm kinda confuse about it's syntax

Last edited by Kritiqual (2022-01-11 05:54:48)

Offline

#6 2022-01-11 07:18:32

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,344

Re: [Solved] Disable 4th and 5th mouse button behavior

https://wiki.archlinux.org/title/Libinp … g_a_button
https://wiki.archlinux.org/title/Libinp … re-mapping

Whether you use a session script or xorg config depends on the desired context - the xorg configlet will apply to all sessions and users (and the DM)
If you want to limit this to Awesome, but eg. not apply it to xfce, you'd rather use the session script, but if you've only one user, one session (type) and no DM, it doesn't matter.

Offline

Board footer

Powered by FluxBB