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)

zlatko 2014-02-23 11:24

Re: Keyboard layouts for Jolla's Sailfish OS
 
@Penguin
Thank you for the information! If key rows height is globally defined, it is a mystery for me why it was chosen the for the spacebar row to look narrower.

Penguin 2014-02-24 02:57

Re: Keyboard layouts for Jolla's Sailfish OS
 
It only looks narrower because those keys have visible boundaries. Character keys do not have and that keeps the illusion those are higher. IMO padding around spacebar row keys could be thinner than it is which would make those visually bigger looking keys. Functionality would be same though.

zlatko 2014-02-24 05:57

Re: Keyboard layouts for Jolla's Sailfish OS
 
@Penguin
You are probably right about the height. I measured this - in landscape all rows are proportionally shrunk to cope with less space available. But in anyway for me the space bar row in landscape needs a slight tuning, making the key area visually(and functionally) bigger. This especially needed as space is used for keyboard layout changing.

Penguin 2014-02-24 06:36

Re: Keyboard layouts for Jolla's Sailfish OS
 
Give feedback and propose change in together.jolla.com. I can check the code but as I remember this would require pretty nasty amount of changes to get implemented for all layouts. Doesn't make sense if next OS update wipes those changes away.

zlatko 2014-02-24 09:42

Re: Keyboard layouts for Jolla's Sailfish OS
 
@Penguin
Already proposed this on TJC: https://together.jolla.com/question/...#post-id-30086. But so far I think I am the only one who feels it must be improved :)

Penguin 2014-02-24 10:30

Re: Keyboard layouts for Jolla's Sailfish OS
 
I voted up

Schturman 2014-02-25 20:27

Re: Keyboard layouts for Jolla's Sailfish OS
 
Hi to all
Can someone help me here ? How I can fix this problem:

https://dl.dropboxusercontent.com/u/...25185402_1.jpg

I need to move the "Enter" button to the corner and the spacebar should be stretched or just enlarged... In the portrait mode all is ok...
Thanks

Penguin 2014-02-25 23:16

Re: Keyboard layouts for Jolla's Sailfish OS
 
Show the spacebar row code and how you define key widths for the row.

Schturman 2014-02-26 07:27

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

Originally Posted by Penguin (Post 1414350)
Show the spacebar row code and how you define key widths for the row.

Ohh sorry, I forgot to add this:
Code:

import QtQuick 2.0

KeyboardRow {
    SymbolKey {}
    FunctionKey {
        icon.source: "image://theme/icon-s-sync"
        onClicked: {canvas.layoutRow.switchLayout(0); canvas.updateIMArea()}
        width: 64
    }
    LeftArrowKey {}
    SpacebarKey {
        fixedWidth: true
    }
    RightArrowKey {}
    EnterKey {}
}

and in the en.qml it just:
Code:

SpacebarRowArrowEn {}

Salla 2014-03-03 21:22

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

Originally Posted by Salla (Post 1408742)
Can someone try to make a Esperanto keyboard for Jolla? http://en.wikipedia.org/wiki/Esperanto#Alphabet

I'm glad if this can be done.

Esperanto keyboard layout is now configured and istalled.

mced 2014-03-04 06:41

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

Originally Posted by Schturman (Post 1414328)

I need to move the "Enter" button to the corner and the spacebar should be stretched or just enlarged... In the portrait mode all is ok...

I've edited this file:

/usr/share/maliit/plugins/com/jolla/KeyboardGeometry.qml

Look for this line:

Code:

property int spacebarKeyWidthLandscape: 324*scaleRatio
And play with that number. Mine is 280. This is my Spanish layout now. I love those arrows at the sides. I know, that lower bar is not really centered...

http://i62.tinypic.com/5npxqr.jpg

You must make backups when modifiying files, both original and custom. I guess they will be overwritten in future updates.

Schturman 2014-03-04 07:18

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

Originally Posted by mced (Post 1415340)
I've edited this file:

/usr/share/maliit/plugins/com/jolla/KeyboardGeometry.qml

Look for this line:

Code:

property int spacebarKeyWidthLandscape: 324*scaleRatio
And play with that number. Mine is 280. This is my Spanish layout now. I love those arrows at the sides. I know, that lower bar is not really centered...

http://i62.tinypic.com/5npxqr.jpg

You must make backups when modifiying files, both original and custom. I guess they will be overwritten in future updates.

Thank you, I will try...

mced 2014-03-04 07:29

Re: Keyboard layouts for Jolla's Sailfish OS
 
Hint: when playing with those Maliit files, I use to have two SSH sesions opened:

-A root one (devel-su) for editing.
-A normal one (nemo) just for invoking:
systemctl --user restart maliit-server.service

Schturman 2014-03-04 09:03

Re: Keyboard layouts for Jolla's Sailfish OS
 
I know that , thanks ;)

EDIT: Thanks, it worked.. My vkb fixed :)

Penguin 2014-03-05 03:02

Re: Keyboard layouts for Jolla's Sailfish OS
 
Do not mess with system keyboard files. You can modify even the spacebar width for your keyboard layout only without messing other layouts.

Quote:

Originally Posted by Schturman (Post 1414381)
Ohh sorry, I forgot to add this:
Code:

import QtQuick 2.0

KeyboardRow {
    SymbolKey {}
    FunctionKey {
        icon.source: "image://theme/icon-s-sync"
        onClicked: {canvas.layoutRow.switchLayout(0); canvas.updateIMArea()}
        width: 64
    }
    LeftArrowKey {}
    SpacebarKey {
        fixedWidth: true
    }
    RightArrowKey {}
    EnterKey {}
}


I would say to this that define FunctionKey to be with fixed width when you have defined the exact width. Opposite for spacebarkey that if you defined it should be fixed width then define how wide it should be.

That way it may work nicely in Jolla, but not in other phones with other resolutions. IMO spacebar should always have flexible width to fill the row what is left from the other keys.

Schturman 2014-03-05 07:24

Re: Keyboard layouts for Jolla's Sailfish OS
 
OK, I have another problem, when In portrait mode the spacebar key is good, but in the landscape it is small, If I enlarge the spacebar key in spacebar row, it also enlarged in the portrait mode :(
Can I somehow add separated spacebarkey for portrait and for landscape in the spacebar row ?

igor_b 2014-03-08 18:52

Re: Keyboard layouts for Jolla's Sailfish OS
 
I created Croatian layout. It's just a QWERTZ layout with additional accented characters.

Download it here:As with other keyboard layouts, copy the qml files to /usr/share/maliit/plugins/com/jolla/layouts/ and restart keyboard service to apply changes:
Code:

systemctl --user restart maliit-server.service

Penguin 2014-03-08 19:19

Re: Keyboard layouts for Jolla's Sailfish OS
 
Better if you create your own "custom_hr.conf" file and system layouts.conf does not need to be changed. Less room for errors and less broken pieces after system update.

Penguin 2014-03-10 02:55

Re: Keyboard layouts for Jolla's Sailfish OS
 
After some amount of testing I created RPM packages for several keyboard layout announced on this thread and made those available from Openrepos:

I hope this is ok for authors of each keyboard layout.

To make sure nothing is conflicting with system keyboard files and each layout can be installed independently, I made few modifications to file names and QML and configuration files. I think this way these are more user friendly for not so advanced users and installation and uninstallation can be made nice and safe.

I also have Arabic keyboard layout ready for packaging but it is lacking proper font with arabic glyphs and licensed with applicable license for distributing it in keyboard package.

Edit (2014-03-10 14:43 CET):
Added Croatian layout (identical with Slovenian layout)

Edit (2014-03-10 15:25 CET):
Added Estonian layout

Edit (2014-03-28 21:58 CET):
Added Serbian cyrillic and latin layouts
Greek layout listed on same list as other layouts

Edit (2014-03-31 16:55 CET):
Added English Dvorak keyboard

Schturman 2014-03-10 05:45

Re: Keyboard layouts for Jolla's Sailfish OS
 
Thanks for you work , can you share the .spec file of one of this vkb's ?

Silwer 2014-03-10 06:19

Re: Keyboard layouts for Jolla's Sailfish OS
 
Penguin - Could you also make Estonian keyboard rpm? http://talk.maemo.org/showpost.php?p...8&postcount=80

Thanks!

igor_b 2014-03-10 08:32

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

Originally Posted by Penguin (Post 1415935)
Better if you create your own "custom_hr.conf" file and system layouts.conf does not need to be changed. Less room for errors and less broken pieces after system update.

i didn't knew that was possible. i edited the original post.

Penguin 2014-03-10 11:38

Re: Keyboard layouts for Jolla's Sailfish OS
 
SPEC file of a single custom keyboard layout as requested:

Code:

Name:          keyboard-custom-hu
Version:        0.1
Release:        1
Summary:        Hungarian keyboard layout
Group:          Qt
License:        BSD
Vendor:        Janne Edelman
URL:            https://openrepos.net/content/penguin/hungarian-keyboard
Source0:        %{name}-%{version}-%{release}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires:  jolla-keyboard
Requires:  jolla-xt9
Requires:  qt5-qtdeclarative-systeminfo

%description
Enables Hungarian keyboard layout in native SailfishOS applications in Jolla.

%prep
%setup -q
pwd
ls -l
echo prep done

%install
mkdir -p %{buildroot}/usr/share
cp -av . %{buildroot}/usr/share
pwd
ls -l

%clean
rm -rf %{buildroot}

%files
%defattr(644,root,root,-)
%doc
/*

%post
fc-cache -r
su nemo -c "/bin/systemctl --user restart maliit-server.service"

%postun
su nemo -c "/bin/systemctl --user restart maliit-server.service"

and content of source tarball for above SPEC file:

Code:

keyboard-custom-hu-0.1/
keyboard-custom-hu-0.1/maliit/
keyboard-custom-hu-0.1/maliit/plugins/
keyboard-custom-hu-0.1/maliit/plugins/com/
keyboard-custom-hu-0.1/maliit/plugins/com/jolla/
keyboard-custom-hu-0.1/maliit/plugins/com/jolla/layouts/
keyboard-custom-hu-0.1/maliit/plugins/com/jolla/layouts/custom_hu.conf
keyboard-custom-hu-0.1/maliit/plugins/com/jolla/layouts/custom_hu.qml

I will still clean up my scripts before I will post all into Github.

Schturman: You could change your keyboard RPM's so that those do not overwrite any system files. You've wrote that those return original files when uninstalled, but that actually is real issue with them if system has been updated meanwhile and rpm uninstall will replace files updated by system update with files from earlier sailfish release.

Silwer: I will check that if there was some issue why I skipped Estonian keyboard.
EDIT:
Quote:

Originally Posted by cstom (Post 1402798)
(however, when you press 'up' in the first row, it exists from editing mode... If I'll have some time, I'll check if there is anything available to prevent this.)

Have you solved this issue or is there any issue still?
igor_b: Is there difference in Slovenian and Croatian keyboard layouts except language code? I compared your Croation keyboard to what generally has been documented as "Hrvatska Tipkovnica" in Wikipedia (QWERTZ and Hrvatska nacionalna tastatura) and another virtual keyboard I found. This national keyboard is different of course but how about qwertz?

Generally I would say that this is excelled work and you who have contribited to these keyboards have earned the recognitition what Jolla spokes man gave this morning "Great work!".

However one thing I would like to comment regarding many of virtual keyboards. When you take that English or any other keyboard layout QML file as basis, please be brave and add more keys on the keyboard rows if your national keyboard insists that. Maxium of 12 keys can be put on single row and keyboard still remains usable, so you do not have to stick in the number of keys on English keyboard.

Silwer 2014-03-10 12:04

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

Originally Posted by Penguin (Post 1416060)
Silwer: I will check that if there was some issue why I skipped Estonian keyboard.
EDIT:


Have you solved this issue or is there any issue still?

I never had issue with "Up" arrow.

I used this keyboard only for a short period of time with last Sailfish OS version. After upgrading to newer OS version, keyboard arrows stopped working as during the upgrade part of the keyboard files were overwritten. I am using currently original Finnish keyboard. It is pretty close to Estonian one, however, sometimes I still miss the arrows I had in the custom Estonian keyboard.

igor_b 2014-03-10 12:15

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

Originally Posted by Penguin (Post 1416060)
igor_b: Is there difference in Slovenian and Croatian keyboard layouts except language code? I compared your Croation keyboard to what generally has been documented as "Hrvatska Tipkovnica" in Wikipedia (QWERTZ and Hrvatska nacionalna tastatura) and another virtual keyboard I found. This national keyboard is different of course but how about qwertz?

It seems that Croatian (QWERTZ) and Slovenian keyboard layouts are exactly the same (didn't kew that till now :)). That other (national) layout is something I've never seen before and I'm using Croatian keyboards for almost twenty years :D.

Quote:

Originally Posted by Penguin (Post 1416060)
When you take that English or any other keyboard layout QML file as basis, please be brave and add more keys on the keyboard rows if your national keyboard insists that. Maxium of 12 keys can be put on single row and keyboard still remains usable, so you do not have to stick in the number of keys on English keyboard.

I tried making full variant of the keyboard with additional keys but (at least for me) usability is much lower so I decided to use accents for extra characters (as it is on Android and iOS keyboards too).

Penguin 2014-03-10 13:48

Re: Keyboard layouts for Jolla's Sailfish OS
 
Ok, I copied existing Slovenian layout to be as Croatian layout and created own RPM for that. Any improvenets are welcome as you are the ones using those layouts not me and you know what works best.

igor_b 2014-03-10 14:08

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

Originally Posted by Penguin (Post 1416073)
Ok, I copied existing Slovenian layout to be as Croatian layout and created own RPM for that. Any improvenets are welcome as you are the ones using those layouts not me and you know what works best.

Slovenian layout, as shown here http://www.branah.com/slovenian is identical to Croatian (except letter "ž" is more often in the row below, after "ć"). But the one that you packaged is not the best one.. It has characters "š", "č" and "ž" on direct keys but "ć" and "đ" are hidden behind accented keys (in Slovenian those letters are maybe used more rarely but that's not the case for Croatian).

Penguin 2014-03-10 14:24

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

Originally Posted by igor_b (Post 1416077)
Slovenian layout, as shown here http://www.branah.com/slovenian is identical to Croatian (except letter "ž" is more often in the row below, after "ć"). But the one that you packaged is not the best one.. It has characters "š", "č" and "ž" on direct keys but "ć" and "đ" are hidden behind accented keys (in Slovenian those letters are maybe used more rarely but that's not the case for Croatian).

Thanks for your feedback! I will look those still today to make better layout available. I will study more that layout you have made and all additional input is also welcome.

Quote:

Originally Posted by Silwer (Post 1416036)
Penguin - Could you also make Estonian keyboard rpm? http://talk.maemo.org/showpost.php?p...8&postcount=80

Thanks!

Estonian keyboard is now available from OpenRepos too but without arrow keys as that would require modifying system files and I do not want to publish a single rpm package which mess with system files.

If someone has feasible solution to the arrow keys without modifying systems InputHandler.qml, please point it out so it could be adapted in custom keyboards.

Penguin 2014-03-10 15:04

Re: Keyboard layouts for Jolla's Sailfish OS
 
1 Attachment(s)
Would this be better croatian layout with direct keys "ć" and "đ" and "š", "č" and "ž" hidden behind accented keys.

I was also thinking to implement this http://www.branah.com/croatian as such, but it does not fit as is to portrait mode vkb and I am afraid people would feel even 12 keys on row too tight, although IMO it could be usable.

igor_b 2014-03-10 15:35

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

Originally Posted by Penguin (Post 1416083)
Would this be better croatian layout with direct keys "ć" and "đ" and "š", "č" and "ž" hidden behind accented keys.

No, it's actually the same. All those characters are of "same importance".

Quote:

Originally Posted by Penguin (Post 1416083)
I was also thinking to implement this http://www.branah.com/croatian as such, but it does not fit as is to portrait mode vkb and I am afraid people would feel even 12 keys on row too tight, although IMO it could be usable.

I tried putting all of them on direct keys and yes, it could be usable, but it's not :) - any typing without being very still is quite a challenge.

I personally don't think any of those characters should be on direct keys. Putting it all on accented keys is the way Android and iOS are doing it and it works well.

Penguin 2014-03-10 15:44

Re: Keyboard layouts for Jolla's Sailfish OS
 
Now I got it. Stock keyboars have also dead keys on use, would that be a working solution, although not like iOS or Android? Neither is SailfishOS or Jolla. Of course if you think that your layout is the best solution then I can just take your layout as is and put into rpm.

Edit: I guess dead keys won't make it any faster to type than accented keys with popup do and thus no benefit from those. I do not know.

Penguin 2014-03-10 16:34

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

Originally Posted by fri (Post 1399884)
Hi,

here's my version for a catalan layout (copy this file ca.qml in /usr/share/maliit/plugins/com/jolla/layouts/):

http://ubuntuone.com/7Bz8nNQLec0EIfnf7MRGsV

Are those dead key accents supposed work or are those just historical leftovers from spanish keyboard layout? Currently there is no deadkey to make those work.

Silwer 2014-03-10 18:30

Re: Keyboard layouts for Jolla's Sailfish OS
 
Thank you for the Estonian version. However, I found few issues to be ammended:

1. There should also be letters "š" and "ž" hidden under "s" and "z"
2. Also, it would be good if by pressing "Shift", keys "." and "," turn into "!" and "?" (this we had on the Estonian Nokia N9 keyboard and it was very comfortable to use).

igor_b 2014-03-10 19:30

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

Originally Posted by Penguin (Post 1416087)
Now I got it. Stock keyboars have also dead keys on use, would that be a working solution, although not like iOS or Android? Neither is SailfishOS or Jolla. Of course if you think that your layout is the best solution then I can just take your layout as is and put into rpm.

Edit: I guess dead keys won't make it any faster to type than accented keys with popup do and thus no benefit from those. I do not know.

IMO both dead keys and accented keys could be equally good solutions. Now when I think, maybe the dead keys would be even a bit better (never tried it for real things though so I can't say for sure - maybe I'll give it a go tomorrow :)).

But I'm not for adding direct keys - there are five of them and if you put them all it's too much and adding just some is not good solution.

Schturman 2014-03-11 05:57

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

Schturman: You could change your keyboard RPM's so that those do not overwrite any system files. You've wrote that those return original files when uninstalled, but that actually is real issue with them if system has been updated meanwhile and rpm uninstall will replace files updated by system update with files from earlier sailfish release.
1. when update will come, I will update my packages with new backup files.

2. I would like to do this, but the problem is I'm not programmer and I dondon't know how to point some files to use for example custom "inputhandler.qml" file... This is a reasone that I just override the original one and restore it on uninstallation...

Penguin 2014-03-11 09:45

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

Originally Posted by Schturman (Post 1416170)
1. when update will come, I will update my packages with new backup files.

2. I would like to do this, but the problem is I'm not programmer and I dondon't know how to point some files to use for example custom "inputhandler.qml" file... This is a reasone that I just override the original one and restore it on uninstallation...

1. That does not solve possible issue when someone uninstalls the keyboard after system update. You are expecting re-installation which might never happen in such case.

2. Study, study and study. Is there any other need for custom InputHandler than arrow keys? Thats not the only file you have changed and currently your keyboard is breaking other keyboard layouts.

I know this might be rare issue but still we should not just select the easiest path but. We should keep in mind that when making these modifications publicly available there will more users downloading and installing these than just people writing and participating here on TMO.

An other thing I just noticed: Where does this https://openrepos.net/content/schtur...w-vkb-4-arrows say it contains English and Russian keyboards too and that it will change those? Is that just a mistake or is it missing description.

I will look this arrow keys issue that has made so many custom keyboard creators to modify InputHandler.qml. For all other files there is already a solution how to avoid overwriting system files. You can find those solutions in use in Korean keyboards, Emoji Keyboard, and in those Croatian and Czech keyboard RPM's I made available recently.

If you want to look inside the rpm without installating it, that can be done with commands
Code:

rpm2cpio package-name.rpm | cpio -idmv
replace the package-name.rpm with your rpm file from which you want to extract the files.

Penguin 2014-03-11 14:19

Re: Keyboard layouts for Jolla's Sailfish OS
 
1 Attachment(s)
Ok, here we have a solution to arrow keys without altering systems InputHandler.qml.

Same file supports directions up, down, left and right. You can call it place it into you keyboard QML with following code lines:
Code:

CustomArrowKey { direction: "left" }
CustomArrowKey { direction: "up" }
CustomArrowKey { direction: "down" }
CustomArrowKey { direction: "right" }

If default key width is not ok for your needs, you may define property value arrowKeyWidth like this
Code:

CustomArrowKey { direction: "left"; arrowKeyWidth: 100 }
or with property width like all other keys.

Repetition is on by default and can be disabled with repeat property as in any function key.
Code:

CustomArrowKey { direction: "up"; repeat: false }
When used in custom keyboards, please locate the file in such path it won't conflict with files installed from other custom keyboards.

Penguin 2014-03-11 14:44

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

Originally Posted by Silwer (Post 1416112)
Thank you for the Estonian version. However, I found few issues to be ammended:

1. There should also be letters "š" and "ž" hidden under "s" and "z"

Thanks to cstom who originally created the layout. I have now updated those missing characters.

Quote:

Originally Posted by Silwer (Post 1416112)
2. Also, it would be good if by pressing "Shift", keys "." and "," turn into "!" and "?" (this we had on the Estonian Nokia N9 keyboard and it was very comfortable to use).

Sorry to say, but I did not implement it yet. Instead I have put that to my todo list. I am trying to get some kind of custom keyboard framework in place and I would not like to maintain same code multiple times in different layouts. Currently those layouts are not in common code space but I am working with it.

Penguin 2014-03-11 14:46

Re: Keyboard layouts for Jolla's Sailfish OS
 
Just for notice, result from off the thread discussion and few prototypes was to use both accented keys and dead keys in parallel in Croatian keyboard and new version has been published earlier today.

Schturman 2014-03-11 14:53

Re: Keyboard layouts for Jolla's Sailfish OS
 
Penguin,
1. Big thanks for your help.
2. I looked again in to the Emoji vkb and I think I found how to point to my custom files. I need to do some tests to be sure if it will work...


All times are GMT. The time now is 12:56.

vBulletin® Version 3.8.8