File tree Expand file tree Collapse file tree 3 files changed +10
-8
lines changed Expand file tree Collapse file tree 3 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -164,10 +164,10 @@ one if there's none already buffered) you can use `get-key-blocking`:
164
164
;
165
165
; => \a
166
166
167
- ` get-key-blocking ` optionally accepts a check interval or timeout:
167
+ ` get-key-blocking ` optionally accepts a check interval and/ or timeout:
168
168
169
169
:::clojure
170
- (t/get-key-blocking term :interval 100 :timeout 5000)
170
+ (t/get-key-blocking term { :interval 100 :timeout 5000} )
171
171
;
172
172
; Key presses will be checked for every 100 msecs. If you wait
173
173
; 5 seconds, nil will be returned.
Original file line number Diff line number Diff line change 281
281
returning nil.
282
282
283
283
"
284
- [^Screen screen & {:keys [interval timeout] :as opts}]
285
- (block-on get-key [screen] opts))
284
+ ([^Screen screen] (get-key-blocking screen {}))
285
+ ([^Screen screen & {:keys [interval timeout] :as opts}]
286
+ (block-on get-key [screen] opts)))
286
287
287
288
288
289
(comment
Original file line number Diff line number Diff line change 246
246
returning nil.
247
247
248
248
"
249
- [^Terminal terminal & {:keys [interval timeout] :as opts}]
250
- (block-on get-key [terminal] opts))
249
+ ([^Terminal terminal] (get-key-blocking terminal {}))
250
+ ([^Terminal terminal {:keys [interval timeout] :as opts}]
251
+ (block-on get-key [terminal] opts)))
251
252
252
253
253
254
(comment
260
261
(start t)
261
262
(set-fg-color t :yellow )
262
263
(put-string t " Hello, world!" )
263
- (get-key-blocking t :timeout 1000 )
264
- (get-key-blocking t :interval 2000 )
264
+ (get-key-blocking t { :timeout 1000 } )
265
+ (get-key-blocking t { :interval 2000 } )
265
266
(stop t)
266
267
267
268
)
You can’t perform that action at this time.
0 commit comments