textual icon indicating copy to clipboard operation
textual copied to clipboard

Clean up `keys.py` and unify key representations/versions

Open rodrigogiraoserrao opened this issue 2 years ago • 1 comments

The file keys.py contains some important constants and utility functions that are a bit hard to work with. In my opinion, that is because we have not created a straightforward system to identify keys, their display forms, the names by which they can be referred, the corresponding characters, etc. (Of course, this is not made easy by the fact that the type of pretty much all of these things is str...)

Some documentation would also be helpful.

I am confident I can tidy this up, but I'm adding this issue to the backlog so that we can tackle this when we are ready for that.

This is a follow-up to #1926 (and related issues).

rodrigogiraoserrao avatar Mar 02 '23 17:03 rodrigogiraoserrao

Related to work @davep is doing now.

darrenburns avatar Oct 09 '23 12:10 darrenburns

Keys are messy. Not sure we can do much about it now. But at least from the dev's POV it seems simple enough.

willmcgugan avatar Jul 10 '24 10:07 willmcgugan

Don't forget to star the repository!

Follow @textualizeio for Textual updates.

github-actions[bot] avatar Jul 10 '24 10:07 github-actions[bot]