I found this code from the docs
On AftertouchEvent (c : AftertouchMessage)
// Callback code here
End
Unfortunately it wouldn’t compile
Drum Key Trigger (Script Entity: Scriptlet) - owned by rackspace: GLOBAL RACKSPACE - - Syntax Error in “Main”: Line 11, Col 4: Unexpected or unrecognized token: ‘AftertouchEvent’. Mismatched input ‘AftertouchEvent’ expecting {Timeline, Activate, Deactivate, Variation, TimerTick, GeneratorRunning, GeneratorEndCycle, TempoChanged, DeviceStatusChanged, Rackspace, Song, Songpart, SystemEvent, BeatChanged, NoteOnEvent, NoteOffEvent, NoteEvent, ControlChangeEvent, PitchBendEvent, AftertouchEvent, ProgramChangeEvent, PolytouchEvent, MidiEvent, SysexEvent, ScriptletEnabled, Keystrokes, ParameterValueChanged, WidgetValueChanged, OSCMessageReceived}
Turns out there is a typo, it should be
On AfterTouchEvent (c : AfterTouchMessage)
// Callback code here
End
The case is wrong in the error message as well as the docs. It’s working now but wanted to flag since I imagine this will continue to confuse script users.