Hi Jerry
There are a few mechanisms you can try but if you want to capture digits regardless of where the focus is in your panel or in DashBoard, using keyboard shortcuts to trigger soft GPIs into your panel is probably the most reliable route - these fill fire provided a text field does not have the focus. There are 2 steps: creating your panel and registering a function to be triggered and registering the keyboard shortcuts in DashBoard:
<abs contexttype="opengear">
<meta>
<api>ogscript.addRemoteTrigger('KEY', function (event) {
ogscript.debug('KEY DETECTED: ' + event.getState());
});</api>
</meta>
</abs>
To create a new shortcut, go to the Keyboard Shortcuts preferences age and select "New"
Select "GPI Trigger" hit next.
I recommend putting the same trigger ID on all of your commands and using the "state" property to indicate which key was pressed. I also recommend setting the execution level to "Active Editor" so that the key is only sent to the "Active" tab instead of to all tabs.
------------------------------
James Peltzer
Ross Video
------------------------------
Original Message:
Sent: 10-30-2024 17:47
From: Jerry Burianyk
Subject: Capture PC Numeric Keyboard Entry
Hi,
I'm sorry if this is handled simply somewhere as a function within Dashboard but I haven't found it yet (I'd like to use something other than a text entry widget).
Is it possible to capture a numeric 'digits' entry from the pc keyboard/keypad limited to any one or two digits and then store those digits to a variable. Also, it would be desirable to be able to do this at any time while the dashboard app has focus.
TIA
------------------------------
JerryB
------------------------------