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

fix(#5577): Use event.key instead of event.code for determining digits #5578

Merged
merged 1 commit into from
Apr 19, 2024

Conversation

csaba215
Copy link
Contributor

@csaba215 csaba215 commented Apr 12, 2024

event.key could be be used instead of event.code, because event.code doesn't take keyboard layout into account.

This should fix #5577.

"The KeyboardEvent.code property represents a physical key on the keyboard (as opposed to the character generated by pressing the key). In other words, this property returns a value that isn't altered by keyboard layout or the state of the modifier keys."
source: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code

"The KeyboardEvent interface's key read-only property returns the value of the key pressed by the user, taking into consideration the state of modifier keys such as Shift as well as the keyboard locale and layout."
source: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key

Thank you for your hard work! I've been enjoying using primevue for my work.

Copy link

vercel bot commented Apr 12, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Ignored Deployments
Name Status Preview Comments Updated (UTC)
primevue ⬜️ Ignored (Inspect) Visit Preview Apr 12, 2024 1:11pm
primevue-v4 ⬜️ Ignored (Inspect) Visit Preview Apr 12, 2024 1:11pm

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.

InputNumber: Cannot input number 0 in Hungarian(QWERTZ) layout
2 participants