@cvp yes, but the problem is when the second press joined CustomViewController_pressesChanged_withEvent_()
didnt run about it
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.
Best posts made by yaley
-
RE: Check multi-keys press
-
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
-
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
-
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’sCustomViewController_pressesBegan_withEvent_
will not triggered, pls help? -
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
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 pythonistaBut, 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 -
RE: Check multi-keys press
And, also, can
vi.View().get_key_commands()
andui.View().key_command(sender)
detect keyup? if can, then i can make -
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 withui.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. -
RE: Check multi-keys press
Wait, um, after i added
print()
the pressesChange is not activating -
RE: Check multi-keys press
@cvp I’ve already changed it, read it again :D The difference is
[0].key().keyCode()
and[0].keyCode()
-
RE: Check multi-keys press
@cvp no it’s my wrong again xD They’re absolutely no difference before, lol