Closed hymkor closed 3 years ago
I would close this pull request because I found another problem. Only wIth this patch, U+2460 ① can not be input in Windows Terminal 1.5 thogh it can in Pure Command Prompt. ( When U+2460 is input by IME, numpad code is not recieved on ReadConsoleInput )
I continue to investigate this problem on my fork branch for a while.
After WindowsTerminal is updated to version 1.5, some emojis ( e.g.: 👨U+1F468) can not be gotten by ReadRune() like unicodes between U+2000 and U+2FFF , when they are pasted by mouse's right button.
So, I tried to fix it like #38 , but to prevent from the failure like #40 , I appended the code to check whether NUMPAD(s) are pressed or not, because when the unicode is pasted , the sequence: (1) ALT-Presse, (2) some NUMPAD(s)-Pressed/Released and (3) ALT-Released are received from ReadConsoleInput.
You can confirm by these process.
go run _example/simple.go
on the WindowsTerminal.0xD83D: �
(0xD83D is the first UTF16 code of the surrogate pair)If problems do not exist, would you please merge it , @mattn ?