I’m just trying to use keyboard input, with limited luck. (I have a logitech R400 presenter remote, which makes page up/down, period and F5 key presses).
The period was fine, as that’s in the keyboard chop standards. But, from there:
I tried to make a script (python) which checks the keystate() expression - that script fails, saying keystate isn’t known.
I’m not sure about how to make the alternate ‘panel execute’ method work… can I make a panel that listens to all keystrokes, all the time, that way? Is there a sample that shows how to build this setup?
Then I found /local/shortcuts. F5 is in there, but doesn’t seem to be ‘mapped’ to anything. Can I use that table to intercept F5 and convert it to another key?
And in that case (or in any case), I can’t find how to specify the page up and page down keys at all.
Found the touch shortcuts… which is global. I changed ‘F5’ to ‘5’ instead, but it throws a python error, as opposed to simulating a key press. I guess I need to define some python functions to have the shortcuts fire?
Then would need to know how page up and page down are represented in the short-cuts list syntax (they aren’t there, as far as I can tell).
It’s not quite released, but it will make it much easier.
But in the meantime, you can look at how function keys are used to drive this old example from 077 using shortcuts defined in Puzzle/Panel/local/shortcuts.
The commands are tscript, though they can run either a tscript of python DAT.
-Rob puzzle.tox (4.9 KB)
OK, so I found the shortcuts for the panel, and it runs a script in a text DAT? Or the function that the script defined?
I can probably work with that - put a DAT in with the global shortcuts with an operator of some kind.
And - page up and page down keys? How do I specify those in shortcuts?
Bruce
Edit - I have F5 triggering a DAT called ‘global_F5’ in the root of my network. I’m using that to trigger a button. Just the page up and down keys… is that possible?
Pageup/pagedown are specified by pgup pgdn in this system of shortcuts.
In the puzzle example, each keyboard entry executes a line of tscript.
For example: up run move 0 -1
Will execute “run move 0 -1” when pressing up, where move is a DAT named move.
We will have the Keyboard DAT out shortly too though.
Hm. Youre right.
Seems in this system pageup looks like capital Z and pagedown looks like bracket: ]
Can you try with those constants instead?
(assuming youre okay with Z, and ] also having the same function?)
Ive verified it will work correctly in the new Keyboard In DAT
FYI - the F5 key almost gave me a conniption fit. Half the time it would trigger my custom script (which ran a text DAT), then other times it would drop my window out of perform mode (BOOM - desktop!), and occasionally would open the errors dialog (the original F5 function that should have been masked).
The one key I could trigger from a keyboard OP was perfect. Looking forward to the new Keyboard OP.
I’ll post the result - but you guys seem to track everything down on Vimeo anyway!