digitalmars.D.learn - Raw keyboard input
- DLearner (5/5) Aug 16 2013 Hi,
- H. S. Teoh (10/17) Aug 16 2013 Currently, Phobos doesn't have this capability, but Adam Ruppe has
Hi, Please, under Debian / GDC, what functions are available to read keys directly as pressed (no wait for <Enter>)? And how used (infinite loop exited on specific keycode, eg for 'Esc')?
Aug 16 2013
On Sat, Aug 17, 2013 at 01:21:13AM +0200, DLearner wrote:Hi, Please, under Debian / GDC, what functions are available to read keys directly as pressed (no wait for <Enter>)? And how used (infinite loop exited on specific keycode, eg for 'Esc')?Currently, Phobos doesn't have this capability, but Adam Ruppe has written a Terminal struct that you can use not just for reading input, but for basic terminal manipulation as well: https://github.com/robik/ConsoleD/blob/master/terminal.d Check out the example code in the main() function near the bottom of the file. T -- Written on the window of a clothing store: No shirt, no shoes, no service.
Aug 16 2013