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

Symbolize special keys #372

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pradyparanjpe
Copy link

Use user-assigned symbols (strings) to represent special keys.
If value of which-key-special-keys is an alist of cons cells,
whose cars are special keys such as SPC, TAB, ...
and the cdrs are symbol strings,
replace the special keys with corresponding symbols.

For backward-compatibility,
if which-key-special-keys is an ordinary list of keys, old logic of trucation to single character works.

Use symbols to represent special keys. If value of
``which-key-special-keys`` is an *alist* of cons
cells, whose cars are special keys such as SPC,
TAB,  ... and the cdrs are symbol strings, replace
the special keys with corresponding symbols.

For backward-compatibility, if
``which-key-special-keys`` is an ordinary list of
keys, old logic of trucation to single character
works.
@pradyparanjpe
Copy link
Author

pradyparanjpe commented Apr 16, 2024

I don't know if this feature edit is worth copyright transfer.
I haven't done such an activity before.
I am (obviously) ready to transfer copyright for the edit if necessary.

EDIT: I have sent the request form anyway; don't know what follows.

@justbur
Copy link
Owner

justbur commented Apr 23, 2024

I believe it will require the copyright transfer given its size, so I will wait to merge it.

By the way, at least part of this is possible now by specifying a replacement string for the key using which-key-replacement-alist. Is it that you want the special key face to apply too?

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

Successfully merging this pull request may close these issues.

None yet

2 participants