-
Notifications
You must be signed in to change notification settings - Fork 170
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
Delimiters and keyCode limitation, with non-English keyboards #87
Comments
Hi @ajmas, thank you for taking the time to work on this. I reckon this addresses the same issue as #84 (might be worth passing your eyes over the thread). This looks to be a simple solution without breaking compatibility ( |
For issue #84 is slightly different, since that would need to depend on the |
Yes, sorry - I meant if we could use the same option to tackle both issues. Or even replacing the current keyCode option with an array of characters... though that may get confusing if a user intentionally wishes to type the word |
Fixes issue #87 - delimiters on non US keyboards
There appears to be a small limitation when using keyCode as delimiter. Using the comma, as example:
So the solution would appears to be use use
delimiters=[ 188 ]
, but this actually has a limitation if we are targeting a user base where English is not the UI language and the keyboard places the comma elsewhere, such as with the Arabic keyboard. In this scenario the keyCode is that of the 'K' key.Testing suggest the
event.key
value is actually more accurate in this case. To allow for the character, on top of the key code, while maintaining backwards compatibility, the simplest approach could be a new property:So the resultant code would be:
If you think this is an acceptable solution I could create a PR for this?
The text was updated successfully, but these errors were encountered: