Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Miniterm in Windows CMD.exe generates junk characters when navigation keys pressed #350

Open
cefn opened this issue Jun 8, 2018 · 1 comment

Comments

@cefn
Copy link
Contributor

cefn commented Jun 8, 2018

At line 126 in miniterm.py the hex value 0x0e should actually read 0xe0

elif z in (unichr(0), unichr(0x0e)): # functions keys, ignore

The current value doesn't filter character sequences as it should (like arrow up, arrow down, page up, page down, home, end which are prefixed with a byte with integer value 224 (hex: 0xe0), following https://www.computerhope.com/ansisys.htm).

This means nav keys are sent through directly making junk characters on the terminal.

@cefn
Copy link
Contributor Author

cefn commented Jun 8, 2018

There is now a fix for this combined with other Windows 10 compatibility fixes which may be merged from #351 As a short-term workaround, the patched miniterm.py can be downloaded on its own from https://github.com/cefn/pyserial/blob/035053d61d3fc54a71914fd77da22e75b2779c26/serial/tools/miniterm.py

It has been proven to work with full arrow key, home key, tab, backspace support and more using this reference invocation on Windows 10.0.17134 connecting to a Vanguard board running stock Micropython 1.9.4

python -m serial.tools.miniterm --filter direct --eol CRLF --encoding utf-8 COM3 115200

@cefn cefn changed the title Hex mistyped in Windows 'nt' implementation of miniterm Using Miniterm in Windows CMD.exe generates junk characters when navigation keys pressed Jun 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant