Space Cadet Shift allows you to tap Shift on its own, then get an opening parentheses when you release. It’s described on QMK Docs and by Steve Losh.
Here’s a short script to get a similar function to work on Arch Linux, Manjaro, or any distro that uses X11.
xcape -e 'Shift_L=parenleft;Shift_R=parenright;Alt_L=braceleft;Alt_R=braceright'
Pressing Shift gives you ( and )
Pressing Alt gives you [ and ]
Pressing Shift+Alt gives you { and }. Order matters so make sure you press Shift first.
It might not work well on VS Code so I’m working on an extension. Works fine on Vim and terminal.
To make this run on login, edit your ~/.profile
:
1 disables beeps, 2 makes capslock function as ctrl, 3 is space cadet with 100ms
delay.
xset b off
setxkbmap -option ctrl:nocaps
xcape -t 100 -e 'Shift_L=parenleft;Shift_R=parenright;Alt_L=braceleft;Alt_R=braceright'