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.


    Flick button keyboard.

    Pythonista
    6
    514
    79641
    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
      It is the cursor movement keyboard that you made before.

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

        @cvp
        If there is a flick input button, it will be easier for my wife to use.

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

          @shinya.ta said

          It is the cursor movement keyboard that you made before.

          If I remember, it is not a keyboard that I wrote but a particular script to use buttons for cursor movements in a TextView, but it uses a standard keyboard and you want a special keyboard with flick button keys?

          Please, confirm both:

          1. what you call "cursor movement keyboard" is the "Move cursor in TextView.py" script where you have to tap buttons to move the cursor. And thus is not a keyboard.
          2. you want, in this script, to use a particular Japanese keyboard where keys can be used as flick buttons to generate vowels
          shinya.ta 1 Reply Last reply Reply Quote 0
          • shinya.ta
            shinya.ta @cvp last edited by

            @cvp

            I want a special keyboard.

            The Japanese input button is a flick input button, and I want to equip other blank buttons, a new line button, and a cursor movement button.

            1. I don't quite understand what this
              means.
            cvp 1 Reply Last reply Reply Quote 0
            • cvp
              cvp @shinya.ta last edited by cvp

              @shinya.ta Could you test this version of Emojis Keyboard.py, and tell me if the A button works as a flick button when you tap it with a long press.

              Important: the modified script imports a gestures module that you have to download from https://github.com/mikaelho/pythonista-gestures/blob/master/gestures.py and to save in your site-packages folder.

              Of course, this is only a test to check if I have correctly understood what you ask, thus don't hope to find here the solution.
              If it is ok, you would have to give me a full description of wanted keys and their content when flicked.

              Only tested on iPad

              Long press on A key gives

              Moving finger on E key gives

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

                @cvp
                I'm sorry. I don't know how to download it.

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

                  @shinya.ta said

                  I don't know how to download it.

                  My script, Mikael's script, both? Never downloaded something from GitHub ? 😭

                  Some years ago, I wrote some scripts for you or your wife. Did I always post them in the forum, never in GitHub ?

                  Anyway, to download gestures.py into your site-packages folder, create and run, once, this little script

                  import os
                  import requests
                  url = 'https://raw.githubusercontent.com/mikaelho/pythonista-gestures/master/gestures.py'
                  data = requests.get(url).content
                  dir  = os.path.expanduser('~/Documents/site-packages')	
                  file_name = url.split('/')[-1]
                  path = dir + '/' + file_name
                  with open(path,mode='wb') as out_file:
                  	out_file.write(data)
                  

                  To download my little "Emojis keyboard .py" in your Pythonista's root, create and run once this little script

                  import os
                  import requests
                  #url = 'https://raw.githubusercontent.com/mikaelho/pythonista-gestures/master/gestures.py'
                  url = 'https://raw.githubusercontent.com/cvpe/Pythonista-scripts/master/Emojis%20Keyboard.py'
                  data = requests.get(url).content
                  dir  = os.path.expanduser('~/Documents/')	
                  file_name = url.split('/')[-1].replace('%20', ' ')
                  path = dir + '/' + file_name
                  with open(path,mode='wb') as out_file:
                  	out_file.write(data)
                  

                  Then you have to replace the old keyboard script by this modified one... Please give me some feedback. Thanks

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

                    @cvp

                    """ docgen-ignore """

                    This is "Indentation Error".

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

                      @shinya.ta Where? In one my both little scripts to download or in gestures.py or in Emojis Keyboard.py?

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

                        @cvp
                        Can't I paste "gestures. py" into "Emoji Keyboard. py"?

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

                          @cvp
                          When I pasted "gestures. py" into "Emoji Keyboard. py" and started it, I got the previous error.

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

                            @cvp said:

                            import os
                            import requests
                            #url = 'https://raw.githubusercontent.com/mikaelho/pythonista-gestures/master/gestures.py'
                            url = 'https://raw.githubusercontent.com/cvpe/Pythonista-scripts/master/Emojis%20Keyboard.py'
                            data = requests.get(url).content
                            dir  = os.path.expanduser('~/Documents/')	
                            file_name = url.split('/')[-1].replace('%20', ' ')
                            path = dir + '/' + file_name
                            with open(path,mode='wb') as out_file:
                            	out_file.write(data)
                            

                            This doesn't respond to anything.

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

                              @shinya.ta said

                              When I pasted "gestures. py" into "Emoji Keyboard. py" and started it, I got the previous error.

                              As Emojis Keyboard.py imports gestures.py, you don't have to paste it, thus don't do that.

                              This doesn't respond to anything.

                              The little script does not respond something, it copies/replaces the modified Emojis Keyboard.py in your root folder.

                              Thus, please run my both little scripts and you will find anew Emojis Keyboard.py in your root folder

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

                                @cvp said:

                                @shinya.ta Could you test this version of Emojis Keyboard.py, and tell me if the A button works as a flick button when you tap it with a long press.

                                Important: the modified script imports a gestures module that you have to download from https://github.com/mikaelho/pythonista-gestures/blob/master/gestures.py and to save in your site-packages folder.

                                Of course, this is only a test to check if I have correctly understood what you ask, thus don't hope to find here the solution.
                                If it is ok, you would have to give me a full description of wanted keys and their content when flicked.

                                Only tested on iPad

                                Long press on A key gives

                                Moving finger on E key gives

                                Where is the package folder?

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

                                  @cvp
                                  It's too difficult for me to understand.

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

                                    @shinya.ta said

                                    Where is the package folder?

                                    you don't need to know it,

                                    My script gets the gestures.py file from the Internet and copies it in your site-packages folder.
                                    And the import gestures reads it there, all is automatic

                                    Tap on Python Modules and you will see site-packages folder

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

                                      @shinya.ta said

                                      It's too difficult for me to understand.

                                      The only thing to understand is that one of the two little scripts copy the Emojis Keyboard.py script in your root folder. The needed gestures.py is copied by the other little script in the folder where the import gets it.

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

                                        @cvp
                                        I'm sorry.

                                        The shame is that I don't really know how to use "GitHub".

                                        I also downloaded "Emojis Keyboard. py" from GitHub and didn't use it.

                                        I used to paste the script directly.

                                        I'm ashamed to say that you need to learn from using GitHub first.

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

                                          @shinya.ta No shame to not know something if you don't need it. I guess that you never needed to import a new module in Pythonista.

                                          For GitHub, you don't need to really use it because I suppose that you never will post a source code but you need to learn the minimum to get a source code.

                                          If you tap a link like https://raw.githubusercontent.com/cvpe/Pythonista-scripts/master/Emojis%20Keyboard.py, you open Safari at the GitHub site where a script is available in raw mode, that will say that you are able to select all, copy and paste in Pythonista.

                                          I guess that you can create a new empty script in Pythonista and paste in it some copied code.

                                          Now, if you select, copy and paste this little script in a new empty script in Pythonista

                                          import os
                                          import requests
                                          url = 'https://raw.githubusercontent.com/mikaelho/pythonista-gestures/master/gestures.py'
                                          data = requests.get(url).content
                                          dir  = os.path.expanduser('~/Documents/')   
                                          file_name = url.split('/')[-1].replace('%20', ' ')
                                          path = dir + '/' + file_name
                                          with open(path,mode='wb') as out_file:
                                              out_file.write(data)
                                          

                                          And you run it, it will get the code of gestures.py from GitHub and copy it to your site-packages folder as gestures.py. And from now for ever, any script can import gestures. All is automatic after you have run the little script. Then no need to understand GitHub.

                                          If you have run it and if you have already pasted the new Emojis Keyboard.py, as you are used to do, now the new code can run because you have imported the gestures module. At least, I hope.

                                          This was the 1st lesson 🙂

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

                                            @shinya.ta Please give me some feedback of until which step you are ok

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