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)

Schturman 2013-12-10 05:34

Re: Keyboard layouts for Jolla's Sailfish OS
 
Bundyo, thanks for tests..
If someone else want to test Hebrew vkb, here is a files:
https://dl.dropboxusercontent.com/u/.../Jolla1/he.qml
https://dl.dropboxusercontent.com/u/...Jolla1/he2.qml

ZogG 2013-12-10 08:00

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

Originally Posted by MSameer (Post 1394309)
Fonts are there. droid sans Arabic and droid sans Hebrew :)

I don't know Hebrew but browser renders Arabic without issues and I think it should be fine for Hebrew too.

However sailfish native apps show Arabic text as squares. I think this is a fontconfig issue but I am yet to get to the bottom of it.

I also assume Hebrew will have the same issues but I haven't tried.

RTL as in mirroring the UI (I am a native Arabic speaker so I know what RTL is) but I am not sure what's meant by it in this context ?

It as discussed with sailors on IRC, as well there is difference between browser and system. I have sailfish on n950 and mails with hebrew do not display any hebrew :\

MSameer 2013-12-10 11:18

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

Originally Posted by Bundyo (Post 1394357)
Probably writing from right to left in input fields?

Also, when I tested, the keyboard showed the hebrew characters as squares, maybe it uses different font by default? Can we change the font in the QML layout file?

I can write Arabic fine (Did not try much) so there is still something I don't understand.

The issue with Hebrew is seems to be related to the Arabic issue too.

Droid sans hebrew and droid sans arabic are both being "merged" into droid sans family by fontconfig. Silica uses another font which is assigned explicitly via font.fontFamily

I noticed that arabic shows fine if I install another font OR if I remove the fontconfig family merging XML snippet.

I am yet to understand why this is happening. If someone can dig then please do too :)

Quote:

Originally Posted by ZogG (Post 1394393)
It as discussed with sailors on IRC, as well there is difference between browser and system. I have sailfish on n950 and mails with hebrew do not display any hebrew :\

Seems I have missed that discussion. Who did you talk to?

I am not surprised here because browser does its own rendering

ZogG 2013-12-10 18:17

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

Originally Posted by MSameer (Post 1394460)
I can write Arabic fine (Did not try much) so there is still something I don't understand.

The issue with Hebrew is seems to be related to the Arabic issue too.

Droid sans hebrew and droid sans arabic are both being "merged" into droid sans family by fontconfig. Silica uses another font which is assigned explicitly via font.fontFamily

I noticed that arabic shows fine if I install another font OR if I remove the fontconfig family merging XML snippet.

I am yet to understand why this is happening. If someone can dig then please do too :)



Seems I have missed that discussion. Who did you talk to?

I am not surprised here because browser does its own rendering

i think it was "special"
We were told that there is ticket for that, as well as arabic would be little bit more difficult than hebrew coz of kerning (i'm noobie so not sure what is what and who is who :) )

qwazix 2013-12-17 15:48

Re: Keyboard layouts for Jolla's Sailfish OS
 
Ελληνικά

Code:

import QtQuick 2.0
import ".."

KeyboardLayout {
    KeyboardRow {
        CharacterKey { caption: ";"; captionShifted: ":"; symView: "1"; symView2: "€" }
        CharacterKey { caption: "ς"; captionShifted: "€"; symView: "2"; symView2: "£" }
        AccentedCharacterKey { caption: "ε"; captionShifted: "Ε"; symView: "3"; symView2: "$"; accents: "έ"; accentsShifted: "Έ"; deadKeyAccents: "´έ"; deadKeyAccentsShifted: "´Έ"  }
        CharacterKey { caption: "ρ"; captionShifted: "Ρ"; symView: "4"; symView2: "¥" }
        CharacterKey { caption: "τ"; captionShifted: "Τ"; symView: "5"; symView2: "₹" }
        AccentedCharacterKey { caption: "υ"; captionShifted: "Υ"; symView: "6"; symView2: "%"; accents: "ύϋΰ"; accentsShifted: "Ϋ"; deadKeyAccents: "´ύ"; deadKeyAccentsShifted: "´Ύ"  }
        CharacterKey { caption: "θ"; captionShifted: "Θ"; symView: "7"; symView2: "<"; }
        AccentedCharacterKey { caption: "ι"; captionShifted: "Ι"; symView: "8"; symView2: ">"; accents: "ίϊΐ"; accentsShifted: "ΊΪ"; deadKeyAccents: "´ί"; deadKeyAccentsShifted: "´Ί"  }
        AccentedCharacterKey { caption: "ο"; captionShifted: "Ο"; symView: "9"; symView2: "["; accents: "ό"; accentsShifted: "Ό"; deadKeyAccents: "´ό"; deadKeyAccentsShifted: "´Ό"  }
        CharacterKey { caption: "π"; captionShifted: "Π"; symView: "0"; symView2: "]" }
    }

    KeyboardRow {
        AccentedCharacterKey { caption: "α"; captionShifted: "Α"; symView: "*"; symView2: "`"; accents: "ά"; accentsShifted: "Ά"; deadKeyAccents: "´ά"; deadKeyAccentsShifted: "´Ά" }
        CharacterKey { caption: "σ"; captionShifted: "Σ"; symView: "#"; symView2: "^" }
        CharacterKey { caption: "δ"; captionShifted: "Δ"; symView: "+"; symView2: "|" }
        CharacterKey { caption: "φ"; captionShifted: "Φ"; symView: "-"; symView2: "_" }
        CharacterKey { caption: "γ"; captionShifted: "Γ"; symView: "="; symView2: "§" }
        AccentedCharacterKey { caption: "η"; captionShifted: "Η"; symView: "("; symView2: "{"; accents: "ή"; accentsShifted: "Ή"; deadKeyAccents: "´ή"; deadKeyAccentsShifted: "´Ή"  }
        CharacterKey { caption: "ξ"; captionShifted: "Ξ"; symView: ")"; symView2: "}" }
        CharacterKey { caption: "κ"; captionShifted: "Κ"; symView: "~"; symView2: "°" }
        CharacterKey { caption: "λ"; captionShifted: "Λ"; symView: "!"; symView2: "¡" }
        DeadKey { id: deadKey; caption: "´"; captionShifted: "¨";}
    }

    KeyboardRow {
        ShiftKey {}

        CharacterKey { caption: "ζ"; captionShifted: "Ζ"; symView: "@"; symView2: "«" }
        CharacterKey { caption: "χ"; captionShifted: "Χ"; symView: "&"; symView2: "»" }
        CharacterKey { caption: "ψ"; captionShifted: "Ψ"; symView: "/"; symView2: "÷"}
        AccentedCharacterKey { caption: "ω"; captionShifted: "Ω"; symView: "\\"; symView2: "“"; accents: "ώ"; accentsShifted: "Ώ"; deadKeyAccents: "´ώ"; deadKeyAccentsShifted: "´Ώ"  }
        CharacterKey { caption: "β"; captionShifted: "Β"; symView: "\""; symView2: "”" }
        CharacterKey { caption: "ν"; captionShifted: "Ν"; symView: ";"; symView2: "„"}
        CharacterKey { caption: "μ"; captionShifted: "Μ"; symView: ":"; symView2: "·" }

        BackspaceKey {}
    }

    KeyboardRow {
        SymbolKey {
            width: symbolKeyWidthNarrow
        }
        CharacterKey {
            caption: "'"
            captionShifted: "'"
            width: punctuationKeyWidthNarrow
            fixedWidth: true
        }
        CharacterKey {
            caption: ","
            captionShifted: ","
            width: punctuationKeyWidthNarrow
            fixedWidth: true
            separator: false
        }
        SpacebarKey {
            fixedWidth: true
        }
        CharacterKey {
            caption: "."
            captionShifted: "."
            width: punctuationKeyWidthNarrow
            fixedWidth: true
            separator: false
        }
        EnterKey {}
    }
}


qwazix 2013-12-18 18:37

Re: Keyboard layouts for Jolla's Sailfish OS
 
1 Attachment(s)
If you want to switch quick between two layouts, insert this
Code:

        KeyBase {
            Image{
                source: "globe.png";
                anchors.centerIn: parent;       
            }
            onClicked: {canvas.layoutRow.switchLayout(0); canvas.updateIMArea()}
            width: punctuationKeyWidthNarrow
        }

in your spacebar row in both layouts you want. Don't forget to change the number to your target layout in each one.

I'm sure it can be automated so that it can be inserted once in the SpaceBarRow.qml and toggle between any two layouts, but it works for me as is, so I'm leaving the better implementation as an exercise for the reader :-P

Nikos Alexandris 2013-12-20 12:01

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

Originally Posted by gsalone (Post 1392013)
Don't forget Greek layout :-)

+1 | 2nd Greek User :-)

cquence 2013-12-20 14:19

Re: Keyboard layouts for Jolla's Sailfish OS
 
What did you use to edit the layouts.conf file? I copied the file across to the phone's "documents" folder and tried to open it with a text editor from the PC without success...

Kaacz 2013-12-21 00:24

Re: Keyboard layouts for Jolla's Sailfish OS
 
?!? layouts.conf is simple unix text file. I use Linux on PC, I am happy... Same end of line, same UTF-8 code base. :)

PS: i hate when people say something as "I use PC" without OS specification. Not, for me not PC==Windows. PC is HW for many OS. :)

Kaacz 2013-12-21 02:02

Re: Keyboard layouts for Jolla's Sailfish OS
 
Now I create Czech qwerty layout with two deadkeys, near same as I have on N9/Harmattan. I found bug in 'AccentedCharacterKey.qml'. Or I don't know how is right way to define deadKeysAccents for more then one deadkey. :p

I make little patch:

Code:


//  original code - i don't know what is mean ..
//    property string _accentedText: _deadAccentIndex > -1 && !keyboard.inSymView ? _deadKeyAccents.substr(_deadAccentIndex*2+1, 1) : ""

//  code for definition  deadKeyAccents: "´éˇě"
//    property string _accentedText: _deadAccentIndex > -1 && !keyboard.inSymView ? _deadKeyAccents.substr(_deadAccentIndex+1, 1) : ""

//  code for definition  deadKeyAccents: "´ˇéě"
property string _accentedText: _deadAccentIndex > -1 && !keyboard.inSymView ? _deadKeyAccents.substr((_deadKeyAccents.length/2)+_deadAccentIndex, 1) : ""

https://together.jolla.com/question/...n-one-deadkey/

Second version Czech qwertz & qwerty vkb with two deadkeys here as example
(second release with own files to avoid collision with originals):

Look at Screenshots :)

Put to dir /usr/share/maliit/plugins/com/jolla this:
- AccentedCharacterKey2.qml patched for more then one deadkey
- DeadKey2.qml with better recognition on layout.

Put to dir /usr/share/maliit/plugins/com/jolla/layouts this:
- cz.qml
- cz_qwerty.qml
- 1_custom_czech.conf file (no need to edit original layouts.conf, maliit load any .conf file in this dir).

Edit 2014-01-15: fixed cz layout and move some spec chars in both layouts .. improved DeadKey look.
Edit 2014-01-22: created own *2.qml files to avoid conflict with original, created own 'layout.conf'.

Edit: 2014-01-31: fixed cz.qml (qwertz) layout to proper use AccentedCharacterKey2.qml (fixed version).
Bug for more deadkeys still not fixed in update 1.0.3.8.


All times are GMT. The time now is 00:10.

vBulletin® Version 3.8.8