omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    Keyboard switch.

    Pythonista
    5
    116
    46943
    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.
    • shinya.ta
      shinya.ta @cvp last edited by

      @cvp

      I installed the last version, but the result doesn't change.
      I don't know why.

      cvp 2 Replies Last reply Reply Quote 0
      • cvp
        cvp @shinya.ta last edited by

        @shinya.ta

        Could you install this little script as keyboard.
        Then , you select a text where you want, tap the "copy" button and paste the clipboard to check if the action does work.

        When you have tested the little script two days ago, it worked with "qwerty", now we check if it works with selected text, just to be sure that the get_selected_text works.

        import keyboard
        import clipboard
        import ui
        v = ui.View()
        b = ui.Button()
        b.frame = (2,2,60,32)
        b.title = 'copy'
        def b_action(sender):
            t = keyboard.get_selected_text()
            clipboard.set(t)
        b.action = b_action
        v.add_subview(b)
        keyboard.set_view(v, 'expanded')
        
        1 Reply Last reply Reply Quote 0
        • cvp
          cvp @shinya.ta last edited by cvp

          @shinya.ta I have exactly the same problem.
          If I use my little keyboard script in Mail, it is not ok, it if I use it in Pythonista editor, it works.

          It is like if Clipboard of Pythonista keyboard is not the same as another app's keyboard.
          I don't know

          I've created an issue in the bugs list of a Pythonista, hoping @omz would process it.

          shinya.ta 1 Reply Last reply Reply Quote 0
          • shinya.ta
            shinya.ta @cvp last edited by

            @cvp

            I tried it too, but it wasn't good.

            cvp 2 Replies Last reply Reply Quote 0
            • cvp
              cvp @shinya.ta last edited by

              @shinya.ta I'm sorry for you but I don't know if it is a problem of Pythonista or of iOS...
              But sure, it is not your iDevice 😀

              I hope that you could, despite that, use this script for other tasks than copy...
              If you need more keys, don't hesitate to ask

              1 Reply Last reply Reply Quote 0
              • cvp
                cvp @shinya.ta last edited by

                @shinya.ta After some tests, it seems that in my little script and the big script, the "copy" button work in Safari, in Notes, in Pythonista, in Numbers but not in Mail....
                This is perhaps an Apple limitation.

                shinya.ta 1 Reply Last reply Reply Quote 0
                • shinya.ta
                  shinya.ta @cvp last edited by

                  @cvp

                  Thank you very much. Even if I can't use the copy button, I'm happy that I can move the cursor.
                  Now my wife can write email happily using both the Braille application and the braille.

                  Thank you very much.
                  Thank you very much.

                  cvp 1 Reply Last reply Reply Quote 0
                  • cvp
                    cvp @shinya.ta last edited by

                    @shinya.ta for info, Apple doc of customized keyboards says
                    Because a custom keyboard can draw only within the primary view of its UIInputViewController object, it cannot select text. Text selection is under the control of the app that is using the keyboard. If that app provides an editing menu interface (such as for Cut, Copy, and Paste), the keyboard has no access to it

                    The standard keyboard of Mail offers a copy button

                    shinya.ta 1 Reply Last reply Reply Quote 0
                    • shinya.ta
                      shinya.ta @cvp last edited by

                      @cvp

                      Thank you for your detailed information.

                      1 Reply Last reply Reply Quote 0
                      • mukulb
                        mukulb last edited by

                        Thanks all for your responses. i was having similar questions and your answers were helpful to me.

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post
                        Powered by NodeBB Forums | Contributors