This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-06-02
Channels
- # bangalore-clj (1)
- # beginners (5)
- # cider (24)
- # clara (2)
- # cljs-dev (6)
- # cljsrn (2)
- # clojure (10)
- # clojure-austin (2)
- # clojure-serbia (1)
- # clojure-spec (6)
- # clojure-uk (6)
- # clojurescript (59)
- # cursive (1)
- # datomic (10)
- # emacs (3)
- # events (7)
- # graphql (1)
- # jobs (2)
- # lein-figwheel (9)
- # off-topic (40)
- # pedestal (5)
- # portkey (2)
- # re-frame (5)
- # reagent (20)
- # shadow-cljs (7)
- # spacemacs (4)
- # specter (19)
- # testing (21)
(char 1) ;; => \^A
Seems to be the character literal captured by libGDX's keyTyped
callback (class: InputProcessor
), when I press Ctrl+a. But is there any way to type these literals in Clojure, so I don't have to compare against magic values like 1
?
\u0001
, still magic, but at least a literal. Libgdx should be able to capture ctrl and A keypresses separately, which might make more sense if you are writing a game.
👍 4
Yes, I went with handling the keyDown
/`keyUp` events instead, which lets me get the keys separately.
that’s a Unicode char literal
user=> (= (char 1) \u0001)
true
@alexmiller Ah, I see thanks!