mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-31 10:22:15 +00:00
committed by
Andreas Rumpf
parent
67ac1aef59
commit
6cf8a72d49
@@ -634,7 +634,10 @@ proc getch*(): char =
|
||||
doAssert(readConsoleInput(fd, addr(keyEvent), 1, addr(numRead)) != 0)
|
||||
if numRead == 0 or keyEvent.eventType != 1 or keyEvent.bKeyDown == 0:
|
||||
continue
|
||||
return char(keyEvent.uChar)
|
||||
if keyEvent.uChar == 0:
|
||||
return char(keyEvent.wVirtualKeyCode)
|
||||
else:
|
||||
return char(keyEvent.uChar)
|
||||
else:
|
||||
let fd = getFileHandle(stdin)
|
||||
var oldMode: Termios
|
||||
|
||||
Reference in New Issue
Block a user