MCPcopy Create free account
hub / github.com/NetHack/NetHack / tgetch

Function tgetch

outdated/sys/os2/os2.c:36–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34static char BIOSgetch(void);
35
36int
37tgetch()
38{
39 char ch;
40
41 /* BIOSgetch can use the numeric key pad on IBM compatibles. */
42 if (iflags.BIOS)
43 ch = BIOSgetch();
44 else
45 ch = DOSgetch();
46 return ((ch == '\r') ? '\n' : ch);
47}
48
49/*
50 * Keyboard translation tables.

Callers 1

Gem_nhgetchFunction · 0.50

Calls 2

BIOSgetchFunction · 0.70
DOSgetchFunction · 0.70

Tested by

no test coverage detected