dPaste

~$ cat /etc/kmonad/shinobi.kbd 
(defcfg
  ;; For Linux
  input  (device-file "/dev/input/by-id/shinobi")
  output (uinput-sink "Shinobi KMonad output")

  ;; For Windows
  ;; input  (low-level-hook)
  ;; output (send-event-sink)

  ;; For MacOS
  ;; input  (iokit-name "my-keyboard-product-string")
  ;; output (kext)

  ;; Comment this if you want unhandled events not to be emitted
  fallthrough true

  ;; Set this to false to disable any command-execution in KMonad
  allow-cmd false
)


(defsrc
  esc  f1   f2   f3   f4   f5   f6   f7   f8   f9   f10  f11  f12        ssrq slck pause
  grv  1    2    3    4    5    6    7    8    9    0    -    =    bspc  ins  home pgup  nlck kp/  kp*  kp-
  tab  q    w    e    r    t    y    u    i    o    p    [    ]    \     del  end  pgdn  kp7  kp8  kp9  kp+
  caps a    s    d    f    g    h    j    k    l    ;    '    ret                        kp4  kp5  kp6
  lsft z    x    c    v    b    n    m    ,    .    /    rsft                 up         kp1  kp2  kp3  kprt
  lctl lmet lalt           spc            ralt rmet cmp  rctl            left down rght  kp0  kp.
)

(deflayer default
  esc  f1   f2   f3   f4   f5   f6   f7   f8   f9   f10  f11  f12        ssrq slck pause
  grv  1    2    3    4    5    6    7    8    9    0    -    =    bspc  ins  home pgup  nlck kp/  kp*  kp-
  tab  q    w    e    r    t    y    u    i    o    p    [    ]    \     del  end  pgdn  kp7  kp8  kp9  kp+
  caps a    s    d    f    g    h    j    k    l    ;    '    ret                        kp4  kp5  kp6
  lsft z    x    c    v    b    n    m    ,    .    /    rsft                 up         kp1  kp2  kp3  kprt
  lctl @fn lalt           spc            ralt rmet  @fn  rctl            left down rght  kp0  kp.
)

(deflayer fnlayer
  _    _    _    _    _    _    _    _    _    _    _    _    _          _    _    _
  _    f1   f2   f3   f4   f5   f6   f7   f8   f9   f10  f11  f12 del    _    _    _     _    _    _    _
  _  prev  pp  next   _    _  home  pgdn pgup end   _    _    _    _     _    _    _     _    _    _    _
  _    _  vold volu   _    _  left  down  up right  _   ins   _                          _    _    _
  _ back forward _    _    _    _    _    _    _    _    _                    _          _    _    _    _
  _    _    _              _              _    _    _    _               _    _    _     _    _   
)

(defalias fn (tap-hold 300 lmet (layer-toggle fnlayer)))