Skip to content
Snippets Groups Projects
Commit be0f77fd274d authored by Denis Laxalde's avatar Denis Laxalde
Browse files

py3: fix handling of ctrl keys in crecord (issue6213)

The "keypressed" value in handlekeypressed() is a key name obtained by
curses's getkey(); this can be a multibyte string for special keys
like CTRL keys. Calling curses.unctrl() with such a value fails on
Python 3 with a TypeError as described in issue6213. (On Python 2, this
does not crash, but I'm not sure the result is correct, though it does
no matter here.)

So instead of calling unctrl(), we compare "keypressed" with the
expected "^L" obtained by curses.ascii.ctrl("L").
parent 7cc913396f8c
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment