Closed fox0430 closed 2 years ago
I used getKey to pressCtrl-J but it's Enter. Is it only my environment? Do you know anything?
getKey
Ctrl-J
Enter
OS: Arch Linux Terminal: Urxvt & Alacritty Nim: v1.6.6
Code:
import std/os import pkg/illwill illwillInit() while true: let key = getKey() if key != None: echo key echo int(key) sleep 20
Start this program and press Ctrl-J
Enter 13
In addition, I can get it normally with terminal.getch.
terminal.getch
import std/terminal let key = getch() echo int(key)
10
Terminal issue, closing.
https://www.reddit.com/r/programming/comments/7qxgy/real_programmers_use_ctrlj_instead_of_enter_key/
I used
getKey
to pressCtrl-J
but it'sEnter
. Is it only my environment? Do you know anything?OS: Arch Linux Terminal: Urxvt & Alacritty Nim: v1.6.6
Code:
Start this program and press
Ctrl-J
In addition, I can get it normally with
terminal.getch
.Start this program and press
Ctrl-J