Navigation

    UBports Robot Logo

    UBports Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    SOLVED Keyboard in landscape mode is ugly

    Xiaomi Mi A2
    4
    10
    445
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • messayisto
      messayisto last edited by

      The landscape mode for the keyboard is nearly unusable. letters are stretched and scaled in a strange way. Has anybody got an idea how to fix this?
      screenshot20210912_235409987.png
      thanks in advance!

      1 Reply Last reply Reply Quote 0
      • K
        kugiigi last edited by

        Yeah, that's because tall screens are detected as tablets, The code definitely needs to be updated to properly handle this. For now, you may modify a file to change the keyboard height in landscape.

        messayisto dobey 2 Replies Last reply Reply Quote 1
        • messayisto
          messayisto @kugiigi last edited by

          @kugiigi thanks! Can you tell me which file I have to modify?

          K 1 Reply Last reply Reply Quote 0
          • dobey
            dobey @kugiigi last edited by

            @kugiigi said in Keyboard in landscape mode is ugly:

            Yeah, that's because tall screens are detected as tablets, The code definitely needs to be updated to properly handle this. For now, you may modify a file to change the keyboard height in landscape.

            Not sure what you mean by "tablet" in this case. The Mi A2 has a 2:1 screen, albeit with many more pixels than pinephone, the keyboard works fine on pinephone in plasma mobile, and even works OK on my PC with 21:9 ultrawide display.

            1 Reply Last reply Reply Quote 0
            • K
              kugiigi @messayisto last edited by

              @messayisto This file https://github.com/ubports/keyboard-component/blob/xenial/qml/keys/key_constants.js. You have to change the value of tabletKeyboardHeightLandscape. On your device, it's located at /usr/share/maliit/plugins/com/ubuntu/keys.

              @dobey Upstream maliit may have changed the logic for the dimensions. UT on the Pinephone have the same issue.

              messayisto L 2 Replies Last reply Reply Quote 1
              • messayisto
                messayisto @kugiigi last edited by

                @kugiigi thank you so much, this did the trick. Is there a value to rezise the (too-big-)upper border?

                K 1 Reply Last reply Reply Quote 0
                • K
                  kugiigi @messayisto last edited by

                  @messayisto It's called the word ribbon. Check something similar in the same file.

                  messayisto 1 Reply Last reply Reply Quote 0
                  • messayisto
                    messayisto @kugiigi last edited by

                    @kugiigi thank you so much once again!
                    kind regards

                    1 Reply Last reply Reply Quote 0
                    • L
                      Luksus @kugiigi last edited by Luksus

                      @kugiigi I wonder why tabletKeyboardHeightLandscape is responsible for this, since there is also a phoneKeyboardHeightLandscape?

                      Devices: BQ e4.5, Fairphone 2, Fairphone 3, Pinephone
                      Apps: https://open-store.io/?sort=relevance&search=author%3ALukas Baubkus , https://open-store.io/?sort=relevance&search=author%3Aluksus42
                      Ports: https://forums.ubports.com/category/65/fairphone-3

                      K 1 Reply Last reply Reply Quote 0
                      • K
                        kugiigi @Luksus last edited by

                        @luksus Because the code currently checks the width of the current screen and if it's higher than the specified threshold, the keyboard uses all tablet specific values. Since newer phones are taller, they are detected as tablets by the keyboard.

                        1 Reply Last reply Reply Quote 1
                        • First post
                          Last post