Implement the Hyperkey feature using Kanata

Table of Contents

I'm just dipping my toe into Kanata, the cross-platform software keyboard remapper. This enables me to go fancy with my keyboard bindings just like folks deep into the custom keyboard subreddits.

I'm playing with my home row, to see if it truly makes a difference for me in term of comfort. I spend a big chunk of my life here after all.

One function I couldn't replicate is the so called hyperkey, when pressing one key acts like holding down shift+control+option+command. I've been using Hyperkey to get this functionality.

So, my friend if you are in my shoes and want to implement hyperkey within Kanata, look no further.

(defcfg
  process-unmapped-keys yes
)

(defsrc
  caps
)

(defvar
  tap-time 200
  hold-time 200
)

(defalias
  hyperkey (tap-hold-press $tap-time $hold-time esc (multi lsft lctl lalt lmet))
)

(deflayer base
  @hyperkey
)