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)

qwazix 2013-12-26 18:25

Re: Hungarian keyboard + English with cursor arrows
 
Quote:

Originally Posted by cstom (Post 1400743)
I was able to add the left-right buttons, but it requires changes in a few qml files...

Make sure you have a backup of /usr/share/maliit/plugins/com/jolla and /usr/share/maliit/plugins/com/jolla/layouts.

There are two layouts included, a modified English and a new Hungarian one. Both has cursor arrows.
There is a dedicated switch (or "toggle") button as well, which changes between this two languages with one click. You might want to change the target language or disable it althogether: you can do it in the SpacebarRowArrowHu.qml file (just remove the FunctionKey section to disable the toggle, or change the index to the appropriate language)

Put en.qml and hu.qml to the /usr/share/maliit/plugins/com/jolla/layouts, the rest to the /usr/share/maliit/plugins/com/jolla/ directory.

Oh, and don't forget to add this to the layouts.conf file:
Code:

[hu.qml]
name=Magyar
languageCode=HU

Attachment 34180

Weird, I tried doing about the same, but in the second row, the keys appeared but the cursor didn't move...

sponka 2013-12-27 00:03

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

I modified english layout to be suitable for slovenian language.

- š, č and ž are directly accesible, ć is moved to c (longpress to access) and đ moved to d (longpress to access)
- since I use notes a lot also modified some symbols -- added "bullet" to y and 2 types of arrows to č and ž
- @ is always visible

See pics for better description:

normal
caps
symbols 1
symbols 2
longpress sample


Usage

As root:

1) copy "sl.qml" to /usr/share/maliit/plugins/com/jolla/layouts/
2) add this to existing layouts.conf:

Code:

[sl.qml]
name=Slovenščina
languageCode=SL

OR copy file "CustomLayouts.conf" to /usr/share/maliit/plugins/com/jolla/layouts/

Restart maalit as user nemo with "systemctl --user restart maliit-server.service"

bennypr0fane 2013-12-27 03:19

Re: Keyboard layouts for Jolla's Sailfish OS
 
Can you make a german layout with arrows?
And somehow we must add the ability to copy&paste text in Android apps, the Sailfish method doesn't work there, but the Sf keyboard is used.
Arrow keys would make my life with Jolla sooo much better.

Ch.Saqib 2013-12-27 05:53

Re: Keyboard layouts for Jolla's Sailfish OS
 
Can you please add Urdu and Arabic Keyboards layouts? It would be really great. Thanks

gsalone 2013-12-27 10:59

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

Originally Posted by qwazix (Post 1400646)

For the changes to be applied restart the keyboard server
Code:

systemctl --user restart maliit-server.service
Enjoy

For this step I get the following:

Code:

Failed to get D-bus connection: Failed to verify owner of bus.
What is wrong?
:confused:

EDIT [fixed]: just needed to run
Code:

systemctl --user restart maliit-server.service
outside root.

matimilko 2013-12-27 11:18

Re: Keyboard layouts for Jolla's Sailfish OS
 
How can I copy files to layouts?
File manager on jolla doesn't support copy and can't connect in root from XP or Ubuntu.

Venemo 2013-12-27 13:04

Re: Keyboard layouts for Jolla's Sailfish OS
 
Accented characters with multiple dead keys

For versions >= 1.0.7.x

In 1.0.7.x, they have fixed the AccentedCharacterKey so that it now produces a more logical, better behaviour.
You should just add each symbol after the accent. For example:

Code:

AccentedCharacterKey {
    caption: "o";
    captionShifted: "O";
    symView: "9";
    symView2: "[";
// This is the relevant part
    deadKeyAccents: "´ó¨ö˝ő"
    deadKeyAccentsShifted: "´Ó¨Ö˝Ő"
}

For versions <= 1.0.6.x

Quote:

Originally Posted by Kaacz (Post 1399320)
I found bug in 'AccentedCharacterKey.qml'. Or I don't know how is right way to define deadKeysAccents for more then one deadkey. :p

You don't have to patch the AccentedCharacterKey.qml file. Just see how it works. The key is this line:

Code:

_deadKeyAccents.substr(_deadAccentIndex*2+1, 1)
So it searches for the accent in the deadKeyAccents property, multiplies it by two and adds one. The accented letter should be at this position in the text.

Here's an example on how to make an accented key with the ability to use multiple dead keys:

Code:

AccentedCharacterKey {
    caption: "o";
    captionShifted: "O";
    symView: "9";
    symView2: "[";
    accents: "oöôòóő";
    accentsShifted: "OÖÔÒÓŐ";
// This is the relevant part
          deadKeyAccents: "´ó˝¨ ő ö";
    deadKeyAccentsShifted: "´Ó˝¨ Ő Ö"
//                position 01234567
}

In this example, we produce Ó, Ö, Ő from O. The first accent is ´ located at position 0 so Ó is located at position 0*2+1=1. Second accent is ˝ located at position 2 so Ő should be at location 2*2+1=5. Lastly ¨ is located at position [b]3[b] so Ö is at position 3*2+1=7.

It doesn't matter what the rest of the string is, I just filled the empty places with spaces.

If you start with a space, it might be simpler for just two deadkeys:

Code:

    deadKeyAccentsShifted: " ´¨Á Ä"
//                position 012345

Hope this helps!

Venemo 2013-12-27 13:23

Re: Keyboard layouts for Jolla's Sailfish OS
 
Hungarian layout

I've created a Hungarian QWERTZ layout that is very similar to the one found in the N9. Since we have too many accented characters I added deadkeys to produce them.

EDIT 1: This layout has been updated to work correctly on OS versions >= 1.0.7.x
EDIT 2: Removed the setup steps for old OS versions, added easily followable command-line steps.

Steps to add the layout

Here are some easy steps that you can do on the command line to add my virtual keyboard layout.

0. First, you have to enable developer mode and set a root password in Settings.

1. Then, open the terminal and use the following commands:

Code:

# You need to work as root
devel-su
# Go to the right directory
cd /usr/share/maliit/plugins/com/jolla/layouts/
# Download the keyboard layout
curl http://pastebin.com/raw.php?i=wfyzerpn > hu.qml
# Download the layout config file
curl http://pastebin.com/raw.php?i=eFM6Pyps > layouts-hu.conf
# Restart the virtual keyboard server
killall maliit-server

2. Now, you can go to Settings -> Text input -> Keyboards and select your new keyboard.

FAQ
  • Which accents are available?
    All of them that we use in Hungarian: ´ (located at the end of the first row) and ˝ (end of second row) and ¨ (left to enter on the last row)
  • How do I enter accented keys?
    First, hit one of the deat keys (´ or ˝ or ¨) and then the actual accented letters will appear in place of the normal letters
  • After update, the layour disappeared!
    Just re-add the layout config file.

Screenshot:

http://venemo.net/owncloud/public.ph...03749&download

matimilko 2013-12-27 18:40

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

Originally Posted by sponka (Post 1400877)
Hi!

I modified English layout to be suitable for Slovenian language.

hello!
I've managed to install Slovenian language, now we need only Slovenian prediction or even better SWYPE.

Thanks

ajajaij 2013-12-27 22:01

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

I've modified EN layout for Latvian.

In layout.config add:
Code:

[lv.qml]
name=Latviešu
languageCode=LV

lv.qml available here: https://www.dropbox.com/s/oxfjnt534t4t9kv/lv.qml

I've added a deadkey for accented letters at the end of 2nd row.


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

vBulletin® Version 3.8.8