Difference between revisions of "Editing Key Mappings"

From Flowcode Help
Jump to navigationJump to search
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<sidebar>Sidebar: What Is a Component?</sidebar>
+
<sidebar>Sidebar: Flowcode Help Overview:Components</sidebar>
 
[[File:Gen_Edit_Menu_Key_Mappings.png|right]]
 
[[File:Gen_Edit_Menu_Key_Mappings.png|right]]
Key mappings allow you to use the keyboard keys 0 to 9 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.
+
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.
  
  
Line 9: Line 9:
 
[[File:Gen_Component_Key_Mappings_01.png|left]]
 
[[File:Gen_Component_Key_Mappings_01.png|left]]
  
''Work in progress - needs re-writing.
+
'''Key'''
  
'''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'''
  
The key on the number keypad that you wish to map.
+
This is the action that will be performed. This may be a pre-set action by the component (this depends on the component), a 'mouse-click' action on an object on the panel or a custom action which can be any calculation line for your flowchart.
  
  
'''Component'''
+
Using Key mapping with elements that toggle will toggle the element on/off.
  
The attached component that you wish to map the key to.
+
Using key mapping with press to make elements will send the element into its high, active, state when the key is pressed.  
  
 +
Releasing the key will return the element to its low, inactive state.
  
'''Element'''
 
  
The individual element (Switch etc.) that you wish to bind the key to.
+
''Setting up a click on a button''
 +
Some components do not have key-mappings associated with them, but you can still simulate a click on any component. On the [[System Panel]] or [[Dashboard Panel]] right click on the component you would ordinarily click in simulation and select the ''Key Mappings'' menu. This will allow you to set up a key to simulate the click.
  
  
Elements are numbered sequentially in the same order as on the component.
+
'''Example'''
  
Components with scrollbars use elements 1 and 2 to increase/decrease the scrollbar value.
+
Here is a simple example showing key mappings working with the MIAC component in simulation. Pressing the 'a' button on the keyboard or clicking one of the MIAC's keypad buttons will toggle the state of transistor output 1 in the simulation.
  
Using Key mapping with elements that toggle will toggle the element on/off.
+
{{Fcfile|MIAC_KeyMapping.fcfx|Key Mapping Example}}
  
Using key mapping with press to make elements will send the element into its high, active, state when the key is pressed.
 
  
Releasing the key will return the element to its low, inactive state.
+
'''Worked Example'''
  
Using key mapping with scrollbars will increase/decrease the scrollbar value.''
+
[http://www.matrixtsl.com/mmforums/viewtopic.php?f=26&p=73365 A worked example of key mapping].

Latest revision as of 09:02, 5 April 2016

<sidebar>Sidebar: Flowcode Help Overview:Components</sidebar>

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 numeric key, you can select a component and for each component, you can select the individual element that you wish to control with that key. For example if you wish to use the '0' key to control the 5th switch in a component named 'Switches1' then select 'Switches1' in the Component list for Key 0 and then select 5 in the Element list for Key 0.


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 is the action that will be performed. This may be a pre-set action by the component (this depends on the component), a 'mouse-click' action on an object on the panel or a custom action which can be any calculation line for your flowchart.


Using Key mapping with elements that toggle will toggle the element on/off.

Using key mapping with press to make elements will send the element into its high, active, state when the key is pressed.

Releasing the key will return the element to its low, inactive state.


Setting up a click on a button Some components do not have key-mappings associated with them, but you can still simulate a click on any component. On the System Panel or Dashboard Panel right click on the component you would ordinarily click in simulation and select the Key Mappings menu. This will allow you to set up a key to simulate the click.


Example

Here is a simple example showing key mappings working with the MIAC component in simulation. Pressing the 'a' button on the keyboard or clicking one of the MIAC's keypad buttons will toggle the state of transistor output 1 in the simulation.

FC6 Icon.png Key Mapping Example


Worked Example

A worked example of key mapping.