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
-
- Valued Contributor
- Posts: 767
- http://meble-kuchenne.info.pl
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 151 times
- Been thanked: 172 times
-
- Valued Contributor
- Posts: 1002
- Joined: Wed Dec 09, 2020 9:37 pm
- Has thanked: 106 times
- Been thanked: 519 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
-
- Matrix Staff
- Posts: 1276
- Joined: Sat Dec 05, 2020 10:32 am
- Has thanked: 170 times
- Been thanked: 285 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 46 times
-
- button press app.fcsx
- (15.05 KiB) Downloaded 47 times
-
- Valued Contributor
- Posts: 767
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 151 times
- Been thanked: 172 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