Difference between revisions of "Component: Keyboard (Digital Control )"
Line 17: | Line 17: | ||
==Component Source Code== | ==Component Source Code== | ||
− | Please click here to download the component source project: [https://www.flowcode.co.uk/ | + | Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_Keyboard.fcfx FC_Comp_Source_Keyboard.fcfx] |
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_Keyboard.fcfx FC_Comp_Source_Keyboard.fcfx] | Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_Keyboard.fcfx FC_Comp_Source_Keyboard.fcfx] | ||
==Detailed description== | ==Detailed description== | ||
+ | |||
+ | |||
Line 46: | Line 48: | ||
==Examples== | ==Examples== | ||
+ | |||
+ | |||
Line 77: | Line 81: | ||
==Macro reference== | ==Macro reference== | ||
+ | |||
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetKeyPress''' | ||
+ | |- | ||
+ | | colspan="2" | Checks a single virtual key code to test if the button is pressed or not. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | KeyCode | ||
+ | |- | ||
+ | | colspan="2" | Virtual Key Code Number | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CheckMultipleKeys''' | ||
+ | |- | ||
+ | | colspan="2" | Checks all of the keys enabled in the component properties. If any keys are pressed then their scan index number is returned. If no keys are pressed then 0 is returned. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ==Property reference== | ||
+ | |||
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties''' | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | ||
+ | | width="90%" | Number of Scan Keys | ||
+ | |- | ||
+ | | colspan="2" | Sets the number of keys to scan through when calling the CheckMultipleKeys function. | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | ||
+ | | width="90%" | Scan Key 1 | ||
+ | |- | ||
+ | | colspan="2" | Virtual Keycode assigned to the scan index | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | ||
+ | | width="90%" | Scan Key 2 | ||
+ | |- | ||
+ | | colspan="2" | Virtual Keycode assigned to the scan index | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | ||
+ | | width="90%" | Scan Key 3 | ||
+ | |- | ||
+ | | colspan="2" | Virtual Keycode assigned to the scan index | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | ||
+ | | width="90%" | Scan Key 4 | ||
+ | |- | ||
+ | | colspan="2" | Virtual Keycode assigned to the scan index | ||
+ | |}==Macro reference== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
Revision as of 09:57, 27 January 2023
Author | Matrix TSL |
Version | 1.0 |
Category | Digital Control |
Contents
Keyboard component
Component to allow you to get direct input from the keyboard. Specific keys can be polled to test if they are pressed and provide interaction with the runtime panel. A full list of virtual key codes can be found here: https://docs.microsoft.com/en-gb/windows/win32/inputdev/virtual-key-codes?redirectedfrom=MSDN
Component Source Code
Please click here to download the component source project: FC_Comp_Source_Keyboard.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_Keyboard.fcfx
Detailed description
No detailed description exists yet for this component
Examples
Here is an example of how to use the keyboard component to map key pressed to various functions on the panel.
You can define keys that can be changed by the user by right clicking the keys in the keyboard component property and exposing them to the top level.
Once the properties have been exposed you can double click the top level property and rename to give a meaningful name in your application.
The user can then easily select which key they would like to assign to each function.
Macro reference
![]() |
GetKeyPress |
Checks a single virtual key code to test if the button is pressed or not. | |
![]() |
KeyCode |
Virtual Key Code Number | |
![]() |
Return |
Property reference
==Macro reference==
![]() |
GetKeyPress |
Checks a single virtual key code to test if the button is pressed or not. | |
![]() |
KeyCode |
Virtual Key Code Number | |
![]() |
Return |
Property reference
==Macro reference==
![]() |
GetKeyPress |
Checks a single virtual key code to test if the button is pressed or not. | |
![]() |
KeyCode |
Virtual Key Code Number | |
![]() |
Return |
Property reference
==Macro reference==
![]() |
GetKeyPress |
Checks a single virtual key code to test if the button is pressed or not. | |
![]() |
KeyCode |
Virtual Key Code Number | |
![]() |
Return |