Skip to content

Conversation

@wamukat
Copy link
Contributor

@wamukat wamukat commented Sep 7, 2020

This PR resolve #44 .

- pushbutton-element - membrane-keypad-element
@urish
Copy link
Collaborator

urish commented Sep 7, 2020

First of all, thank you!

I'm thinking it might make even more sense to move the SPACE_KEYS array into a common file (e.g. src/utils/keys.ts or something similar), instead of redefining it in each element that needs it. WDYT?

@wamukat
Copy link
Contributor Author

wamukat commented Sep 7, 2020

Thanks for your review!
I will try to move SPACE_KEYS array to common file.

- move `SPACE_KEYS` to common file
@wamukat
Copy link
Contributor Author

wamukat commented Sep 7, 2020

@urish I fixed. Please review again.

@sutaburosu
Copy link
Contributor

@takuma-watanabe there's also triggerKeys in the Nano element that could be adapted to use utils\keys.ts. I included Enter in that list because I found pressing Space could also scroll the window in some circumstances.

@urish urish merged commit a388503 into wokwi:master Sep 7, 2020
@urish
Copy link
Collaborator

urish commented Sep 7, 2020

good point @sutaburosu, I'd love to see this in a subsequent PR

@sutaburosu
Copy link
Contributor

I'll do that now. :)

@wamukat
Copy link
Contributor Author

wamukat commented Sep 7, 2020

@sutaburosu I couldn't notice that point. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants