maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   SailfishOS (https://talk.maemo.org/forumdisplay.php?f=52)
-   -   Keyboard layouts for Jolla's Sailfish OS (https://talk.maemo.org/showthread.php?t=91917)

Penguin 2014-03-11 22:51

Re: Keyboard layouts for Jolla's Sailfish OS
 
If you want to hack autocaps and preedit off in your custom keyboard that can be done easily with few lines in layout QML file:
Code:

KeyboardLayout {
    // enables possibility to use own InputHandler,
    // disables autocaps and text prediction
    type: "custom" 
    Component.onCompleted: {
        // disable autocaps
        keyboard.autocaps = false
    }
...
}

Value of property type can be actually anything which does not match to supported types.

Updated: bug fix to this instruction. Property type alone disables both text prediction and autocaps and enables usage of custom input handler. Do not use it unless you want to change input handler from default.

Update ; Ouch! I tried to disable to word prediction by changing value of read only property...

Schturman 2014-03-11 23:22

Re: Keyboard layouts for Jolla's Sailfish OS
 
OK, I did one test...
1. Created folder custom-he inside: /usr/share/maliit/plugins/com/jolla
2. Copied all .qml, .js and qmldir files from /usr/share/maliit/plugins/com/jolla to my folder custom-he
3. In he.qml I changed this line: import ".." to this one: import "../custom-he"
4. created custom-he.conf
5. edited KeyboardLayout.qml inside my folder custom-he to fit landscape and portrait mode.
5. restart maliit server.

The vkb loads ok, all work good without touching the original files EXCEPT arrows buttons :( they just not work for some reasons...
Here is a content of the one arrows (LeftArrowKey.qml):
Code:

import QtQuick 2.0
import Sailfish.Silica 1.0

FunctionKey {
    icon.source: "image://theme/icon-l-left" + (pressed ? ("?" + Theme.highlightColor) : "")
    repeat: true
    key: Qt.Key_Left
    width: 52
}

2-3 hours tried different variations to get it work, but without succsess :(
Don't know how to get it work, or which file I need to edit...

Penguin 2014-03-12 10:29

Re: Keyboard layouts for Jolla's Sailfish OS
 
Check this http://talk.maemo.org/showpost.php?p...&postcount=197 to get arrow keys working. Forget those LeftArrowKey.qml, RightArrowKey.qml, etc and use that one file for all four arrow key directions. It has internal input handler for arrow keys and it works.

Forget also that modified InputHandler.qml which you have and which adds support for arrow keys. You can't modify only that file to get custom input handler, you need more files from system and that wouldn't be feasible compared to solution I made in CustomArrowKey.qml

That and few other files also available in Github Gist: https://gist.github.com/JanneEdelman/9496850

Edit: Changing stock KeyboardLayout.qml is typically an indication that something is wrong with your layout, not in KeyboardLayout.qml file which is very flexible if your layout file has been properly defined. Let me know what is the problem with stock KeyboardLayout.qml, I think we can solve it.

andreas1 2014-03-12 11:02

Re: Keyboard layouts for Jolla's Sailfish OS
 
Mr Penguin, would you care to make an finnisk kb rpm with side-arrows?

Penguin 2014-03-12 11:27

Re: Keyboard layouts for Jolla's Sailfish OS
 
I am working to get custom keyboard framework implemented which would contain as many layouts as possible, preferrably separately installable and configurability to all layouts for spacebar row whether you want
  • possible deadkey on left or right side
  • arrow keys (left-right) or (left-right-up-down)
  • possible other alternatives

Penguin 2014-03-12 11:28

Re: Keyboard layouts for Jolla's Sailfish OS
 
Quote:

Originally Posted by RbN (Post 1404902)
French "ergonomic" layout fr-bépo : https://pad.lqdn.fr/p/sailfish-bepo

I got following feedback regarding this layout:
Quote:

Thank you for this mapping;

But you are missing [W] key, so this mapping is not usable…
[W] key is next to [Z] (in place of []] on qwerty keyboard).

If there is not enough place on the first row, [W] should at least be accessible with a long press on [Z].
Another option could be to remove [È], which is already accessible with a long-press on [E].
You already did the same for [À] and [Ç]…
Edit: actually W was there behind V and now as own key too. Let's see how crowded users will feel this layout now. I kept previous version available just as backup option.

Schturman 2014-03-13 10:46

Re: Keyboard layouts for Jolla's Sailfish OS
 
Quote:

Originally Posted by Penguin (Post 1416383)
Check this http://talk.maemo.org/showpost.php?p...&postcount=197 to get arrow keys working. Forget those LeftArrowKey.qml, RightArrowKey.qml, etc and use that one file for all four arrow key directions. It has internal input handler for arrow keys and it works.

Forget also that modified InputHandler.qml which you have and which adds support for arrow keys. You can't modify only that file to get custom input handler, you need more files from system and that wouldn't be feasible compared to solution I made in CustomArrowKey.qml

That and few other files also available in Github Gist: https://gist.github.com/JanneEdelman/9496850

Edit: Changing stock KeyboardLayout.qml is typically an indication that something is wrong with your layout, not in KeyboardLayout.qml file which is very flexible if your layout file has been properly defined. Let me know what is the problem with stock KeyboardLayout.qml, I think we can solve it.

Ok, got it work with your arrowkey file :D
Thanks

P.S. But if user don't want to see all languages and want to see only 2-3, he still need replace layouts.conf file...

rob_kouw 2014-03-14 11:40

Re: Keyboard layouts for Jolla's Sailfish OS
 
5 Attachment(s)
Normally I use an English keyboard, and I compiled an extended English keyboard with a few changes.
- For a Dutchman not all extended characters are necessary, so I skipped most of them.
- I added numbers 1 to 0 at the upper row. It requires some counting ("Now where is the 7 again?"), but it should be doable.
- I added characters ;\([{ to the comma and !?:/)]} to the dot.
- Some other useful characters were added to the L. I thought that would be the easiest to remember. These characters are -#%*_

The keyboard is in the zip under enx.qml. There is an extra enx.conf file with it, all normal English settings are being used.

Both to be copied as instructed earlier as root to
Code:

/usr/share/maliit/plugins/com/jolla/layouts
Followed by restarting the Maliit engine
Code:

killall maliit-server
And to be selected from the spacebar as EnglishX.

Thanks to Penguin for helping me along the way.

Penguin 2014-03-14 18:02

Re: Keyboard layouts for Jolla's Sailfish OS
 
Very nice ideas for custom keyboards. I like!

Penguin 2014-03-14 18:21

Re: Keyboard layouts for Jolla's Sailfish OS
 
Quote:

Originally Posted by Schturman (Post 1416547)
But if user don't want to see all languages and want to see only 2-3, he still need replace layouts.conf file...

Actually only once. We can also customize language selector, may be even layout vector storing all layouts, although that will require custom version of all stock languages wanted too, but thats what you have done now anyway.

Unless someone else will deepdive into this I will look this matter after next Sailfish update (or may be this night, who knows what mad scientist will do ;)

Schturman 2014-03-14 20:14

Re: Keyboard layouts for Jolla's Sailfish OS
 
Quote:

Originally Posted by Penguin (Post 1416779)
Actually only once. We can also customize language selector, may be even layout vector storing all layouts, although that will require custom version of all stock languages wanted too, but thats what you have done now anyway.

Unless someone else will deepdive into this I will look this matter after next Sailfish update (or may be this night, who knows what mad scientist will do ;)

For now I leaved the original layout.conf file for the hebrew with 4 arrows. Already updated package on the openrepos.
Now I will try to do the same for two additional heb vkb's with toggle. Will see if I can leave orig. layout.conf or need to change it...
Thanks for your help..

Schturman 2014-03-14 23:31

Re: Keyboard layouts for Jolla's Sailfish OS
 
OK, finally I did it. All 3 variations of Hebrew vkb's updated and reuploaded to openrepos. Now all of them not touched the original files and all work :D
Thanks Penguin!

gaiosgf 2014-03-15 00:03

Re: Keyboard layouts for Jolla's Sailfish OS
 
greek with arrows?it was very helpfull.

Penguin 2014-03-17 20:14

Re: Keyboard layouts for Jolla's Sailfish OS
 
SailfishOS 1.0.4.20 Ohijärvi breaks custom keyboard installation process and you have go to settings to enable installed keyboard manually.

Does anyone know if there is a method to alter settings from command line or do we need to write an application to enable new keyboard layout automatically? I know pretty much how to do it from qml, but I would like to do it automatically from post install script when new keyboard layout is installed.

rob_kouw 2014-03-17 20:55

Re: Keyboard layouts for Jolla's Sailfish OS
 
My manually installed keyboard EnglishX went on without problems. Emoji are still there. Maybe the setting for Untrusted software should be enabled first?

Penguin 2014-03-17 21:02

Re: Keyboard layouts for Jolla's Sailfish OS
 
No problem with installation and "Untrusted software" setting does not make any difference. New keyboards won't be visible in keyboards language selection without enabling them in settings.

coderus 2014-03-17 21:18

Re: Keyboard layouts for Jolla's Sailfish OS
 
https://together.jolla.com/question/...rds-available/

for fast switching between two layouts

Bundyo 2014-03-17 22:06

Re: Keyboard layouts for Jolla's Sailfish OS
 
I've installed my package and it was enabled by default (at least it was on when I opened the language chooser).

Penguin 2014-03-17 23:22

Re: Keyboard layouts for Jolla's Sailfish OS
 
I tested with your package (bulgarian_phonetic_keyboard) too and neither of my two Jollas enable that layout either. Could be something to do with if you have ever touched the enabled layout list in settings or not. I have.

Schturman 2014-03-18 00:10

Re: Keyboard layouts for Jolla's Sailfish OS
 
Quote:

Originally Posted by Penguin (Post 1417245)
No problem with installation and "Untrusted software" setting does not make any difference. New keyboards won't be visible in keyboards language selection without enabling them in settings.

Hmmm.. My visible in keyboards language selection after installation, but I need to choose it because It not shown automatically after installation like it was before the last system update...

P.S. Just noticed, we can disable not necessary languages in keyboards language selection area :D

Penguin 2014-03-18 02:21

Re: Keyboard layouts for Jolla's Sailfish OS
 
So are you saying that you get new keyboard layout automatically visible in virtual keyboards language popper after installation and you do not have to go to Settings -> System Settings -> Text Input -> Keyboards and enable it from there? I do not mean keyboard already installed before SailfishOS update, but new ones.

I get new keyboards visible on text input settings as disabled keyboard and need to enable from there manually.

Anyway I have now configuration script that can automatically enable and disable keyboard when installed/uninstalled. I wait confirmations how this feature actually works for others and do some testing before updating any keyboard packages.

Schturman 2014-03-18 05:32

Re: Keyboard layouts for Jolla's Sailfish OS
 
yep, exactly.. not needed to go to setting.

Bundyo 2014-03-18 08:34

Re: Keyboard layouts for Jolla's Sailfish OS
 
Quote:

Originally Posted by Penguin (Post 1417283)
I tested with your package (bulgarian_phonetic_keyboard) too and neither of my two Jollas enable that layout either. Could be something to do with if you have ever touched the enabled layout list in settings or not. I have.

Maybe because it was installed and enabled before the update (just guessing).

Penguin 2014-03-18 10:01

Re: Keyboard layouts for Jolla's Sailfish OS
 
Yes, only such keyboard is applicable to testing this, which was not installed during Ohijärvi update. Once enable remains enabled even if uninstalled and installed again. Once disabled remains disabled after uninstall - install cycle.

TMavica 2014-03-18 10:45

Re: Keyboard layouts for Jolla's Sailfish OS
 
do u know how to make chinese keyboard??

Penguin 2014-03-18 14:41

Re: Keyboard layouts for Jolla's Sailfish OS
 
Ok, now I have end user confirmation that new keyboard must be manually enabled from settings. I will proceed according to that and target to publish my solution to this by tomorrow.

Penguin 2014-03-19 03:38

Re: Keyboard layouts for Jolla's Sailfish OS
 
Czech keyboard has now script to enable it automatically during installation and cleanup configuration during uninstallation. After user feedback I will update other layouts too (or start fixing issues).

Install with warehouse to ensure keyboard-custom-common dependency package will be installed too or download it separate and install first.

Requires SailfishOS 1.0.4.x or newer and won't install on older releases.

Penguin 2014-03-19 03:44

Re: Keyboard layouts for Jolla's Sailfish OS
 
Quote:

Originally Posted by TMavica (Post 1417404)
do u know how to make chinese keyboard??

Who? Me? I do not know chinese, but if you or anyone has interest to create one I can try to help in the creation process.

Schturman 2014-03-19 05:53

Re: Keyboard layouts for Jolla's Sailfish OS
 
Quote:

Originally Posted by Penguin (Post 1417582)
Czech keyboard has now script to enable it automatically during installation and cleanup configuration during uninstallation. After user feedback I will update other layouts too (or start fixing issues).

Install with warehouse to ensure keyboard-custom-common dependency package will be installed too or download it separate and install first.

Requires SailfishOS 1.0.4.x or newer and won't install on older releases.

can you share your script please ?

Penguin 2014-03-19 06:24

Re: Keyboard layouts for Jolla's Sailfish OS
 
Of course. I want to ensure first that it works really properly

rob_kouw 2014-03-21 15:28

Re: Keyboard layouts for Jolla's Sailfish OS
 
So there are a lot of other keyboards now. Did anyone include a dictionary as well? To put it differently: I am using an English dictionary and word guesser for both Dutch and English messages. So the English dictionary is being flooded with Dutch words. Still, not all frequently used Dutch words are displayed by the word guesser, as English words seem to have a higher priority.

I wouldn't mind starting with an empty dictionary and call it Dutch. I would fill it up myself. Does anybody know how to proceed?

(And then I'd like to replace my messed-up English dictionary with an original one...)

Penguin 2014-03-21 18:32

Re: Keyboard layouts for Jolla's Sailfish OS
 
I have custom input handler under construction to prevent flooding dictionaries with words from other languages.

Dictionaries are based on commercial and closed source xt9 and adding custom dictionaries into that is not possible. I would be very much interested to implement custom word prediction and dictionary solution based on presage. Presage could be even used as plugin in maliit but Jolla is holding modifications they have made to maliit source code. There is also a challenge that it should be recompiled and stock maliit installation replaced with custom one, which in my opinion is not feasible solution for larger audience.

Presage could be used as Qt plugin with QML import if anyone with enough knowledge could help in such implementation. Implementing such goes way too much beyond my skills.

Stskeeps 2014-03-21 18:53

Re: Keyboard layouts for Jolla's Sailfish OS
 
Quote:

Originally Posted by Penguin (Post 1417996)
Presage could be even used as plugin in maliit but Jolla is holding modifications they have made to maliit source code.

https://github.com/nemomobile-packag...commits/master should really be it

Penguin 2014-03-21 19:08

Re: Keyboard layouts for Jolla's Sailfish OS
 
Thanks! Let's see what we can find out.

I don't still fancy about idea of replacing stock maliit with custom one. That might cause unexpected issues later.

Bundyo 2014-03-22 05:14

Re: Keyboard layouts for Jolla's Sailfish OS
 
Quote:

Originally Posted by Penguin (Post 1417996)
I have custom input handler under construction to prevent flooding dictionaries with words from other languages.

Dictionaries are based on commercial and closed source xt9 and adding custom dictionaries into that is not possible. I would be very much interested to implement custom word prediction and dictionary solution based on presage. Presage could be even used as plugin in maliit but Jolla is holding modifications they have made to maliit source code. There is also a challenge that it should be recompiled and stock maliit installation replaced with custom one, which in my opinion is not feasible solution for larger audience.

Presage could be used as Qt plugin with QML import if anyone with enough knowledge could help in such implementation. Implementing such goes way too much beyond my skills.

You can also vote for that here:
https://together.jolla.com/question/...guages-to-xt9/

Penguin 2014-03-22 16:57

Re: Keyboard layouts for Jolla's Sailfish OS
 
I have voted it there but it is more about replacing xt9 with presage which I do not see feasible solution in short term. Presage may require more own work than using xt9 requires and thus for commercial use and product creation with limited resources xt9 might be still better option. However xt9 won't be ever open and this might be also matter of resources.

Current xt9 as it has been implemented is also pretty useless. I am used to prediction system in iOS that allows me to write blindly as it replaces the written alphabets with proposed ones automatically. I can write words where no character is correct and still the prediction system finds the correct one automatically. Not always, but for most of the words. This xt9 system as it has been implemented in Jolla shows list of words where you need to select. With the time and effore to read the proposed words and select from those I can write the whole word and thus this current solution is useless for me.

branek 2014-03-28 11:02

Re: Keyboard layouts for Jolla's Sailfish OS
 
1 Attachment(s)
Hi all,

I would like to introduce 2 additional layouts for Jolla.

Serbian Latin, and Serbian Cyrillic.
Latin is almost like Slovenian which is used as starting point (one letter difference).

Cyrillic is made to be as similar to desktop keyboard layout as possible.

Penguin, could I kindly ask you to pack this and attach to your repository on openrepos. Thanks in advance. I would do it by myself, but I do not have setup here for that.

Thanks
Branek

Penguin 2014-03-28 20:56

Re: Keyboard layouts for Jolla's Sailfish OS
 
Thanks for your contribution to custom keyboard layouts. Both Serbian keyboard layouts now available from openrepos:

gitful 2014-03-30 18:40

Re: Keyboard layouts for Jolla's Sailfish OS
 
And I made a layout for those of you who like Dvorak.
If you have any suggestions, feel free to comment at the gist.

albloushi 2014-03-31 03:35

Re: Keyboard layouts for Jolla's Sailfish OS
 
Hi,

Can someone guide me how to create RPM in order to distribute the Arabic keyboard that I created via RPM?


All times are GMT. The time now is 23:38.

vBulletin® Version 3.8.8