alols / xcape

Linux utility to configure modifier keys to act as other keys when pressed and released on their own.
GNU General Public License v3.0
2.1k stars 117 forks source link

[Question] xcape send multiple keys #105

Closed azzamsa closed 4 years ago

azzamsa commented 6 years ago

I tried to map return to control using this

xmodmap -e "remove Control = Control_R"
xmodmap -e "keycode 0x69 = Return"
xmodmap -e "keycode 0x24 = Control_R"
xmodmap -e "add Control = Control_R"

xcape -t 10000 -e "Control_R=Return"

When I hit return I get multiple return sent to my application. And when I hold Ctrl_L I get multiple return too, not Ctrl it self. Is this normal ?

brotherJ4mes commented 5 years ago

Not sure if this is the case for you but when I was experimenting with xcape I learned that calls to it are cumulative (i.e. if you run your xcape command twice, then you'll get two return's when you press Control.) A simple killall xcape would reset xcape and would fix this issue for me.

azzamsa commented 4 years ago

Whoa, I've dropped xcape for long time. About a year now. But today I got new laptop and want to give it a second try.

@brotherJ4mes after reading your comments, I realize that my .bash_profile little messed up (I believe it reloaded more than one). So I just put xcape -t 10000 -e "Control_R=Return" in my i3 config. And wow, it works great.

Now I can use return key for 'return', and for 'ctrl' if I hold it. what a great app.

Thanks again @brotherJ4mes for giving me a clue.