August 16, 2013 Raw keyboard input | ||||
---|---|---|---|---|
| ||||
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')? |
August 17, 2013 Re: Raw keyboard input | ||||
---|---|---|---|---|
| ||||
Posted in reply to DLearner | 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. |
Copyright © 1999-2021 by the D Language Foundation