MT Pro allows Keystrokes as incoming trigger, though currently only the real "keys" are used, i.e. the Shift key is treated equally to, say, the A key. It's a good idea to have checkboxes for Shift,Ctrl, and Alt as convenience there.
For now, you can help yourself with the Rules and global variables: we define the global variable ga as a flag for Shift, gb for Ctrl and gc for Alt. If the respective variable is 1, the key is pressed, otherwise it's 0. The following Translators are needed to set this up:
Code: Select all
Translator 1: Shift down: set flag ga
Options: stop=true
Incoming: Key down: Shift
Rules:
ga=1
Outgoing: (none)
Translator 2: Shift up: reset flag ga
Options: stop=true
Incoming: Key up: Shift
Rules:
ga=0
Outgoing: (none)
Translator 3: Ctrl down: set flag gb
Options: stop=true
Incoming: Key down: Ctrl
Rules:
gb=1
Outgoing: (none)
Translator 4: Ctrl up: reset flag gb
Options: stop=true
Incoming: Key up: Ctrl
Rules:
gb=0
Outgoing: (none)
Translator 5: Alt down: set flag gc
Options: stop=true
Incoming: Key down: Alt
Rules:
gc=1
Outgoing: (none)
Translator 6: Alt up: reset flag gc
Options: stop=true
Incoming: Key up: Alt
Rules:
gc=0
Outgoing: (none)
Now, for example, we can define Ctrl-A as this:
Code: Select all
Translator 7: Ctrl-A to MIDI
Options: stop=true
Incoming: Keystroke: A
Rules:
if gb==0 then exit rules, skip Outgoing Action
Outgoing: MIDI 99 30 7F 30 00
Combinations: this MIDI message will only be executed if you press Shift+Ctrl+Alt+B:
Code: Select all
Translator 8: Shift-Ctrl-Alt-B to MIDI
Options: stop=true
Incoming: Keystroke: B
Rules:
if ga==0 then exit rules, skip Outgoing Action
if gb==0 then exit rules, skip Outgoing Action
if gc==0 then exit rules, skip Outgoing Action
Outgoing: MIDI 99 31 7F 31 00
Note: since the current keystroke mechanism in MT Pro uses the hardware keys, your definitions are independent of the keyboard layout. This means that your definitions define the position of the key on the keyboard, not which letter they represent. E.g. a German keyboard layout has the Z key below the number key 6, while an English keyboard has a Y key there. MT will treat this key as the same, no matter which keyboard layout is selected. A future version of MT Pro will have a way to define typed characters (versus the key).
Florian