omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular
    1. Home
    2. yaley

    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.


    • Profile
    • Following 1
    • Followers 0
    • Topics 4
    • Posts 47
    • Best 5
    • Controversial 0
    • Groups 0

    yaley

    @yaley

    5
    Reputation
    306
    Profile views
    47
    Posts
    0
    Followers
    1
    Following
    Joined Last Online

    yaley Unfollow Follow

    Best posts made by yaley

    • RE: Check multi-keys press

      @cvp yes, but the problem is when the second press joined CustomViewController_pressesChanged_withEvent_() didnt run about it

      posted in Pythonista
      yaley
      yaley
    • RE: Check multi-keys press

      @cvp oops that’s my wrong, but after changing it to True, it’s still not working, everything turns True, let me see the documentation carefully again.

      After the key changed, the activeKey turns True, but then it will forever True, until next keyup

      posted in Pythonista
      yaley
      yaley
    • RE: Check multi-keys press

      @cvp my code is still not working

      
      def CustomViewController_pressesBegan_withEvent_(_self, _cmd, _presses, event):
      	global activeKeys
      	presses = ObjCInstance(_presses).allObjects()
      	keyCode = presses[0].key().keyCode()
      	
      	activeKeys[keyCode] = True
      	
      def CustomViewController_pressesEnded_withEvent_(_self, _cmd, _presses, event):
      	global activeKeys
      	presses = ObjCInstance(_presses).allObjects()
      	keyCode = presses[0].key().keyCode()
      	
      	activeKeys[keyCode] = False
      	
      def CustomViewController_pressesChanged_withEvent_(_self, _cmd, _presses, event):
      	global activeKeys
      	presses = ObjCInstance(_presses).allObjects()
      	keyCode = presses[0].keyCode()
      	
      	activeKeys[keyCode] = False
      
      
      posted in Pythonista
      yaley
      yaley
    • Check multi-keys press

      Hi, i tried to use objc UIViewController to get key press with text field, but the problem is, if i press left arrow key first, and then press right arrow key, the right arrow key’s CustomViewController_pressesBegan_withEvent_ will not triggered, pls help?

      posted in Pythonista
      yaley
      yaley
    • RE: Hide the settings button when editing

      @cvp I solved the problem. Reply your question first. The button shows when you edit a ui.View().Textfield()using a Bluetooth keyboard. And i solved that problem by changing the settings. General > Keyboard > Shortcuts (turn off this one) and General > Keyboard > Predictive ( turn off this one too )

      Then, the problem solved :D But i have another question too! See it, the topic is about checking multi-keys press

      posted in Pythonista
      yaley
      yaley

    Latest posts made by yaley

    • RE: Can i use swiftUI in pythonista ?

      actually, swiftUI is just a module of build app in swift, but ofc! swiftui means it is a module in swift not in others! So swiftUI cannot be in the pythonista

      But, you might ask me ‘Then why developer doesn’t make it by hisself like scene module?’ because making a new module is very hard and lots of things & concepts will be changed

      posted in Pythonista
      yaley
      yaley
    • RE: Check multi-keys press

      @JonB so….. what should i change?

      posted in Pythonista
      yaley
      yaley
    • RE: Check multi-keys press

      @cvp can it?

      posted in Pythonista
      yaley
      yaley
    • RE: Check multi-keys press

      And, also, can vi.View().get_key_commands() and ui.View().key_command(sender) detect keyup? if can, then i can make

      posted in Pythonista
      yaley
      yaley
    • RE: Check multi-keys press

      @cvp But the main problem is just when arrow keys will happen, just like umm i give you an example:
      I am detecting keys with ui.Textfield() And now i start pressing left arrow key. So in the input it goes left ( the selection bar ), but if the right arrow keys joined the right arrow key, the selection bar of input still goes left.

      posted in Pythonista
      yaley
      yaley
    • RE: Check multi-keys press

      Yep! Maybe…. No need!

      posted in Pythonista
      yaley
      yaley
    • RE: Check multi-keys press

      @cvp i dont think that that def was called :(

      posted in Pythonista
      yaley
      yaley
    • RE: Check multi-keys press

      Wait, um, after i added print() the pressesChange is not activating

      posted in Pythonista
      yaley
      yaley
    • RE: Check multi-keys press

      @cvp I’ve already changed it, read it again :D The difference is [0].key().keyCode() and [0].keyCode()

      posted in Pythonista
      yaley
      yaley
    • RE: Check multi-keys press

      @cvp no it’s my wrong again xD They’re absolutely no difference before, lol

      posted in Pythonista
      yaley
      yaley