Hi Ben
On my program I have 2 switch.
To press this switch with the mouse or mousepad is working nice.
is there a way to control this switch with the computer keyboard?
As a sample: if i press the key R or F11 it will record and if I press the key s or F12 it will stop the recording
regards
Stefan
App Developper: switch on keyboard
-
stefan.erni
- Valued Contributor
- Posts: 1167
- http://meble-kuchenne.info.pl
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 221 times
- Been thanked: 239 times
-
mnfisher
- Valued Contributor
- Posts: 1865
- Joined: Wed Dec 09, 2020 9:37 pm
- Has thanked: 154 times
- Been thanked: 883 times
Re: App Developper: switch on keyboard
It's easy to do using the keyboard monitor component.
There is a simple example in the wiki at https://www.flowcode.co.uk/wiki/index.p ... _Control_)
Martin
There is a simple example in the wiki at https://www.flowcode.co.uk/wiki/index.p ... _Control_)
Martin
-
Steve-Matrix
- Matrix Staff
- Posts: 1769
- Joined: Sat Dec 05, 2020 10:32 am
- Has thanked: 258 times
- Been thanked: 413 times
Re: App Developper: switch on keyboard
I have another solution that does not need an additional component or code. Use "Key mapping" which is available in the "Edit" menu. Attached is an example, which also uses the new "Macro called" feature of switches.
- Attachments
-
- button press app.mscada
- (4.32 KiB) Downloaded 385 times
-
- button press app.fcsx
- (15.05 KiB) Downloaded 409 times
-
stefan.erni
- Valued Contributor
- Posts: 1167
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 221 times
- Been thanked: 239 times
Re: App Developper: switch on keyboard
Hi Martin, Hi Steve
I have tried the example from the wiki but it does not work properly.
up/dwn moves the position of the button. I did not manage to correct this, but then FC10 froze.
I have understood and modified Steve's example and it works fine.
Thanks to both
regards
Stefan
I have tried the example from the wiki but it does not work properly.
up/dwn moves the position of the button. I did not manage to correct this, but then FC10 froze.
I have understood and modified Steve's example and it works fine.
Thanks to both
regards
Stefan