News for hackers. Stuff that matters.
Re:Vim Anywhere by tetraodonpuffer on Friday February 16, 2018 @05:51PM (#16397268)
as the two other sibling posters said, I use karabiner elements when on os/x and xcape+xmodmap on Linux with this in my .xsession

  xcape -e 'Control_L=Escape'
which is run after remapping caps lock to Control_L via xmodmap (just xmodmap -pke to create your xmodmap file, xev to figure out which keycode your caps is, and edit the file after to make that keycode Control_L.

For example my xmodmap file, which also sets up meta/super and other overrides is

  !
  ! Clear the modifiers
  !
  clear    lock
  clear    shift
  clear    control
  clear    mod1
  clear    mod2
  clear    mod3
  clear    mod4
  clear    mod5
  
  ! Remapping
  keycode  37 = F17 NoSymbol F17
  keycode  64 = Alt_L NoSymbol Alt_L
  keycode  66 = Control_L NoSymbol Control_L
  keycode  90 = Multi_key NoSymbol Multi_key
  keycode  91 = Mode_switch NoSymbol Mode_switch
  keycode 105 = Meta_R NoSymbol Meta_R
  keycode 107 = Menu Sys_Req Menu Sys_Req
  keycode 108 = Control_R NoSymbol Control_R
  keycode 127 = Redo Undo Redo Undo
  keycode 134 = Alt_R NoSymbol Alt_R
  keycode 135 = Control_R NoSymbol Control_R
  keycode 164 = Undo Redo Undo
  keycode 166 = Super_L NoSymbol Super_L
  keycode 167 = Control_L NoSymbol Control_L
  
  !
  ! Set the modifiers
  !
  add shift   = Shift_L Shift_R
  add control = Control_L Control_R
  add mod1    = Alt_L Alt_R
  add mod2    = Num_Lock
  add mod3    = Super_L
  add mod4    = Meta_R
  add mod5    = Mode_switch

There are no comments on this comment yet.