[Mono-list] How to get an arrow key input on Linux Console.

Jonathan Pryor jonpryor at vt.edu
Thu Apr 2 14:51:42 EDT 2009


On Thu, 2009-04-02 at 17:12 +0900, Jia Lu wrote:
> My command line app cannot get the arrow key input on Linux console.
> I just want to get a up-arrow key and display the last command I
> entered.
> 
> Is there anyway to do that with mono?

Look into Mono.Terminal.Editor; see:

	http://tirania.org/blog/archive/2008/Aug.html

If you have Mono 2.2 or later, you can grab the Mono.Terminal.Editor
sources by doing:

	cp `pkg-config --variable=Sources mono-lineeditor` .

Then building getline.cs into your solution.

 - Jon




More information about the Mono-list mailing list