Feature summary (what you would like to be able to do and where):
Add a keyboard mapping on jquery.ime for silesian alphabets. This involves following mappings:
ō <- o~1
ô <- o~2
ŏ <- o~3
õ <- o~4
ã <- a~5
ů <- ~u
There are another mappings to consider, but the above one ensures fast typing seems to be easy to remember and for fast typing. There is no risk that other letters will be needed in these places in the future is for silesian language.
Use case(s) (list the steps that you performed to discover that problem, and describe the actual underlying problem which you want to solve. Do not describe only a solution):
I asked for help to get silesian letters for Silesian WIkipedia users on https://meta.wikimedia.org/wiki/Tech#Getting_extra_letters_with_javascript as follows:
//Hello, I would like to know what are the limitations to get custom letter on keyboard combination, e.g. ō on alt+q or ô on ctrl+alt+1, using common.js. I tried and it works with combination alt+shift well, but somehow most another combinations, like shift+q, doesnt worked (the text field losted focus and console printed only the numbers 1 and 2).
Motivation: as administrator of a small wikipedia I would like to provide a user friendly solution to use our custom alphabet. Alternative solutions used so far are copy-pasting or usage of autohotkey, but it requires installation of external software and configuration, which makes the entry threshold to the project very high, especially for older people, which our minority language project targets.//
I got following answer by Amir E. Aharoni:
I can make a nicely-managed Silesian keyboard for you.
Combinations with Alt and Ctrl are not very reliable in JavaScript, so I recommend using what we successfully used in many other languages: typing a letter and then typing ~ (tilde) and a character that looks similar to the diacritic. For example:
ŏ <- o~(
ō <- o~-
ô <- o~^
õ <- o~{
ã <- a~{
ů <- ~u
Comments:
ů is simply ~u because it's the only diacritic on u, unlike o, which has several diacritics.
The tilde on õ and ã are with { because the tilde itself is already used for something else. It's a bit weird, but I see that you don't use these letters often anyway, so I hope it's not a big deal.
I recommended ( for ŏ, but you can choose something else.
The code for this is on GitHub: https://github.com/wikimedia/jquery.ime
Some time after it's merged on GitHub, it will be deployed on Wikipedia. (Usually it takes up to two weeks.)
I also recommend reading mw:Manual:Adding_and_removing_languages#jquery.ime.
Every new addition of an input method (also known as keyboard mapping) must include:
The rules themselves, under rules/
Tests, in the fixtures files under tests/
Language and input method registration in src/jquery.ime.inputmethods.js
Recent example: https://github.com/wikimedia/jquery.ime/pull/786/files
Also, it would be nice if you could create a mw:Phabricator task to track this work.
Good luck, and let me know if you need more help!
Benefits (why should this be implemented?):
a major convenience for editing silesian wikipedia