Q: How can I set the keyboard's width more narrow in landscape view?

SFOS 4.5.0.24 - Xperia 10
Q: How can I set the keyboard’s width more narrow in landscape view, without affecting portrait view?

I’ve tweaked the file
/usr/share/maliit/plugins/com/jolla/KeyboardGeometry.qml
for keyboard height, but there I can’t find any option to control width.

It woud be fine if keyboard would only fill half of the screen width, of course only in landscape mode.

Thank’s for any help!

Did you try the split option? What was wrong with that? Should be addressing the same issue…

No, split is one half left and other half right but what i want is simply less width to make smaller horizontal moves with the stylus or with one finger when writing. For split keyboard i would need to hold the phone with two hands and type with two thumbs.

In that file I see something like

    property int keyboardWidthLandscape: screen.height
    property int keyboardWidthPortrait: screen.width

You could try changing that to something like:

    property int keyboardWidthLandscape: Math.floor(screen.height * 0.7)

(Using Math.floor() otherwise the result may be a decimal which will not fit in an int)

You could also use one of the other values in that file to subtract a fixed amount:

    property int keyboardWidthLandscape: screen.height - functionKeyWidthLandscape

Hint: A little lower in the file there is

    property int middleBarWidth: keyboardWidthLandscape / 4

which means if you make the overall kbd smaller, the space bar will get smaller as well. Might want to compensate for that somehow.

1 Like

Thank you very much @nephros ! I tried all suggestions you gave but it didn’t change anything.

This is in line 13 at my phone (4.5.0.24).
I tried both your suggestions, also simply write 1000 there, and also changing screen.height to screen.width.

Changing the
property int middleBarWidth: keyboardWidthLandscape / 4
to 8 should cause some markable change, but in fact does nothing. No change in all cases, keyboard looks the same as always.

Of course I did also a systemctl --user restart lipstick after each modification. But all that has no effect.

Hm, the only place where that file is used is /usr/lib64/maliit/plugins/jolla-keyboard.qml.

And it seems not all values are actually applied everywhere, depending on keyboard mode.

But the normal kbd seems to use the canvas element in that file, so the root element.

Might want to play with its width (about line 50).

1 Like