Editing Key Mappings

From Flowcode Help
Jump to navigationJump to search
Gen Edit Menu Key Mappings.png

Key mappings allow you to use the keyboard keys 0 to 9 or A to Z to control components attached to the microcontroller. For example if you have a bank of 8 push switches connected to the microcontroller, you could map the keys 1 to 8 to mimic the pushing and releasing of these switches when the flowchart is simulated.


To set up or change key mappings, select the Key Mappings option from the Edit menu (Edit > Key Mappings...). For each key you can either enter an expression

Eg. Count = Count + 1

Or enter the name of a user macro and the keyboard key within brackets and the Parameter value will be passed - See the Flowcode example below.


Gen Component Key Mappings 01.png


Key

The key-combination that you wish to map. This may be any alphabetic or numeric key, optionally combined with Alt, Shift or Control.


Action

This can be any calculation line for your flowchart or a user macro call.


Example

Here is a simple example showing key mappings in simulation.

Keyboard keys pressed:

1 = Toggle Switch1

2 = Toggle Switch2

3 = Toggle Switch3

I = Increment Count variable

D = Decrement Count variable

FC6 Icon.png Key Mapping Example