;; See keymap/tutorial.kbd for a more complete tutorial

(defcfg
  input (iokit-name)
  output (kext)
  fallthrough true
)

(defsrc
  esc  f1   f2   f3   f4   f5   f6   f7   f8   f9   f10  f11  f12
  grv  1    2    3    4    5    6    7    8    9    0    -    =    bspc
  tab  q    w    e    r    t    y    u    i    o    p    [    ]    \
  caps a    s    d    f    g    h    j    k    l    ;    '    ret
  lsft z    x    c    v    b    n    m    ,    .    /    rsft up
  fn   lctl lalt lmet           spc            rmet ralt left down rght
)

;; Below, I use `around' to compose `layer-toggle' with `fn' (instead
;; of using `layer-toggle' directly) so that the `fn' keypress
;; actually gets emitted. This matters when using an application that
;; can use `fn' as a modifier (like Emacs).

(defalias fn (around (layer-toggle function) fn))

(deflayer default
  _    brdn brup lp   mctl bldn blup prev pp   next mute vold volu
  _    _    _    _    _    _    _    _    _    _    _    _    _    _
  _    _    _    _    _    _    _    _    _    _    _    _    _    _
  _    _    _    _    _    _    _    _    _    _    _    _    _
  _    _    _    _    _    _    _    _    _    _    _    _    _
  @fn  _    _    _              _              _    _    _    _    _
)

(deflayer function
  _    f1   f2   f3   f4   f5   f6   f7   f8   f9   f10  f11  f12
  _    _    _    _    _    _    _    _    _    _    _    _    _    _
  _    _    _    _    _    _    _    _    _    _    _    _    _    _
  _    _    _    _    _    _    _    _    _    _    _    _    _
  _    _    _    _    _    _    _    _    _    _    _    _    _
  _    _    _    _              _              _    _    _    _    _
)
