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.
[SOLVED] Is there anyway to capture the input from keyboard?
-
THIS QUESTION HAS BEEN SOLVED
I want to capture all input from keyboard (including SHIFH, ALT, COMMAND and ARROW keys) in my app. Is there anyway to achieve this goal?
My first idea is that putting invisible ui.TextView and move focus onto it, then watch the ui.TextView's buffer. Most input can get with this idea, but I cant capture special keys like SHIFT, CTRL, ALT and ARROW keys.
-
Using objc you can.
See ShTerminal in shterminal.py in stash for a good example of this, which uses modifier keys, etc.
Otherwise search the forums for keyCommands
You can attach the callback to any UIResponder, which could be the main app, a textview, or any other general view.
-
@JonB Thanks a lot for your quick suggestion! I'll read them and try.
-