rsc3/doc/help/ugen/controls/key-state.help.scrbl

21 lines
405 B
Text
Raw Permalink Normal View History

2022-08-24 13:53:18 +00:00
#lang scribble/manual
@(require (for-label racket))
@title{(key-state rate keynum minval maxval lag)}
2022-08-28 10:27:01 +00:00
2022-08-24 13:53:18 +00:00
Report the status of a particular key. A key is either pressed,
or not pressed.
The keycode 38 is the A key on my keyboard. Under X the xev(1)
command is useful in determining your keyboard layout.
2022-08-28 10:27:01 +00:00
@racketblock[
2022-08-24 13:53:18 +00:00
(audition
(out 0 (mul (sin-osc ar 800 0)
(key-state kr 38 0 0.1 0.5))))
2022-08-28 10:27:01 +00:00
]
2022-08-24 13:53:18 +00:00