-
Notifications
You must be signed in to change notification settings - Fork 337
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
Improve german keyboard (special characters) support #85
base: master
Are you sure you want to change the base?
Conversation
Update from original
…c, windows and linux with a german keyboard
I tested your patch on French keyboard, it solve few AltGr chars (but not all) |
Can you try an empty "if (ev.altKey && ev.ctrlKey) {" ? I added "if (ev.altKey && ev.ctrlKey) {" To work this part of code need "ev.ctrlKey" without "ev.altKey" or reciprocally There is another equivalent code : "ev.ctrlKey and not ev.altKey" / "ev.altKey and not ev.ctrlKey" for the two "if". Diff with current master :
Working code :
|
Could you just tell me your desired key combinations? I'll check afterwards how I could implement them most effectively. |
Hello, on Firefox, all French AltGr + "234567890)=" combinations work with this "EMPTY" patch. But there is no effect on Internet Explorer (I check on recent versions of any browser only, crap code for old IE is not needed). I tested few javascript keypress/keydown event monitor, all woth with AltGr on FF&IE but I don't understand at this time why there is a I.E bug in term.js Thanks, |
I tried to fix to handle all the non-English characters. #97 |
Hey,
I've added a few keyDown actions to improve the special characters support ([,],|,{,},~,@,€,) under windows, linux and mac when using a German keyboard.
I sometimes had to use the keyIdentifier instead of the keyCode due to ambiguous and strange keyCodes using ALT + "number line" on a german mac keyboard. For instance, ALT + 5 produced the same keyCode as ALT + 8.
Furthermore, I saw that you sometimes check for a keyCode and then weather ALT or CRTL has been pressed as well. There are also other cases where you check weather ALT or CRTL has been pressed and then the keyCode.
I decided to use the latter version to have a coherent block for combinations and hope it's okay for you.
Since some key combinations have different meanings on different keyboard layouts, this kind of special treatment won't go well if other languages would be added.
Do you have any ideas how to improve this in the future? As far as I know, detecting the keyboard layout through JavaScript is not possible. Maybe using a DOM element such as an input field (which works fine on all operation systems and keyboard layouts because of the browser interpretation) with a lot of styling could be used instead.
Any thoughts about that?
Thanks for your great work!!