[R] detecting a key press
Greg Snow
Greg.Snow at imail.org
Sat Aug 14 08:22:07 CEST 2010
The playSudoku function in the Sudoku package reacts to keypresses using windows or Tk, you can use that as an example.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at imail.org
801.408.8111
> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of Martin Teicher
> Sent: Friday, August 13, 2010 8:27 PM
> To: r-help at r-project.org
> Subject: [R] detecting a key press
>
> Hi Folks,
>
> I'm relatively new to r. I'd like to have a user respond by pressing a
> 1 or a 2 and determining their choice and the time of response.
> Previous postings have indicated that keyboard responses can be
> processed using scan and readline but both seem to wait for the user to
> also press return. Is there a way to detect the initial key press
> without requiring them to hit return?
>
> Thank you so much.
>
> Martin H. Teicher
> Department of Psychiatry
> McLean Hospital / Harvard Medical School
> Belmont, MA USA
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-
> guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list