How to map a mouse button to the Enter / Return key?

Moderators: 666philb, Forum moderators

Post Reply
bob93
Posts: 54
Joined: Fri Nov 25, 2022 8:29 am
Location: Fossapup64 9.5
Has thanked: 22 times
Been thanked: 1 time

How to map a mouse button to the Enter / Return key?

Post by bob93 »

I got one of those mice with extra buttons for productivity. I plugged it in. It works well. xinput recognizes all the buttons.
I am able to map any of the buttons to a command such as opening a program using xbindkeys. But I now need to do something similar but different, which is to have one of the buttons function as an Enter key. I don't know if xbindkeys can do that.
I also tried Antimicro but it seems to be only meant for joysticks.

The main reason for wanting one of the buttons to function like the Enter key is because I use programs with lots of dialogs (such as qcad) and I often have to reach for the Return key with my left hand. Being able to do this with a mouse button will speed things up. I'm also interested in having another of the extra buttons mapped to a letter key such as Q, but first I need the Enter key.

Thanks

Fossapup64 9.5

User avatar
MochiMoppel
Posts: 1343
Joined: Mon Jun 15, 2020 6:25 am
Location: Japan
Has thanked: 22 times
Been thanked: 521 times

Re: How to map a mouse button to the Enter / Return key?

Post by MochiMoppel »

bob93 wrote: Thu Feb 27, 2025 3:27 am

I am able to map any of the buttons to a command such as opening a program using xbindkeys.

Try the command xdotool key Return

Post Reply

Return to “Fossapup64”