mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-26 09:14:00 +00:00
revert commit 6cf8a72d498f5cb8a532c2ff3259bc7aecf474ef; Windows fixes getch bug
This commit is contained in:
@@ -727,10 +727,7 @@ proc getch*(): char =
|
||||
doAssert(readConsoleInput(fd, addr(keyEvent), 1, addr(numRead)) != 0)
|
||||
if numRead == 0 or keyEvent.eventType != 1 or keyEvent.bKeyDown == 0:
|
||||
continue
|
||||
if keyEvent.uChar == 0:
|
||||
return char(keyEvent.wVirtualKeyCode)
|
||||
else:
|
||||
return char(keyEvent.uChar)
|
||||
return char(keyEvent.uChar)
|
||||
else:
|
||||
let fd = getFileHandle(stdin)
|
||||
var oldMode: Termios
|
||||
|
||||
Reference in New Issue
Block a user