If you type anything like I do, the CapsLock key gets very little use on your keyboard. Add the following lines to your i3 config file to remap it to be the Compose key, and use double-Shift as an alternate CapsLock for the infrequent occasions when it’s needed:

# Remap CapsLock to Compose                                                      
exec setxkbmap -option compose:caps                                              
                                                                                 
# Both shift keys enable CapsLock and one shift key cancels it                   
exec setxkbmap -option shift:both_capslock_cancel    

This should work in most Linux distro. To find out if it will work in yours, type:

$ grep compose:caps /usr/share/X11/xkb/rules/base.lst
$ grep shift:both_capslock_cancel /usr/share/X11/xkb/rules/base.lst

If the combos are listed in base.lst, they will work.

There are other ways to remap CapsLock to Compose, but this one keeps everything nice and tidy in one config file.

    • ExtremeDullardOP
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      22 days ago

      Typing certain unicode characters easily. Like right arrow (→) is <compose>->, trademark (™) is <compose>tm, one-third (⅓) is <compose>13, and smiley (☺) is <compose>:)

      It’s easier to remember than the unicode codes.