[R] Single character input without Enter
Greg Snow
Greg.Snow at imail.org
Thu Feb 25 20:25:07 CET 2010
The getGraphicsEvent function only works on windows (at least last time I checked), so if you are working only on windows, you can use that. If you want something that works cross platform, then the tcltk solution is a possibility.
Your original question did not indicate if you would be willing to have this working through a graph or not, so I was not sure if this was a good solution or not.
I would have told you this on Monday, but I was out of town the first part of the week and not reading r-help.
--
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 Dieter Menne
> Sent: Thursday, February 25, 2010 11:29 AM
> To: r-help at r-project.org
> Subject: Re: [R] Single character input without Enter
>
>
>
> Greg Snow-2 wrote:
> >
> > The playSudoku function in the sudoku package has 2 examples/methods
> of
> > responding to single key strokes, whether those methods will work for
> your
> > application or not depends on what you are trying to do.
> >
> >
>
> Thanks, Greg, it boils down to the rather basic
>
> getGraphicsEvent(prompt = "Waiting for input",
> onMouseDown = NULL, onMouseMove = NULL,
> onMouseUp = NULL, onKeybd = NULL)
>
> in grDevices; so no tclk needed. Strange that nobody told me....
>
> Dieter
>
>
>
>
> --
> View this message in context: http://n4.nabble.com/Single-character-
> input-without-Enter-tp1564153p1569460.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> 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