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
[email protected]
801.408.8111


> -----Original Message-----
> From: [email protected] [mailto:r-help-boun...@r-
> project.org] On Behalf Of Dieter Menne
> Sent: Thursday, February 25, 2010 11:29 AM
> To: [email protected]
> 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.
> 
> ______________________________________________
> [email protected] 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.

______________________________________________
[email protected] 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.

Reply via email to