Using full Key Support
- mwalker
Using full Key Support
I selected the 'Key Hold' and 'Key Up' tabs and expected to be able to switch views and fire events from these key actions. Nothing happened. Only 'Key Press' seems to work. Do I need to do further configuration to make this happen?
- jpurdum
- Enovation Controls Development
- Posts: 153
- Joined: Mon Jun 21, 2010 11:19 am
Re: Using full Key Support
Yes, you can do this, but you must first enable the Key Up and Key Hold via an action to the Key app. I will ask one of our developers to reply with additional information - hopefully with a demo config.
- dbuchanan
Re: Using full Key Support
'Key Up' and 'Key Hold' must be enabled before they will work.
Enabling 'Key Up' and 'Key Hold'
You will need to create a 'State Machine' in the 'Programming' tab in the Configuration Tool so you can enable the desired feature with either:
A simple way to demonstrate this is to create a new one state State Machine in the Programming tab. Name it something like 'SM_Enable_Key_Up'.
Add a single State to the State Machine. Name it something like 'ST_Enable_Key_Up'.
In the 'On exiting state execute these actions' section click on the '+' key. In the dialog that pops up, click on the 'Keys' application, then click on the desired Action - either 'Enable Key Up' or 'Enable Key Hold'. Then click the 'OK' button to finish adding the exit action. If you want to enable both features at the same time, go ahead and add a second exit action to do this.
Then add a single 'State Transition' to the State you just created. Click on 'State Transition', then click and hold on the State you just created. Drag the mouse pointer around outside the State box then back into the State box and release the mouse button. You should now have a 'loop around' transition named something like: 'ST_Enable_Key_Up to ST_Enable_Key_Up'. Leave the 'Generate Event for this transition' box checked.
The attached image file shows a picture of what this would look like: Now to enable the feature, you need to 'trigger' the event that you just created:
'ST_Enable_Key_Up to ST_Enable_Key_Up'
A simple way to demonstrate that is to go back to the 'Page Designer' screen and assign one of the 'Key Press' selections to fire the event you just created. (Note: 'Key Press' unlike 'Key Hold' and 'Key Up' is always enabled.) As an example, if you click on the upper left key and select 'Fire an Event', you will find the event you created in the list. Select it and click on 'OK'. Now all you have to do to active the desired feature is press that button.
Using 'Key Up' and 'Key Hold' on the Page Designer screen
On the 'Page Designer' screen in the lower left there is a 'Key ...' icon. When you click on it it cycles between 'Key Press', 'Key Hold', and 'Key Up'. By clicking and cycling through these selections you can assign any or all of these events to any given key.
'Key Up' events will fire as soon as you release a key.
For a 'Key Hold' event to fire, you must press and hold the key for at least 5 seconds, then the event will fire when you release the key.
The attached demonstration configuration file demonstrates this.
Enabling 'Key Up' and 'Key Hold'
You will need to create a 'State Machine' in the 'Programming' tab in the Configuration Tool so you can enable the desired feature with either:
Code: Select all
Keys->Enable Key Up((Empty))
or
Keys->Enable Key Hold((Empty))
Add a single State to the State Machine. Name it something like 'ST_Enable_Key_Up'.
In the 'On exiting state execute these actions' section click on the '+' key. In the dialog that pops up, click on the 'Keys' application, then click on the desired Action - either 'Enable Key Up' or 'Enable Key Hold'. Then click the 'OK' button to finish adding the exit action. If you want to enable both features at the same time, go ahead and add a second exit action to do this.
Then add a single 'State Transition' to the State you just created. Click on 'State Transition', then click and hold on the State you just created. Drag the mouse pointer around outside the State box then back into the State box and release the mouse button. You should now have a 'loop around' transition named something like: 'ST_Enable_Key_Up to ST_Enable_Key_Up'. Leave the 'Generate Event for this transition' box checked.
The attached image file shows a picture of what this would look like: Now to enable the feature, you need to 'trigger' the event that you just created:
'ST_Enable_Key_Up to ST_Enable_Key_Up'
A simple way to demonstrate that is to go back to the 'Page Designer' screen and assign one of the 'Key Press' selections to fire the event you just created. (Note: 'Key Press' unlike 'Key Hold' and 'Key Up' is always enabled.) As an example, if you click on the upper left key and select 'Fire an Event', you will find the event you created in the list. Select it and click on 'OK'. Now all you have to do to active the desired feature is press that button.
Using 'Key Up' and 'Key Hold' on the Page Designer screen
On the 'Page Designer' screen in the lower left there is a 'Key ...' icon. When you click on it it cycles between 'Key Press', 'Key Hold', and 'Key Up'. By clicking and cycling through these selections you can assign any or all of these events to any given key.
'Key Up' events will fire as soon as you release a key.
For a 'Key Hold' event to fire, you must press and hold the key for at least 5 seconds, then the event will fire when you release the key.
The attached demonstration configuration file demonstrates this.