0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-10 00:40:30 -05:00
penpot/frontend/uxbox/ui/keyboard.cljs

9 lines
155 B
Clojure

(ns uxbox.ui.keyboard)
(defn is-keycode?
[keycode]
(fn [e]
(= (.-keyCode e) keycode)))
(def esc? (is-keycode? 27))
(def enter? (is-keycode? 13))