-
Notifications
You must be signed in to change notification settings - Fork 723
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
Deadkeys (combos) don't work properly. #79
Comments
Hi Franck! There is a Additionally, the If neither of those methods work, I am open to suggestions on how I can change the keyboard to work better. |
Hi Mottie, I actually need the diacritics! I came up with a first solution which is kind of a proof of concept and only works for characters entered from the physical keyboard, not the virtual one by clicking on the keys. Franck |
Sorry I haven't gotten back to you, but I do like your idea of checking the input for the last keys pressed instead of the entire input. WIth that change, the I still have a few projects I need to catch up on, but I'll look into a modification using this method soon. Thanks! |
Hi Franck! In the latest update (v1.10), I've modified how combo keys are detected. Now only the left two characters are checked for dead key combinations. So if you enter something like I hope this change makes the dead keys more useful for everyone :) |
Hi Mottie, sorry for the late reply. I haven't tried your solution yet but I see an usability issue: this mechanism is different from the one typically used to enter diacritics by pressing + or to disable the functionality by pressing + . (I use it daily to enter French or German diacritics on a English keyboard). Franck |
So if I enter a dead key then press space to cancel it from being a combination, does it enter a space or not? An issue with that method would be that if you add content to the keyboard externally, it wouldn't be able to determine what should or should not become combined. This is especially a problem with the typing extension. For example, I paste in the following into the keyboard - |
it's how it works: As for the the issue you mentioned I think it's not an issue but a feature :) . Dead keys are used to easily enter special characters while typing. For the typing extension the pasted text (created with another text editor) should already contain the character with diacritics (hellô word). I'd like to know what the users of this library think about it. The new option can be tested by cloning my branch and using the first example of the demo (QWERTY text). The letters with diacritics are enclosed by brackets for test purpose ('^' + 'e' => '[^e]') |
Oups, just forget my comment about typing extension. I've just realized it allows us to simulate typing into the keyboard. |
Hey guys. Any who, I guess these are two bugs or questions. The one Im focused on is how to make use of combinations to get letters like ü, ë and so on. I tried: |
Hi @Adikku! Currently, the way combo keys are checked is that it looks at the last two typed keys, if they match the combo pattern, the letter changes. This may not exactly match how dead keys work (space to cancel the combo), but hopefully someday when I have the time, I'll make them work this way. Anyway, all of the default umlaut combos work for me (click the keyboard icon next to the input in this demo). There are two ways to type in
|
Hey Mottie, Do you mean that this is something you need to look at when you find the time? |
Why not just turn off the combos? Set the |
How would I then enable the user to use those characters? If I add the keys for those characters, the keyboard layout would be to large. |
Just include the I was just typing in this bit of information in case you wanted to completely remove the umlaut combo by changing the default options: $.keyboard.defaultOptions.combos['"'] = null;
// removing quote from regex for completeness
$.keyboard.comboRegex = /([`\'~\^ao])([a-z])/mig; Edit: Someday, I'd like to add a toolbar-like row/header to the table which includes the combo key, language selector, etc... |
Yay! Case closed for me :) |
Great! I just wanted to emphasize that the reason this keyboard uses quotes is because you can't type an umlaut on the standard U.S. keyboard without using Alt + keypad numbers (148 for |
That won't be an issue in this case. Its a danish keyboard, targeting |
Hi,
First thanks for this great library. It's (almost:)) what I was looking for for my project.
I think the mechanism to enter diacritics should be revised as it has annoying side effects at the moment.
For example if you take the international keyboard from the demo (http:https://mottie.github.com/Keyboard/index.html)
Entering '^' + 'e' displays 'ê' (which is fine) but if I type 'e' and then add a '^' before '^e' is also transformed, which shouldn't be the case.
In general the code replaces all the strings it finds that match keyboard.comboRegex, so it's basically impossible to enter the string "^e".
A more suitable mechanism would be perhaps to test for each character entered if it's a dead key and display the correct character depending on both the next character entered and the mapping from the property 'combos'.
A deadkey could be escaped by entering 'space' as described in http:https://en.wikipedia.org/wiki/Dead_key.
I may have a look as well to further dive into the source code.
Thanks!
Franck
The text was updated successfully, but these errors were encountered: