solomkinmv / hotkys

Collection of useful shortcuts for different applications
https://hotkys.com/
MIT License
7 stars 4 forks source link

Readability of shortcuts #62 #64

Closed romanr closed 1 month ago

romanr commented 4 months ago

I can't fix this myself;

image

Can't understand where it should be split so tokens like Space treated like single key. In the end it should look like this:

SPACE

solomkinmv commented 4 months ago

Thanks, I'll take a look!

solomkinmv commented 4 months ago

Sorry for the delay. I'll take a look at the end of the week!

solomkinmv commented 4 months ago

In this case the problem is because of the split. "Space" gets converted to list of chars ["S", "p", "a", "c", "e"]. While you need to add spacing between modifiers and base key

romanr commented 4 months ago

In this case the problem is because of the split. "Space" gets converted to list of chars ["S", "p", "a", "c", "e"]. While you need to add spacing between modifiers and base key

There's list of all keys (in key-codes.json?) We need to iterate on key sequence string, in this example we have "⇧⌘SPACE", and iterating we will find first: shift , and output it as singe div, then we will find and output it, then "Space" is detected as single key because it is present in key-codes, so we output SPACE as single DIV representing one key.

solomkinmv commented 4 months ago

@romanr please see my last commit attached. I wrapped each keyboard token in span and added check if it's a symbol or not

romanr commented 4 months ago

@romanr please see my last commit attached. I wrapped each keyboard token in span and added check if it's a symbol or not

Thanks, will check!

solomkinmv commented 1 month ago

I'll close this issue as stale. Please reopen it if you want to continue working on it.