main
  1;; Variables for tap/hold timings
  2(defvar
  3  tap-time 300
  4  hold-time 200)
  5
  6(defchords querty 20
  7  (h        ) h
  8  (  j      ) j
  9  (    k    ) k
 10  (      l  ) l
 11  (        ;) ;
 12  ( o   ) o
 13  (   p ) p
 14;;  (   k  l) M-`
 15;;  ( j    l) @backforth
 16  (      l ;) esc 
 17  ( o p ) @capsword
 18)
 19
 20;; Aliases for custom key behaviors
 21(defalias
 22  chj	    (chord querty j)
 23  chk	    (chord querty k)
 24  chl	    (chord querty l)
 25  chh	    (chord querty h)
 26  chscln    (chord querty ;)
 27  cho       (chord querty o)
 28  chp       (chord querty p)
 29
 30  hyper     (multi lctl lalt lsft lmet)
 31  capsword  (caps-word 2000)
 32  escctrl   (tap-hold 100 100 esc lctl)
 33  a_met     (tap-hold 500 $hold-time a lmet)
 34  s_alt     (tap-hold 500 $hold-time s lalt)
 35  d_sft     (tap-hold 500 $hold-time d lsft)
 36  f_ctl     (tap-hold 500 $hold-time f lctl)
 37  g_hyp     (tap-hold 500 $hold-time g @hyper)
 38  h_hyp     (tap-hold 500 $hold-time @chh @hyper)
 39  j_ctl     (tap-hold 500 $hold-time @chj rctl)
 40  k_sft     (tap-hold 500 $hold-time @chk rsft)
 41  l_ralt    (tap-hold 500 $hold-time @chl ralt)
 42  scln_met  (tap-hold 500 $hold-time @chscln rmet)
 43  apos_hyp  (tap-hold 500 $hold-time apos @hyper)
 44  s_met     (tap-hold 500 $hold-time s lmet) 
 45  d_alt     (tap-hold 500 $hold-time d lalt)
 46  f_sft     (tap-hold 500 $hold-time f lsft) 
 47  p_rsft    (tap-hold $tap-time $hold-time p rsft)
 48  i_ralt    (tap-hold $tap-time $hold-time i ralt)
 49  o_rmet    (tap-hold $tap-time $hold-time o rmet)
 50  ;; fnl       (one-shot 5000 (layer-while-held fn))
 51  thyper    (tap-hold $tap-time $hold-time spc @hyper)
 52  backforth (tap-hold 100 $hold-time M-tab rsft) 
 53  ;; nav  	    (layer-toggle nav_layer)
 54  ;; scln_nav  (tap-hold $tap-time $hold-time scln @nav)
 55  )
 56
 57(defsrc
 58  esc         f1   f2   f3   f4  f5   f6   f7   f8   f9   f10 f11 f12  home end ins del         ;;  Row 1
 59  grv 1    2    3    4   5    6    7    8    9    0   -   =    bspc     ;;  Row 2
 60  tab         q    w    e    r   t    y    u    i    o    p   [   ]    bksl     ;;  Row 3
 61  caps        a    s    d    f   g    h    j    k    l    scln   '   ret           ;;  Row 4
 62  lsft        z    x    c   v    b    n    m    ,    .   /   rsft       ;;  Row 5
 63  lctl        lmet lalt           spc              ralt rctl pgup up pgdn ;;  Row 6
 64                                                                  left down right
 65)
 66
 67(deflayer base
 68  esc         f1   f2   f3   f4  f5   f6   f7   f8   f9   f10 f11 f12  home end ins del         ;;  Row 1
 69  grv 1    2    3    4   5    6    7    8    9    0   -   =    bspc     ;;  Row 2
 70  tab         q    w    e    r   t    y    u    i    @cho    @chp   [   ]    bksl     ;;  Row 3
 71  caps        @a_met @s_alt @d_sft @f_ctl   @g_hyp    @h_hyp @j_ctl @k_sft @l_ralt  @scln_met apos   ret           ;;  Row 4
 72  lsft        z    x    c   v    b    n    m    ,    .   /   rsft       ;;  Row 5
 73  lctl        lmet lalt           spc              ralt rctl pgup up pgdn ;;  Row 6
 74                                                                  left down right
 75)
 76
 77;; (deflayer base
 78;;   ;; Row 1
 79;;   esc brdn brup vold volu _    _    prev pp   next mute vold volu
 80;;   ;; Row 2
 81;;  grv  1    2    3    4    5    6    7    8    9    0    -    =    bspc
 82;;   ;; Row 3
 83;;   tab      q    w    e    r    t    y    u    i   o   p  [    ]    bksl
 84;;   ;; Row 4
 85;;   @escctrl  a    @s_met @d_alt @f_sft g    @chh    @chj    @chk    @chl    @scln_nav '    ret
 86;;   ;; Row 5
 87;;   @backforth @nav z    x    c    v    b    n    m    ,    .    /    rsft up
 88;;   ;; Row 6
 89;;   lctl lalt lmet           @thyper        rmet ralt left down rght
 90;; )
 91
 92;; (deflayer fn
 93;;   ;; Row 1
 94;;   _    f1   f2   f3   f4   f5   f6   f7   f8   f9   f10  f11  f12
 95;;   ;; Row 2
 96;;   _    _    _    _    _    _    _    _    _    _    _    _    _    del
 97;;   ;; Row 3
 98;;   _    _    _    _    _    _    _    _    _    _    _    _    _    _
 99;;   ;; Row 4
100;;   _    _    _    _    _    _    _    _    _    _    _    _    _
101;;   ;; Row 5
102;;   _    _  _  _    _    _    _    _    _    _    _    _    _    pgup
103;;   ;; Row 6
104;;   _    _    _              _              _    _    home pgdn end
105;; )
106;; 
107;; (deflayer nav_layer
108;;   ;; Row 1
109;;   _    _    _    _    _    _    _    _    _    _    _    _    _
110;;   ;; Row 2
111;;   _    _    _    _    _    _    _    _    _    _    _    _    _    _
112;;   ;; Row 3
113;;   _    left    right       _    _    _    _        _     up  M-`    _    _    _    _
114;;   ;; Row 4
115;;   _    _        down    up    _    _    _       left down right  _    _    _
116;;   ;; Row 5
117;;   _    _        left       right   _    _    _       _       _    _ _    _    _    _
118;;   ;; Row 6
119;;   _  M-S-[    M-S-]                  _              M-S-[    M-S-]    _    _    _
120;; )