Search code examples
inputkeyboardd

How to get keyboard input in D?


How does one get keyboard input in D? Do you have to use standard C functions, or is there a D way to do it?

Edit: By this I mean get events on keypresses, like when the user presses ESC, not just textual input from stdin.


Solution

  • You will need to use standard C functions.

    Though if you are using a GUI library there may be key events you can bind to.