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

Readability of shortcuts #62 #64

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Readability of shortcuts #62 #64

wants to merge 8 commits into from

Conversation

romanr
Copy link
Contributor

@romanr romanr commented May 9, 2024

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

@romanr romanr marked this pull request as ready for review May 9, 2024 18:19
@solomkinmv
Copy link
Owner

Thanks, I'll take a look!

@solomkinmv
Copy link
Owner

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

@solomkinmv solomkinmv self-requested a review May 29, 2024 03:15
@solomkinmv
Copy link
Owner

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
Copy link
Contributor Author

romanr commented May 29, 2024

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.

If you're having error `next: Comamnd not found`:

```bash
npm install -g next
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure that it needs to be global?

Based on the official docs you don't need it: https://nextjs.org/docs/getting-started/installation#manual-installation

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes -g is mistake, sorry.

@solomkinmv
Copy link
Owner

@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
Copy link
Contributor Author

romanr commented May 31, 2024

@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!

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