How to configure modifier keys to act as other keys when pressed and released on their own.

asked 2015-07-05 11:31:49 +0000

rolandnsharp gravatar image

updated 2015-07-05 13:22:06 +0000

For example, I have Super + d mapped to Escape

bindsym --release $super+d exec --no-startup-id xdotool key --clearmodifiers Escape

But I also want to remap what Super does when it's pressed by itself. I actually want it to just type s and then I'll remap Super to the s key.

This works, but is not what I want: bindsym --release $super+s exec --no-startup-id xdotool type "s"

This is what I want but does not work: bindsym --release $super exec --no-startup-id xdotool type "s"

edit retag flag offensive close merge delete

Comments

May I ask what the benefit of this would be? Why would one not simply use the <esc> or 's' key? ;)

oberon gravatar imageoberon ( 2015-07-05 20:45:20 +0000 )edit

IMHO, using i3 bindsym and xdotool is the wrong way to go about modifiying your keyboard layout. I would suggest using either [`xmodmap`](https://wiki.archlinux.org/index.php/Xmodmap) or [X Keyboard Extension](https://wiki.archlinux.org/index.php/X_KeyBoard_extension) for that.

Adaephon gravatar imageAdaephon ( 2015-07-06 11:07:22 +0000 )edit