Skip to content

Commit bfbf73c

Browse files
committed
Layout Loading, Reagent Fixes, Key Label fixes
- Beginnings of historical layout loading, currently can get multiple layouts off the server - Fixed a ton of reagent components that were incorrect when used with r/atoms - Fixed some mouse movement key labels - Flipped NODE_ENV to production on prod_build
1 parent b02b363 commit bfbf73c

15 files changed

+572
-485
lines changed

build.boot

+4-2
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@
6666
(cljs :ids #{"renderer"}
6767
;; TODO - Need to figure out all the different externs needed.
6868
:optimizations :none ;:advanced
69-
:compiler-options {:load-tests false})
69+
:compiler-options {:load-tests false
70+
:closure-defines {'process.env/NODE_ENV "production"}})
7071
;; Right now an npm-install will call a naked `target` call clearing everything
7172
;; until a good method for npm dependencies is found this will have to do for now.
7273
(target :no-clean true)))
@@ -92,7 +93,8 @@
9293
(cljs-devtools)
9394
;; Compile renderer =========================================
9495
(cljs :ids #{"renderer"}
95-
:compiler-options {:closure-defines {'kii.env/dev? true}
96+
:compiler-options {:closure-defines {'kii.env/dev? true
97+
'process.env/NODE_ENV "production"}
9698
:output-wrapper true
9799
; There's a little funny business going on with exporting other ns vars
98100
; to reduce the proliferation of imports for small components so the

src/kii/device/keyboard.cljs

+102-84
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,20 @@
88
{:vendor-id 0x1209 :product-id 0x01cb :flashable? true}]) ;Registered Boot
99

1010
(def keyboards
11-
[{:display "Infinity Ergodox"
12-
:names ["MDErgo1" "Infinity_Ergodox"]
13-
:layouts ["Blank"]
14-
:image "ergodox.png"
11+
[{:display "Infinity Ergodox"
12+
:names ["MDErgo1" "Infinity_Ergodox"]
13+
:variants ["Default"]
14+
:image "ergodox.png"
1515
:visuals-enabled? false
16-
;; TODO: layout-detail
16+
;; TODO: variant-detail
17+
:layouts {"Default" ["Default" "Blank"]}
1718
}
1819
{:display "Infinity 60% LED"
1920
:names ["MD1.1" "Infinity_60%_LED"]
20-
:layouts ["Standard" "Hacker" "Alphabet"]
21+
:variants ["Standard" "Hacker" "Alphabet"]
2122
:image "infinity-led.png"
2223
:visuals-enabled? false
23-
:layout-detail {"Standard"
24+
:variant-detail {"Standard"
2425
{:rows [0 1 2 3 4]
2526
:keys [[:1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :2d]
2627
[:1.5 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1.5]
@@ -43,88 +44,103 @@
4344
[:2.25 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1.75d :1d]
4445
[:1.25d :1.25d :1.25d :6.25d :1.25d :1.25d :1.25d :1.25d]
4546
]}
46-
}}
47-
{:display "Infinity 60%"
48-
:names ["MD1" "Infinity_60%"]
49-
:layouts ["Standard" "Hacker"]
50-
:image "infinity.png"
47+
}
48+
49+
:layouts {"Standard" ["Standard" "StandardBlank"]
50+
"Hacker" ["Hacker" "HackerBlank"]
51+
"Alphabet" ["Alphabet" "AlphabetBlank"]}
52+
}
53+
{:display "Infinity 60%"
54+
:names ["MD1" "Infinity_60%"]
55+
:variants ["Standard" "Hacker"]
56+
:image "infinity.png"
5157
:visuals-enabled? false
52-
:layout-detail {"Standard"
53-
{:rows [0 1 2 3 4]
54-
:keys [[:1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1]
55-
[:1.5 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1.5]
56-
[:1.75 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :2.25]
57-
[:2.25 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1.75 :1]
58-
[:1.25d :1.25d :1.25d :6.25d :1.25d :1.25d :1.25d :1.25d]
59-
]}
60-
"Hacker"
61-
{:rows [0 1 2 3 4]
62-
:keys [[:1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1]
63-
[:1.5 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1.5]
64-
[:1.75 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :2.25]
65-
[:2.25 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1.75 :1]
66-
[:1.5d :1d :1.5d :6d :1.5d :1d :1d :1.5d]]}
67-
}}
68-
{:display "WhiteFox"
69-
:names ["WhiteFox"]
70-
:layouts ["The True Fox" "Aria" "Iso" "Vanilla" "Jack of All Trades" "Winkeyless"]
71-
:image "whitefox.png"
58+
:variant-detail {"Standard"
59+
{:rows [0 1 2 3 4]
60+
:keys [[:1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1]
61+
[:1.5 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1.5]
62+
[:1.75 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :2.25]
63+
[:2.25 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1.75 :1]
64+
[:1.25d :1.25d :1.25d :6.25d :1.25d :1.25d :1.25d :1.25d]
65+
]}
66+
"Hacker"
67+
{:rows [0 1 2 3 4]
68+
:keys [[:1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1]
69+
[:1.5 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1.5]
70+
[:1.75 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :2.25]
71+
[:2.25 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1.75 :1]
72+
[:1.5d :1d :1.5d :6d :1.5d :1d :1d :1.5d]]}
73+
}
74+
:layouts {"Standard" ["Standard" "StandardBlank"]
75+
"Hacker" ["Hacker" "HackerBlank"]}
76+
}
77+
{:display "WhiteFox"
78+
:names ["WhiteFox"]
79+
:variants ["The True Fox" "Aria" "Iso" "Vanilla" "Jack of All Trades" "Winkeyless"]
80+
:image "whitefox.png"
7281
:visuals-enabled? false
73-
:layout-detail {
74-
"The True Fox"
75-
{:rows [0 1 2 3 4]
76-
:keys [[:1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1d :1d :1]
77-
[:1.5 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1.5d :1]
78-
[:1.75 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :2.25d :1]
79-
[:2.25d :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1.75d :1d :1]
80-
[:1.25d :1.25d :1.25d :6.25d :1.25d :1.25d :0.5s :1 :1 :1]
81-
]}
82-
"Aria"
83-
{:rows [0 1 2 3 4]
84-
:keys [[:1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :2d :1]
85-
[:1.5 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1.5d :1]
86-
[:1.75 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :2.25d :1]
87-
[:2.25d :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1.75d :1d :1]
88-
[:1.25d :1.25d :1.25d :6.25d :1.25d :1.25d :0.5s :1 :1 :1]
89-
]}
90-
"Iso"
91-
{:rows [0 1 2 3 4]
92-
:keys [[:1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :2d :1]
93-
[:1.5 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1.5s :1]
94-
[:1.75 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1d :1.25d :1]
95-
[:1.25d :1d :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1.75d :1d :1]
96-
[:1.25d :1.25d :1.25d :6.25d :1d :1d :1d :1 :1 :1]
97-
]}
98-
"Vanilla"
99-
{:rows [0 1 2 3 4]
100-
:keys [[:1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :2d :1]
101-
[:1.5 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1.5d :1]
102-
[:1.75 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :2.25d :1]
103-
[:2.25d :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1.75d :1d :1]
104-
[:1.25d :1.25d :1.25d :6.25d :1d :1d :1d :1 :1 :1]
105-
]}
106-
"Jack of All Trades"
107-
{:rows [0 1 2 3 4]
108-
:keys [[:1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :2d :1]
109-
[:1.5 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1.5d :1]
110-
[:1.75 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :2.25d :1]
111-
[:2.25d :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :2.75d :1]
112-
[:1.25d :1.25d :1.25d :6.25d :1.25d :1.25d :0.5s :1 :1 :1]
113-
]}
114-
"Winkeyless"
115-
{:rows [0 1 2 3 4]
116-
:keys [[:1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :2d :1]
117-
[:1.5 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1.5d :1]
118-
[:1.75 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :2.25d :1]
119-
[:2.25d :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1.75d :1d :1]
120-
[:1.5d :1.5d :7d :1.5d :1.5d :1 :1 :1]
121-
]}
122-
}}
82+
:variant-detail {
83+
"The True Fox"
84+
{:rows [0 1 2 3 4]
85+
:keys [[:1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1d :1d :1]
86+
[:1.5 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1.5d :1]
87+
[:1.75 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :2.25d :1]
88+
[:2.25d :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1.75d :1d :1]
89+
[:1.25d :1.25d :1.25d :6.25d :1.25d :1.25d :0.5s :1 :1 :1]
90+
]}
91+
"Aria"
92+
{:rows [0 1 2 3 4]
93+
:keys [[:1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :2d :1]
94+
[:1.5 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1.5d :1]
95+
[:1.75 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :2.25d :1]
96+
[:2.25d :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1.75d :1d :1]
97+
[:1.25d :1.25d :1.25d :6.25d :1.25d :1.25d :0.5s :1 :1 :1]
98+
]}
99+
"Iso"
100+
{:rows [0 1 2 3 4]
101+
:keys [[:1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :2d :1]
102+
[:1.5 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1.5s :1]
103+
[:1.75 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1d :1.25d :1]
104+
[:1.25d :1d :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1.75d :1d :1]
105+
[:1.25d :1.25d :1.25d :6.25d :1d :1d :1d :1 :1 :1]
106+
]}
107+
"Vanilla"
108+
{:rows [0 1 2 3 4]
109+
:keys [[:1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :2d :1]
110+
[:1.5 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1.5d :1]
111+
[:1.75 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :2.25d :1]
112+
[:2.25d :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1.75d :1d :1]
113+
[:1.25d :1.25d :1.25d :6.25d :1d :1d :1d :1 :1 :1]
114+
]}
115+
"Jack of All Trades"
116+
{:rows [0 1 2 3 4]
117+
:keys [[:1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :2d :1]
118+
[:1.5 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1.5d :1]
119+
[:1.75 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :2.25d :1]
120+
[:2.25d :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :2.75d :1]
121+
[:1.25d :1.25d :1.25d :6.25d :1.25d :1.25d :0.5s :1 :1 :1]
122+
]}
123+
"Winkeyless"
124+
{:rows [0 1 2 3 4]
125+
:keys [[:1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :2d :1]
126+
[:1.5 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1.5d :1]
127+
[:1.75 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :2.25d :1]
128+
[:2.25d :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1.75d :1d :1]
129+
[:1.5d :1.5d :7d :1.5d :1.5d :1 :1 :1]
130+
]}
131+
}
132+
:layouts {"The True Fox" ["TheTrueFox"]
133+
"Aria" ["Aria"]
134+
"Iso" ["Iso"]
135+
"Vanilla" ["Vanilla"]
136+
"Jack of All Trades" ["JackofAllTrades"]
137+
"Winkeyless" ["Winkeyless"]}
138+
}
123139
{:display "K-Type"
124140
:names ["KType" "K-Type"]
125-
:layouts ["Standard"]
141+
:variants ["Standard"]
126142
:image "k-type.png"
127-
:layout-detail {"Standard"
143+
:variant-detail {"Standard"
128144
{:rows [0 1.5 2.5 3.5 4.5 5.5]
129145
:keys [[:1 :1s :1 :1 :1 :1 :0.5s :1 :1 :1 :1 :0.5s :1 :1 :1 :1 :0.5s :1 :1 :1]
130146
[:1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :1 :2 :0.5s :1 :1 :1]
@@ -134,6 +150,7 @@
134150
[:1.25 :1.25 :1.25 :6.25 :1.25 :1.25 :1.25 :1.25 :0.5s :1 :1 :1]
135151
]
136152
}}
153+
:layouts {"Standard" ["Standard" "NoAnimations"]}
137154
}])
138155

139156
(defn get-ic-device
@@ -155,6 +172,7 @@
155172
(first (filter (fn [k] (some #(s/includes? product %) (:names k))) keyboards)))
156173
{:display "Unknown"
157174
:names []
175+
:variants []
158176
:layouts []
159177
:image "unknown.png"}))
160178

src/kii/keys/firmware/predefined.cljs

+4-4
Original file line numberDiff line numberDiff line change
@@ -241,13 +241,13 @@
241241
[:mouse/btn15 "Btn 15" ["#:mouseOut( 15, 0, 0 )"] :mouse]
242242
[:mouse/btn16 "Btn 16" ["#:mouseOut( 16, 0, 0 )"] :mouse]
243243
[:mouse/up1 "↑ x1" ["#:mouseOut( 0, 0, 1 )"] :mouse]
244-
[:mouse/up5 "↑ x5" ["#:mouseOut( 0, 0, 5 )"] :mouse]
245244
[:mouse/dn1 "↓ x1" ["#:mouseOut( 0, 0, -1 )"] :mouse]
246-
[:mouse/dn5 "↓ x5" ["#:mouseOut( 0, 0, -5 )"] :mouse]
247245
[:mouse/lf1 "← x1" ["#:mouseOut( 0, -1, 0 )"] :mouse]
248-
[:mouse/lf5 "← x1" ["#:mouseOut( 0, -5, 0 )"] :mouse]
249246
[:mouse/rt1 "→ x1" ["#:mouseOut( 0, 1, 0 )"] :mouse]
250-
[:mouse/rt5 "→ x1" ["#:mouseOut( 0, 5, 0 )"] :mouse]
247+
[:mouse/up5 "↑ x5" ["#:mouseOut( 0, 0, 5 )"] :mouse]
248+
[:mouse/dn5 "↓ x5" ["#:mouseOut( 0, 0, -5 )"] :mouse]
249+
[:mouse/lf5 "← x5" ["#:mouseOut( 0, -5, 0 )"] :mouse]
250+
[:mouse/rt5 "→ x5" ["#:mouseOut( 0, 5, 0 )"] :mouse]
251251

252252
;; macros
253253
[:mac/tilde "~" ["#:'~'"] :mac {:font-size "16px"}]

0 commit comments

Comments
 (0)