• yaley

    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 read more
  • yaley

    @JonB so….. what should i change?

    posted in Pythonista read more
  • yaley

    @cvp can it?

    posted in Pythonista read more
  • yaley

    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 read more
  • yaley

    @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 read more
  • yaley

    Yep! Maybe…. No need!

    posted in Pythonista read more
  • yaley

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

    posted in Pythonista read more
  • yaley

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

    posted in Pythonista read more
  • yaley

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

    posted in Pythonista read more
  • yaley

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

    posted in Pythonista read more
  • yaley

    @cvp looks like i found the problem, if in the changed def, i set activeKeys[keyCode] = presses[0].key().keyCode() it doesn’t work, but if i set activeKeys[keyCode] = presses[0].keyCode() then it works :)

    posted in Pythonista read more
  • yaley

    @cvp thanks it solved!!!

    posted in Pythonista read more
  • yaley

    @cvp here’s my code, I’ve tried to restart Pythonista

    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] = True
    

    posted in Pythonista read more
  • yaley

    Wait no, why??? Why my first test is correct and then the second test is not working?????

    posted in Pythonista read more
  • yaley

    @cvp You’re method is correct, just i am stupid, i typed wrongly, i set the variable to True in the pressesEnded def

    XD

    posted in Pythonista read more
Internal error.

Oops! Looks like something went wrong!