google / extra-keyboards-for-chrome-os

Extra keyboard layouts and input methods for Chrome OS
Apache License 2.0
197 stars 121 forks source link

kurdish keyboard support? #74

Open nathgit opened 4 years ago

nathgit commented 4 years ago

Can I add support for the Sorani Kurdish English-based keyboard to Composekey? I looked up the keyboard code for Kurdish & tried adding the Kurdish layout to the manifest file, refreshed the extension, & looked for it in the list of layouts but couldn't find it. Did I get something wrong or is there something else I'm missing? { "name": "Compose Key (Sorani Kurdish)", "type": "ime", "id": "compose_key_ku", "description": "Adds Compose key functionality to the Sorani Kurdish keyboard.", "language": "ku-Arab-iQ", "layouts": ["ku"] }

bderrly commented 4 years ago

You need to find the correct set of language and layout for it to work properly. Those values need to be in the Xkeyboard config library that is available in Chrome OS. It is currently pinned at 2.27 (https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/b6ed46e35c41300c3e03fb4e83d4fce48afb8f9e/x11-misc/xkeyboard-config/) however that may not be the version that is built and distributed just yet.

If you dig into the files for xkeyboard config (https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/blob/acdcd04133c3220f15d6c0e0be47c9be8f8296bb/symbols/iq) you'll see that there is the "ku" layout which is named "Kurdish (Iraq, Latin Q)". I'm not familiar with this language or layout but I'm guessing it is close to what you're looking for? If it is close but not exactly the same you can use it as a base layout and then modify it with a lookup table in background.js (see https://github.com/google/extra-keyboards-for-chrome-os/blob/master/lushootseed/background.js as an example of remapping a US QWERTY layout to a native language spoken in the Pacific northwest of the US).

This means the config would look something like:

{
  "name": "Sorani Kurdish",
  "type": "ime",
  "id": "sorani_kurdish",
  "description": "Sorani Kurdish keyboard layout",
  "language": "ku",
  "layouts": ["iq(ku)"]
}
nathgit commented 4 years ago

I tried the code above along with the replacing the 'ku' with 'kur'. according to https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes the iso 639-1 code is 'ku' & the iso 639-2 is 'kur' so I tried both but it doesn't show up with either one. I have added Greek & Russian support to it successfully, but I can't seem to figure out the code for Kurdish.