Is it possible to add a Keyboard Language not in the list?

Hello
as the title says;i’d like to add a keyboard language not available currently under Setting/text input/Keyboards.

Edit:
i added Anysoftkeyboard and it works on Whatsapp but i can’t figure how to enable it on “messages” ,“Browser” and “Email”.

Do you really mean another keyboard layout?

They are in /usr/share/maliit/plugins/com/jolla/layouts/.

yes, similar to this person here(but Hebrew as the language):

I’m not asking to add it officially even though that would obviously be welcomed,
but asking for a way/solution to add it.

apparently Anysoftkeyboard couldn’t get added to the Sailfish apps keyboard,and maybe it’s only meant for Android apps.(or i missed something in it’s initial setup).

the closest solution i found was from this thread:
https://together.jolla.com/question/12370/support-for-hebrew-language-squares-when-receiving-hebrew/
pointing to this package:
https://openrepos.net/content/schturman/hebrew-vkb-2-arrows-toggle-en-he
which was last updated in 2014.
so i don’t know if it’s still working.

Check the source code of my keyboard layouts: Multi Keyboard Layouts | OpenRepos.net — Community Repository System

Basically, you need to create the qml layout file and a conf file, per language (ex
layouts · master · Adel Noureddine / Multi Keyboard Layouts for SailfishOS · GitLab) and add them to the /layouts folder as mentioned above.
Restart and you can select the new layouts.

1 Like

Thank you for the info and instructions,it sounds quit simple; but unfortunately I’m not really knowledgeable in this kind of things.
Good for you for being able to create your proper solution.

Edit:
i’ve extracted the content of those two RPMs:
https://openrepos.net/content/schturman/hebrew-vkb-4-arrows
https://openrepos.net/content/schturman/hebrew-vkb-2-arrows-toggle-en-he
and found there conf and qml files,can i use those?

You should compare with orangecat’s files. Extracted files were used with an old version of Sailfish.

1 Like

i tried,there are to many files and variables.
i don’t really know what i’m looking at.

Edit:
i’d appreciate some insight and pointing me in the right direction,since if i’m going to use Sailfish OS, i have no choice but sort this issue.

-first of all i don’t understand which Repos for the Hebrew VKB am i supposed to DL,
there’s one with only Hebrew and one with an en-he toggle.
i only want to add an Hebrew layout to Sailfish OS and use the already present English.
(i’m wondering why he created in the First place an he-en one,same for @orangecat).

for the meantime i DL the first one(aforementioned above) and here are the folder/files i got:
Screenshot_20220419_165357

Screenshot_20220419_165404

Screenshot_20220419_165436

Screenshot_20220419_165445

which one of this files do i need to compare against orangecat files,and againt which of his files?i see alot in his Repos.

First of all, did you try installing the RPM you downloaded from openrepos, either one of the 2 apps ?
In theory, there is little changes for the keyboard layouts since first SFOS release, so they should just work.

If not, I checked the RPM and the extracted files, and most of those additional files are related to the spacebar and arrow keys. If all you want is Herbrew layout, then I suggest you just modify he.qml and replace SpacebarRowArrowHe with SpacebarRow (line 52), and replace the import "../custom-he" with import ...

Then copy both files he.qml and custom_he.conf to this folder on your SFOS phone: /usr/share/maliit/plugins/com/jolla/layouts/, and restart (or type killall maliit-server in SFOS terminal).

1 Like

i followed your instructions to the letter,rebooted the device but have no Hebrew under Text input options.

here’s how my he.qml file looks like:

Summary
import QtQuick 2.0
import ".."

KeyboardLayout {
    KeyboardRow {
        DeadKey { id: deadKey;                            symView: "1"; symView2: "€"; width: punctuationKeyWidthNarrow; fixedWidth: true; separator: false }
        CharacterKey { caption: "."; captionShifted: "."; symView: "2"; symView2: "£"; width: punctuationKeyWidthNarrow; fixedWidth: true }
        CharacterKey { caption: "ק"; captionShifted: "ק"; symView: "3"; symView2: "$"; width: punctuationKeyWidthNarrow; fixedWidth: true }
        CharacterKey { caption: "ר"; captionShifted: "ר"; symView: "4"; symView2: "¥"; width: punctuationKeyWidthNarrow; fixedWidth: true }
        CharacterKey { caption: "א"; captionShifted: "א"; symView: "5"; symView2: "₪"; width: punctuationKeyWidthNarrow; fixedWidth: true }
        CharacterKey { caption: "ט"; captionShifted: "ט"; symView: "6"; symView2: "%"; width: punctuationKeyWidthNarrow; fixedWidth: true }
        CharacterKey { caption: "ו"; captionShifted: "ו"; symView: "7"; symView2: "<"; width: punctuationKeyWidthNarrow; fixedWidth: true }
        CharacterKey { caption: "ן"; captionShifted: "ן"; symView: "8"; symView2: ">"; width: punctuationKeyWidthNarrow; fixedWidth: true }
        CharacterKey { caption: "ם"; captionShifted: "ם"; symView: "9"; symView2: "["; width: punctuationKeyWidthNarrow; fixedWidth: true }
        CharacterKey { caption: "פ"; captionShifted: "פ"; symView: "0"; symView2: "]"; width: punctuationKeyWidthNarrow; fixedWidth: true; separator: false }
        CharacterKey {                                    symView: "10"; symView2: "↔"; width: punctuationKeyWidthNarrow; fixedWidth: true; separator: false }
    }

    KeyboardRow {
        CharacterKey { caption: ","; captionShifted: ","; symView: "✔"; symView2: "∞"; width: punctuationKeyWidthNarrow; fixedWidth: true }
        CharacterKey { caption: "ש"; captionShifted: "ש"; symView: "*"; symView2: "`"; width: punctuationKeyWidthNarrow; fixedWidth: true }
        CharacterKey { caption: "ד"; captionShifted: "ד"; symView: "#"; symView2: "^"; width: punctuationKeyWidthNarrow; fixedWidth: true }
        CharacterKey { caption: "ג"; captionShifted: "ג"; symView: "+"; symView2: "|"; width: punctuationKeyWidthNarrow; fixedWidth: true }
        CharacterKey { caption: "כ"; captionShifted: "כ"; symView: "-"; symView2: "_"; width: punctuationKeyWidthNarrow; fixedWidth: true }
        CharacterKey { caption: "ע"; captionShifted: "ע"; symView: "="; symView2: "§"; width: punctuationKeyWidthNarrow; fixedWidth: true }
        CharacterKey { caption: "י"; captionShifted: "י"; symView: "("; symView2: "{"; width: punctuationKeyWidthNarrow; fixedWidth: true }
        CharacterKey { caption: "ח"; captionShifted: "ח"; symView: ")"; symView2: "}"; width: punctuationKeyWidthNarrow; fixedWidth: true }
        CharacterKey { caption: "ל"; captionShifted: "ל"; symView: "!"; symView2: "¡"; width: punctuationKeyWidthNarrow; fixedWidth: true }
        CharacterKey { caption: "ך"; captionShifted: "ך"; symView: "?"; symView2: "¿"; width: punctuationKeyWidthNarrow; fixedWidth: true }
        CharacterKey { caption: "ף"; captionShifted: "ף"; symView: "№"; symView2: "©"; width: punctuationKeyWidthNarrow; fixedWidth: true; separator: false }
    }

    KeyboardRow {
        ShiftKey {}
        
        CharacterKey { caption: "ז"; captionShifted: "ז"; symView: "@"; symView2: "«" }
        CharacterKey { caption: "ס"; captionShifted: "ס"; symView: "&"; symView2: "»" }
        CharacterKey { caption: "ב"; captionShifted: "ב"; symView: "/"; symView2: "\"" }
        CharacterKey { caption: "ה"; captionShifted: "ה"; symView: "\\"; symView2: "“" }
        CharacterKey { caption: "נ"; captionShifted: "נ"; symView: "'"; symView2: "”" }
        CharacterKey { caption: "מ"; captionShifted: "מ"; symView: ";"; symView2: "„" }
        CharacterKey { caption: "צ"; captionShifted: "צ"; symView: ":"; symView2: "~" }
        CharacterKey { caption: "ת"; captionShifted: "ת"; symView: "☠"; symView2: "☣" }
        CharacterKey { caption: "ץ"; captionShifted: "ץ"; symView: "✌"; symView2: "☢" }

        BackspaceKey {}
    }

    SpacebarRow {}
}

i’ll also mention that i did not copy the big folder(custom-he)

This is what I could do on short notice. I think I’ll add it to my app properly, and if you’re willing to help testing and tweaking that would be great.
But for now, if you replace the content of the qml file with this code, you should get a working layout:

Summary
import QtQuick 2.0
import ".."

KeyboardLayout {
    splitSupported: true

    KeyboardRow {
        CharacterKey { caption: "."; captionShifted: "."; symView: "1"; symView2: "€" }
        CharacterKey { caption: "ק"; captionShifted: "ק"; symView: "2"; symView2: "£" }
        CharacterKey { caption: "ר"; captionShifted: "ר"; symView: "3"; symView2: "$"; accents: "èeéëê€"; accentsShifted: "ÈEÉÊË€" }
        CharacterKey { caption: "א"; captionShifted: "א"; symView: "4"; symView2: "¥" }
        CharacterKey { caption: "ט"; captionShifted: "ט"; symView: "5"; symView2: "₹" }
        CharacterKey { caption: "ו"; captionShifted: "ו"; symView: "6"; symView2: "¤" }
        CharacterKey { caption: "ן"; captionShifted: "ן"; symView: "7"; symView2: "<"; accents: "üùuúû"; accentsShifted: "ÜÙUÚÛ" }
        CharacterKey { caption: "ם"; captionShifted: "ם"; symView: "8"; symView2: ">"; accents: "îïiìí"; accentsShifted: "ÎÏIÌÍ" }
        CharacterKey { caption: "פ"; captionShifted: "פ"; symView: "9"; symView2: "["; accents: "öòóôõoø"; accentsShifted: "ÖÒÓÔÕOØ" }
        CharacterKey { caption: "-"; captionShifted: "-"; symView: "0"; symView2: "]" }
        BackspaceKey {}
    }

    KeyboardRow {
        CharacterKey { caption: ","; captionShifted: ","; symView: "*"; symView2: "`"; accents: "aäàáãâåæ"; accentsShifted: "AÄÀÁÃÂÅÆ"}
        CharacterKey { caption: "ש"; captionShifted: "ש"; symView: "#"; symView2: "^"; accents: "sßş$"; accentsShifted: "SŞ$" }
        CharacterKey { caption: "ד"; captionShifted: "ד"; symView: "+"; symView2: "|"; accents: "dð"; accentsShifted: "DÐ" }
        CharacterKey { caption: "ג"; captionShifted: "ג"; symView: "-"; symView2: "_" }
        CharacterKey { caption: "כ"; captionShifted: "כ"; symView: "="; symView2: "§"; accents: "gğ"; accentsShifted: "GĞ" }
        CharacterKey { caption: "ע"; captionShifted: "ע"; symView: "("; symView2: "{" }
        CharacterKey { caption: "י"; captionShifted: "י"; symView: ")"; symView2: "}" }
        CharacterKey { caption: "ח"; captionShifted: "ח"; symView: "\""; symView2: "°" }
        CharacterKey { caption: "ל"; captionShifted: "ל"; symView: "~"; symView2: "·" }
        CharacterKey { caption: "ך"; captionShifted: "ך"; symView: "!"; symView2: "¡" }
        CharacterKey { caption: "ף"; captionShifted: "ף"; symView: "?"; symView2: "¿" }
    }

    KeyboardRow {
        splitIndex: 5

        ShiftKey {}

        CharacterKey { caption: "ז"; captionShifted: "ז"; symView: "@"; symView2: "«"; accents: "ýy¥"; accentsShifted: "ÝY¥" }
        CharacterKey { caption: "ס"; captionShifted: "ס"; symView: "&"; symView2: "»" }
        CharacterKey { caption: "ב"; captionShifted: "ב"; symView: "/"; symView2: "÷"; accents: "cç"; accentsShifted: "CÇ" }
        CharacterKey { caption: "ה"; captionShifted: "ה"; symView: "\\"; symView2: "“" }
        CharacterKey { caption: "נ"; captionShifted: "נ"; symView: "'"; symView2: "”" }
        CharacterKey { caption: "מ"; captionShifted: "מ"; symView: ";"; symView2: "„"; accents: "nñ"; accentsShifted: "NÑ" }
        CharacterKey { caption: "צ"; captionShifted: "צ"; symView: ":"; symView2: "×" }
        CharacterKey { caption: "ת"; captionShifted: "ת"; symView: ":"; symView2: "×" }
        CharacterKey { caption: "ץ"; captionShifted: "ץ"; symView: ":"; symView2: "×" }
    }

    SpacebarRow {}
}

1 Like

Thank you so much for bothering,
unfortunately i still don’t see an option to add Hebrew as a Keyboard layout under Sailfish settings/Text input.
I’ve enabled Developer mode,copied both files via the Terminal to the Location you mentioned,and then checked they were there.but after rebooting it isn’t added to Keyboard layouts.

You also added custom_he.conf file ? What’s in it ?

Maybe try to replace the content of the conf file with this:

[he.qml]
name=Hebrew
languageCode=HE

Both files (qml and conf) should be in the same folder in /usr/share/maliit/plugins/com/jolla/layouts/

1 Like

:man_facepalming: for some reason i didn’t go all the way to the layouts folder but stopped at jolla
sorry for that.
it works now :star_struck:
Thank you very much for all the effort :trophy:
if you decide to implement it in your app I’ll be willing to help,but it seems fine to me;
it looks the same as the integrated Sailfish English Keyboard.

Hi jub,

Since you offer to add a new keyboard layout, you might also be interested in adding both the language corrector for the keyboard and also translating the OS.

(not forcing anything, just telling that there are these opportunities too)

what do you mean?or were you addressing @orangecat ?
as you can see by this thread, my skills in this domain are quit limited both for “adding new Keyboards”,and even more with a language corrector.

No no I meant you. No worries if you don’t have the technical skills for it yet. Regarding the translation of the OS you can check the Location part of the forum. You’ll see that you can request to be the coordinator for a given language and then participate to the translation of that language for the OS (from what I saw it’s purely graphical).

Regarding the predictive text input you can follow this thread

And to add the keyboard as default to the OS you can follow orangecat’s first message

i viewed the links you provided and will look more into it later to see if I’m cut for this task.

1 Like

It was pretty easy to add any keyboard until 2023. I explained (in french) the way:

(Bépo is the french Dvorak keyboard)

Since the SailfishOS ver4.5 I don’t know how to do, it’s all changed.

jchr.be

Adding new layouts to /usr/share/maliit/plugins/com/jolla/layouts/ only adds the option for the software keyboard. How would one go about modifying a layout for the hardware keyboard?

For hardware keyboard there’s
/usr/share/maliit/plugins/com/jolla/hwkbdlayouts/hwkbdlayouts.conf

Actual layout info is defined by xkeyboard-config package.

1 Like