-
Notifications
You must be signed in to change notification settings - Fork 829
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
Pilot cannot press key minus #1815
Comments
I wonder if that explains these intermittent flakes when entering a temporary directory into an Input:
|
Edit: Ignore this message.
>>> import unicodedata
>>> unicodedata.name("_")
'LOW LINE'
|
There are contexts in which |
That works, thank you!!! |
Throughout the code base, there are a couple of places (noted in #1830) where we take a Unicode name and make it more friendly, or take a 'friendly' name and try to recover the original Unicode name. We add a function to go from 'friendly' to the Unicode name, which tackles the issue highlighted in #1815. Related issues: #1815, #1830.
Don't forget to star the repository! Follow @textualizeio for Textual updates. |
The way
App._press_keys
is implemented is flawed in here:textual/src/textual/app.py
Lines 830 to 842 in ba6c8af
There is a clear bug because the transformation done on
key
with two consecutive replacements cannot be undone in line 840 with a single replacement.In particular, the keys HYPHEN-MINUS and REVERSE SOLIDUS show that the underscores that we get after the two consecutive replacements cannot be unambiguously reverted.
On top of that, I have to understand what is the issue with a key that has length 1 and is not "alnum".
For example,
"-"
has length 1, is not "alnum", and could very well be pressed as is. Maybe we want to check ifkey.isprintable
instead?The text was updated successfully, but these errors were encountered: