On Friday, 19 November 2021 at 17:36:55 UTC, BoQsc wrote:
Let's say I want to write a simple program that asks for an
input of a single character.
After pressing a single key on a keyboard, the character is
printed out and the program should stop.
module test;
void main()
{
import core.s
On Wednesday, 24 November 2021 at 04:51:03 UTC, Alexey wrote:
On Wednesday, 24 November 2021 at 04:48:46 UTC, Alexey wrote:
oh, also I completely missed what you need it to work without
Enter key presses. so here is fixed version
```D
import std.stdio;
import core.sys.posix.termios;
void m
On Wednesday, 24 November 2021 at 04:48:46 UTC, Alexey wrote:
writefln(0x"%c (%1$x %1$d) is inputed", c);
sorry:
```diff
10c10
On Friday, 19 November 2021 at 17:36:55 UTC, BoQsc wrote:
Let's say I want to write a simple program that asks for an
input of a single character.
After pressing a single key on a keyboard, the character is
printed out and the program should stop.
```D
import std.stdio;
void main()
{
On Fri, Nov 19, 2021 at 10:21:42PM +, Adam Ruppe via Digitalmars-d-learn
wrote:
[...]
> The OS functions for getch alone though are actually pretty simple:
>
> 1) change the terminal to "raw" mode. the default is to buffer lines,
> which means your application doesn't get anything until a lin
On Friday, 19 November 2021 at 17:36:55 UTC, BoQsc wrote:
Let's say I want to write a simple program that asks for an
input of a single character.
After pressing a single key on a keyboard, the character is
printed out and the program should stop.
If you want to test on Windows you can do thi
On Friday, 19 November 2021 at 20:51:09 UTC, BoQsc wrote:
But the source file overwhelmed me by its size.
Yeah, the getch function in there builds on the rest of the
events the library offers, so it won't be that useful outside.
The OS functions for getch alone though are actually pretty
s
On Friday, 19 November 2021 at 18:01:57 UTC, Adam D Ruppe wrote:
On Friday, 19 November 2021 at 17:36:55 UTC, BoQsc wrote:
Let's say I want to write a simple program that asks for an
input of a single character.
After pressing a single key on a keyboard, the character is
printed out and the pro
On Friday, 19 November 2021 at 17:36:55 UTC, BoQsc wrote:
Let's say I want to write a simple program that asks for an
input of a single character.
After pressing a single key on a keyboard, the character is
printed out and the program should stop.
This is platform specific. About 10 lines of
Let's say I want to write a simple program that asks for an input
of a single character.
After pressing a single key on a keyboard, the character is
printed out and the program should stop.
10 matches
Mail list logo