Replace that writefln with this:
writefln("Key hit was %s.", cast(char)getch());You should get the right key displayed then.
Replace that writefln with this:
writefln("Key hit was %s.", cast(char)getch());You should get the right key displayed then.