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

Keyboard numbers vs. number pad numbers #60

Closed
paraviz02 opened this issue Apr 8, 2019 · 4 comments
Closed

Keyboard numbers vs. number pad numbers #60

paraviz02 opened this issue Apr 8, 2019 · 4 comments
Assignees
Labels
📦 Use case A question regarding implementation

Comments

@paraviz02
Copy link

Hello, we have a "PIN pad" and are trying to figure out how we can map the normal keyboard number keys and the number pad keys together so that they will both highlight the same simple-keyboard key.

For example, if we use the {numpad1} key in simple-keyboard, it only highlights when using the number pad key, but not the "1" key on the keyboard. And vice versa, if we use the 1 key, only the "1" key on the keyboard will highlight, but not the number pad key.

Is there a configuration item that I have missed, or something that I can do to have this type of function?

Thank you!

@hodgef
Copy link
Owner

hodgef commented Apr 8, 2019

Hello @paraviz02,

Are you implementing this in vanilla JS, or is it Angular or Vue?

Also, are you using this kind of set-up?
https://simple-keyboard.com/demo/#fullkeyboard

@paraviz02
Copy link
Author

Hello @hodgef - thanks for the super-quick reply!

We're using vanilla JS, with jQuery. Attached is an image of the way we have styled the number pad.

The layout is:
layout:{[ "{numpad1} {numpad2} {numpad3}", "{numpad4} {numpad5} {numpad6}", "{numpad7} {numpad8} {numpad9}", "▼ {numpad0} {bksp}" ]}

Hopefully I'm missing something very obvious. Beautiful keyboard, by the way.
Screen Shot 2019-04-08 at 3 11 51 PM

~Laz

@hodgef
Copy link
Owner

hodgef commented Apr 8, 2019

Hey @paraviz02,

Unfortunately this use-case is not supported out of the box, so instead of physicalKeyboardHighlight the feature would have to be custom.

Luckily I had done custom highlighting of the keys before. Here's an implementation resembling your use-case:

Demo: https://codesandbox.io/s/github/simple-keyboard/simple-keyboard-custom-highlight-button/tree/master/

Hope that helps! If it doesn't let me know and I'll reopen the ticket :)

Francisco Hodge

@hodgef hodgef closed this as completed Apr 8, 2019
@hodgef hodgef self-assigned this Apr 8, 2019
@hodgef hodgef added the 📦 Use case A question regarding implementation label Apr 8, 2019
@paraviz02
Copy link
Author

paraviz02 commented Apr 8, 2019

Awesome, I will check that out. Thanks Francisco. Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 Use case A question regarding implementation
Projects
None yet
Development

No branches or pull requests

2 participants