Using Spacebar as $mod for i3 and others

Created: 2020-11-26T23:13:13-06:00

Return to the Index

This card pertains to a resource available on the internet.

Create an ~/.Xmodmap:

clear mod3
clear mod4
add mod3 = Hyper_L
add mod4 = Super_L Super_R

Add to your ~/.profile equivalent:

xmodmap /home/<user>/.Xmodmap
spare_modifier="Hyper_L"
xmodmap -e "keycode 65 = $spare_modifier"
xmodmap -e "add Hyper_L = $spare_modifier"
xmodmap -e "keycode any = space"
xcape -e "$spare_modifier=space"

Set in your i3 config:

set $mod mod3