Where are declared and how to make build these c identifiers?
Adam D. Ruppe
destructionator at gmail.com
Sun Feb 24 14:34:45 UTC 2019
On Sunday, 24 February 2019 at 12:37:21 UTC, Cleverson Casarin
Uliana wrote:
> OK, it built the executable, but it doesn't work for every key,
> e.g. when I try with arrow and function keys, it always returns
> the same symbol, so I'm unable to distinguish what key has been
> pressed:
Those don't have printable characters associated, so they all
look the same. Try writeln(cast(int) code) - casting it to int
so you can see the number - and you should see the different
results.
Or even
terminal.writeln("You pressed ", cast(KeyboardEvent.Key) ch);
might be a better demo, i should change the docs, since that will
print the name of most keys!
supported key list:
http://dpldocs.info/experimental-docs/arsd.terminal.KeyboardEvent.Key.html
(lowest common denominator between windows and linux)
More information about the Digitalmars-d-learn
mailing list