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

Annoying handling of text input for character sets other than English #9

Open
rawles opened this issue Apr 23, 2015 · 5 comments
Open
Assignees
Labels

Comments

@rawles
Copy link
Owner

rawles commented Apr 23, 2015

When entering text in, for example, Hebrew, the keyboard events received correspond to characters positions for the Hebrew alphabet, but aren't correctly implemented in the editor. For example, on my keyboard, pressing the button marked A in Hebrew input mode yields the letter shin (ש). The code from onkeydown is 65, for the key, and the code from onkeypress is 1513, the Unicode codepoint for the letter shin.

Users constructing Hebrew pages will be unable to do so unless they use a Latin script input method, for which the keys don't even correspond to any key mapping in common use. The same problem exists for Cyrillic and, to a lesser extent, for other languages using the Latin script like Swedish and German.

The code should be adapted to interpret these keyboard events correctly when in the Hebrew character set, Cyrillic character set or others.

@rawles
Copy link
Owner Author

rawles commented Apr 23, 2015

Hebrew is written from right to left, and would need some changes to the cursor behaviour too.

@rawles rawles added the bug label Apr 23, 2015
@rawles
Copy link
Owner Author

rawles commented May 2, 2016

I've made progress on this for English (character set 0) and German (character set 1).

For English, the characters £ (pound sign) and # (hash) work as expected now. For the long dash, you need to enter _ (underscore). There are eight other symbols which aren't on a British keyboard: , , , , ÷, ¼, ½ and ¾. These are all accessible using other keystrokes, since they generate a code at the required character set in each case. The keystrokes are [, ^, ], |, ~, {, \, and } respectively.

For German, the characters Ä, ä, Ö, ö, Ü, ü, ß, § and ° should work as expected.

The remaining character sets are a work in progress, so I'll keep this issue open.

rawles pushed a commit that referenced this issue May 2, 2016
Partial fix for #9: English (0) and German (1) key remappings.
@rawles rawles self-assigned this May 2, 2016
@rawles
Copy link
Owner Author

rawles commented May 2, 2016

I made a bit more progress on Hebrew (character set 6) and right-to-left input. Things seem to work, but if the user wants to enter an escape code, they must press a meta-key to get to Latin characters, which can often set off application shortcuts.

@rawles
Copy link
Owner Author

rawles commented May 2, 2016

I will also do some user testing with a friend who speaks Hebrew natively.

rawles pushed a commit that referenced this issue May 7, 2016
Hebrew support for issue #9.
@rawles rawles mentioned this issue May 7, 2016
rawles pushed a commit that referenced this issue Aug 29, 2016
Partial fix for #9. Swedish chars plus dead key input method
@rawles
Copy link
Owner Author

rawles commented Aug 29, 2016

Now we have the dead key input method for Swedish, I should add it for German (as well as the other languages).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant