From 0b5de2d2b8b0ec950c8bba24c83927d939309347 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Sat, 30 Jan 2016 20:18:15 +0200 Subject: [PATCH] Add ctrl? predicate to keyboard ns. --- src/uxbox/ui/keyboard.cljs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/uxbox/ui/keyboard.cljs b/src/uxbox/ui/keyboard.cljs index 56491066e7..c99a429680 100644 --- a/src/uxbox/ui/keyboard.cljs +++ b/src/uxbox/ui/keyboard.cljs @@ -5,5 +5,9 @@ (fn [e] (= (.-keyCode e) keycode))) +(defn ctrl? + [event] + (.-ctrlKey event)) + (def esc? (is-keycode? 27)) (def enter? (is-keycode? 13))