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.


    Palm rejection in Pythonista?

    Pythonista
    2
    3
    1145
    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.
    • superrune
      superrune last edited by

      Hi!

      I have done a pixel art app with Pythonista. Everything is working as it should, and the painting experience is great through Python. But I wish the app had palm rejection when I used my Apple Pencil. Does anyone know if that is possible with Pythonista?

      mikael 2 Replies Last reply Reply Quote 0
      • mikael
        mikael @superrune last edited by

        @superrune, yes, but you would need to change your app to use gestures (mainly panning, I guess, but tapping and pinching could of course be relevant as well), and only react to pen-based gestures.

        Let me know if this would be a relevant option for you.

        1 Reply Last reply Reply Quote 0
        • mikael
          mikael @superrune last edited by

          @superrune, sorry, it is probably easier than that. In your code, you can select pencil touches like this:

          class Penned(ui.View):
              
              def touch_began(self, t):
                  if t.objc_instance.type() == 2:
                      ...
          

          Note that this is a bit untested, as I do not have an Apple Pencil.

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