parent
67ac1aef59
commit
6cf8a72d49
1 changed files with 4 additions and 1 deletions
|
|
@ -634,7 +634,10 @@ proc getch*(): char =
|
||||||
doAssert(readConsoleInput(fd, addr(keyEvent), 1, addr(numRead)) != 0)
|
doAssert(readConsoleInput(fd, addr(keyEvent), 1, addr(numRead)) != 0)
|
||||||
if numRead == 0 or keyEvent.eventType != 1 or keyEvent.bKeyDown == 0:
|
if numRead == 0 or keyEvent.eventType != 1 or keyEvent.bKeyDown == 0:
|
||||||
continue
|
continue
|
||||||
return char(keyEvent.uChar)
|
if keyEvent.uChar == 0:
|
||||||
|
return char(keyEvent.wVirtualKeyCode)
|
||||||
|
else:
|
||||||
|
return char(keyEvent.uChar)
|
||||||
else:
|
else:
|
||||||
let fd = getFileHandle(stdin)
|
let fd = getFileHandle(stdin)
|
||||||
var oldMode: Termios
|
var oldMode: Termios
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue