; this is a template file processed by tools/fmt-bindings to generate either 
; a gtk accelmap file or a LaTeX key binding cheat sheet.
;
; it is the reference for any bindings or cheatsheets
;
;
; FORMAT:
; $text -> defines cheatsheet title as "text", which may contain LaTeX markup
;
; %group text -> defines a binding group called "group" which will have the title "text" on the cheatsheet. 
;                may be followed by zero or more lines of descriptive text, which may contain LaTeX markup
;
; @group|action|binding|description -> defines an action+binding with description, as a member of a binding group
;                                       if group starts with '-' it will not be printed in the cheatsheet.
;                                       if group starts with '+' it will be printed in the cheatsheet no matter what
;                                       if the group is a mouse binding group, action should contain a ':', and
;                                            have the binding before the colon, and the target area after it

;; Title
$ARDOUR Shortcuts \linebreak Mnemonic US-Keypad

;; GROUP DEFINITIONS

%trans Transport \& Recording Control

%sess Session \& File Handling

%edit Basic Editing

%vis Changing What's Visible

%wvis Window Visibility

%eep Editing with Edit Point
Most edit functions operate on a single "Edit Point". The edit point can be any of: playhead (default), the mouse or an active marker. The choice of Edit Point is by default linked to the Zoom Focus.

%aep Aligning with the Edit Point
Align operations move regions so that their start/end/sync point is at the edit point. "Relative" operations
just align the first region and moves other selected regions to maintain relative positioning.

%epp Edit Point Playback

%movp Moving the Playhead
A left click in the rulers positions the playhead unless Ardour is recording. You can use {\tt KP$\_$n} to move the 
playhead to the n-th marker.

%rop Region Operations

%edit Edit Range
There are only a few functions that refer to an "Edit Range". The current edit range is defined using combinations of the possible edit points: Playhead, Marker or Mouse.\par
\begin{tabular}{lll}
{\bf Edit Point} & {\bf Active Mark?} & {\bf Edit Range} \\
Playhead & no & from Playhead to Mouse \\
Playhead & yes & from Playhead to Active Marker \\
 & & \\
Mouse & no & from Mouse to Playhead \\
Mouse & yes & from Mouse to Active Marker \\
 & & \\
Marker & no & {\it No edit range defined} \\
Marker & yes & from Active Marker to Mouse
\end{tabular}

%select Selecting

%ranges Defining Loop, Punch Range and Tempo Changes

%markers Markers \& Locations
The "move" commands all move the active marker(s). Jump to the first 9 markers using
the keypad digits 1-9 (requires numlock).

%mmode Mouse Modes

%mouse Mouse Usage
Right click on most objects and controls displays a context menu
Shift+Right click deletes most objects. 
OS X users without a 3 button mouse can use {\tt Option+Ctrl+Left} to simulate "Middle" for some purposes.
Use F1 to step through mouse modes.

%mobject Mouse Object Mode
This mode provides many different operations on both regions and control points, partially depending on where you click/drag with the mouse. The "body" of a region is the area where the waveform is displayed.

%mzoom Mouse Zoom Mode
%mops Mouse Ops on Solo/Mute/Rec-enable
%mopsolo Mouse Ops on Solo Buttons only
%mopsfader Mouse Ops on Faders \& Plugin Controls

%midi MIDI specific commands

;; END GROUP DEFINITIONS

;; punctuation

@vis|Editor/temporal-zoom-in|equal|zoom in
@vis|Editor/temporal-zoom-out|minus|zoom out
@eep|Editor/edit-cursor-to-previous-region-sync|apostrophe|EP to previous region sync
@eep|Editor/edit-cursor-to-next-region-sync|semicolon|EP to next region sync
@eep|Editor/cycle-edit-point|grave|next EP w/o marker
@eep|Editor/cycle-edit-point-with-marker|<@PRIMARY@>asciicircum|next EP w/marker

@aep|Editor/move-range-start-to-previous-region-boundary|less|move range start to previous region boundary
@aep|Editor/move-range-start-to-next-region-boundary|<@PRIMARY@>less|move range start to next region boundary
@aep|Editor/move-range-end-to-previous-region-boundary|<@PRIMARY@>greater|move range end to next previous boundary
@aep|Editor/move-range-end-to-next-region-boundary|greater|move range end to next region boundary

@trans|Transport/ToggleRoll|space|toggle roll
@epp|Editor/play-edit-range|<@SECONDARY@>space|play edit range
@epp|Editor/play-from-edit-point-and-return|<@LEVEL4@>space|play from EP \& return
@trans|Transport/ToggleRollMaybe|<@PRIMARY@><@SECONDARY@>space|stop but do not leave loop/range play
@trans|Transport/ToggleRollForgetCapture|<@PRIMARY@>space|stop and destroy
@trans|Transport/record-roll|<@TERTIARY@>space|start recording

@rop|Region/set-fade-in-length|slash|set fade in length
@rop|Region/toggle-region-fade-out|<@PRIMARY@>slash|toggle fade in active
@rop|Region/set-fade-out-length|backslash|set fade out length
@rop|Region/toggle-region-fade-out|<@PRIMARY@>backslash|toggle fade out active

@eep|Region/trim-from-start|<@TERTIARY@>braceleft|trim region start to edit point
@eep|Region/trim-to-end|<@TERTIARY@>braceright|trim region end to edit point

@eep|Editor/trim-to-previous-region|<@PRIMARY@>j|trim region to end of previous region
@eep|Editor/trim-to-next-region|<@PRIMARY@>k|trim region to start of next region

@ranges|Editor/set-loop-from-edit-range|bracketright|set loop range from edit range
@ranges|Region/set-loop-from-region|<@SECONDARY@>bracketright|set loop range from region(s)

@ranges|Editor/set-punch-from-edit-range|bracketleft|set punch range from edit range
@ranges|Region/set-punch-from-region|<@SECONDARY@>bracketleft|set punch range from region(s)

@rop|Region/boost-region-gain|asciicircum|increase region gain
@rop|Region/cut-region-gain|ampersand|reduce region gain

;; letters
;; TOP ROW

@sess|Common/Quit|<@PRIMARY@>q|quit
@rop|Region/quantize-region|q|quantize MIDI notes in selected region(s)

;; note that ctrl-w is special and consumed by the keyboard snooper

@mmode|MouseMode/toggle-internal-edit|e|toggle MIDI note editing
@select|Editor/select-all-before-edit-cursor|<@PRIMARY@>e|select all before EP
@rop|Region/export-region|<@PRIMARY@><@LEVEL4@>e|export selected region(s)
@sess|Main/ExportSession|<@LEVEL4@>e|export session
@select|Editor/select-all-after-edit-cursor|<@PRIMARY@><@TERTIARY@>e|select all after EP
@vis|Editor/show-editor-mixer|<@TERTIARY@>e|toggle editor window mixer
@wvis|Common/goto-editor|<@WINDOW@>e|toggle editor window
@mmode|MouseMode/set-mouse-mode-range|r|range mode
@edit|Editor/redo|<@PRIMARY@>r|redo
@rop|Region/reverse-region|<@SECONDARY@>r|reverse
@trans|Transport/Record|<@TERTIARY@>r|engage record
@mmode|MouseMode/set-mouse-mode-timefx|t|timefx mode
@rop|Region/pitch-shift-region|<@SECONDARY@>t|transpose
@eep|Editor/insert-time|<@PRIMARY@>t|insert time
@mmode|MouseMode/set-mouse-mode-object-range|y|link object/range tools
@select|Editor/select-all-between-cursors|<@PRIMARY@>u|all enclosed by edit range
@select|Editor/select-all-within-cursors|u|all present in edit range
@eep|Region/insert-region-from-region-list|i|insert from region list
@select|Editor/invert-selection|<@TERTIARY@>i|invert selection
@sess|Editor/addExistingAudioFiles|<@PRIMARY@>i|import audio files
@mmode|MouseMode/set-mouse-mode-object|o|object mode
@sess|Main/Open|<@PRIMARY@>o|open an existing session
@sess|Main/Recent|<@PRIMARY@><@TERTIARY@>o|open a recent session
@wvis|Common/ToggleOptionsEditor|<@WINDOW@>o|toggle preferences dialog
@rop|Region/naturalize-region|<@SECONDARY@>o|move to original position
@trans|Editor/set-playhead|p|set playhead position
@select|Editor/select-all-before-playhead|<@PRIMARY@>p|all before playhead
@wvis|Common/ToggleRCOptionsEditor|<@PRIMARY@><@TERTIARY@>p|toggle preferences dialog
@wvis|Common/toggle-audio-connection-manager|<@WINDOW@>p|toggle global audio patchbay
@wvis|Common/toggle-midi-connection-manager|<@WINDOW@><@TERTIARY@>p|toggle global midi patchbay
@midi|MIDI/panic|<@PRIMARY@><@SECONDARY@>p|MIDI panic (stop all notes etc)
@select|Editor/select-all-after-playhead|<@TERTIARY@><@PRIMARY@>p|all after playhead

;; MIDDLE ROW

@aep|Region/align-regions-sync-relative|a|align sync points (relative)
@select|Editor/select-all|<@PRIMARY@>a|select everything
@aep|Region/align-regions-end|<@SECONDARY@>a|align end(s)
@aep|Region/align-regions-sync|<@TERTIARY@>a|align sync points
@aep|Region/align-regions-start|<@PRIMARY@><@LEVEL4@>a|align start(s)
@aep|Region/align-regions-start-relative|<@LEVEL4@>a|align start(s) relative
@rop|Region/split-region|s|split
@sess|Common/Save|<@PRIMARY@>s|save session
@sess|Main/Snapshot|<@PRIMARY@><@TERTIARY@>s|snapshot session
@trans|Editor/track-solo-toggle|<@SECONDARY@>s|toggle track solo status
@mmode|MouseMode/set-mouse-mode-draw|d|note-draw mode
@rop|Region/duplicate-region|<@SECONDARY@>d|duplicate region (once)
@rop|Region/multi-duplicate-region|<@TERTIARY@>d|duplicate region (multi)
@select|Editor/select-all-in-punch-range|<@PRIMARY@>d|select all in punch range
@vis|Editor/fit-tracks|f|fit tracks vertically
@trans|Editor/toggle-follow-playhead|<@PRIMARY@>f|toggle playhead tracking
@wvis|Region/show-rhythm-ferret|<@WINDOW@>f|show rhythm ferret window 
@mmode|MouseMode/set-mouse-mode-gain|g|region gain mode
@epp|Region/play-selected-regions|h|play selected region(s)
@eep|Region/trim-front|j|trim front
@eep|Region/trim-back|k|trim back
@wvis|Common/ToggleKeyEditor|<@WINDOW@>k|toggle key bindings editor
@trans|Transport/Loop|l|loop play (the loop range)
@select|Editor/select-all-in-loop-range|<@PRIMARY@>l|select all in loop range
@wvis|Common/ToggleLocations|<@WINDOW@>l| toggle locations dialog

;; HOME ROW

@mmode|MouseMode/set-mouse-mode-zoom|z|zoom mode
@edit|Editor/undo|<@PRIMARY@>z|undo
@vis|Editor/zoom-to-region|<@PRIMARY@><@SECONDARY@>z|zoom (x) to selected region(s)
@vis|Editor/zoom-to-region-both-axes|<@SECONDARY@>z|zoom (x+y) to selected region
@vis|Editor/toggle-zoom|<@TERTIARY@>z|toggle last 2 zoom states
@edit|Editor/editor-cut|<@PRIMARY@>x|cut
@edit|Editor/editor-copy|<@PRIMARY@>c|copy
@wvis|Common/ToggleColorManager|<@WINDOW@>c|toggle color manager
@rop|Region/set-region-sync-position|v|set region sync point
@edit|Editor/editor-paste|<@PRIMARY@>v|paste
@-group|Editor/brush-at-mouse|<@PRIMARY@>b|some text
@trans|Editor/track-record-enable-toggle|<@SECONDARY@>b|toggle track rec-enable 
@wvis|Common/ToggleBigClock|<@WINDOW@>b|toggle big clock
@rop|Region/normalize-region|n|normalize
@sess|Main/AddTrackBus|<@PRIMARY@><@TERTIARY@>n|add track(s) or bus(ses)
@sess|Main/New|<@PRIMARY@>n|open a new session
@rop|Region/toggle-region-mute|<@PRIMARY@>m|mute/unmute
@wvis|Common/toggle-mixer-on-top|<@WINDOW@>m|rotate editor \& mixer window

;; arrow keys, navigation etc.

@vis|Editor/step-tracks-up|uparrow|scroll up (step)
@trans|Transport/TransitionToRoll|<@TERTIARY@>uparrow|transition to roll
@select|Editor/select-prev-route|<@SECONDARY@>uparrow|select previous track/bus
@vis|Editor/move-selected-tracks-up|<@PRIMARY@>uparrow|move selected tracks up

@vis|Editor/step-tracks-down|downarrow|scroll down (step)
@trans|Transport/TransitionToReverse|<@TERTIARY@>downarrow|transition to reverse
@select|Editor/select-next-route|<@SECONDARY@>downarrow|select next track/bus
@vis|Editor/move-selected-tracks-down|<@PRIMARY@>downarrow|move selected tracks down

@movp|Editor/playhead-to-previous-region-boundary|leftarrow|to previous region edge
@movp|Editor/playhead-to-previous-region-boundary-noselection|<@LEVEL4@>leftarrow|to previous edge \linebreak[4] (ignore selection)
@movp|Editor/playhead-to-previous-region-sync|<@PRIMARY@><@SECONDARY@>leftarrow|to previous region sync
@movp|Editor/tab-to-transient-backwards|<@PRIMARY@>leftarrow|to previous transient
@movp|Editor/nudge-playhead-backward|<@SECONDARY@>leftarrow|nudge backward
@movp|Editor/playhead-backward-to-grid|<@TERTIARY@><@LEVEL4@>leftarrow|to previous grid point
@trans|Transport/Rewind|<@TERTIARY@>leftarrow|rewind
@markers|Editor/selected-marker-to-previous-region-boundary|<@PRIMARY@><@TERTIARY@>leftarrow|move to prev. region edge

@movp|Editor/playhead-to-next-region-boundary|rightarrow|to next region edge
@movp|Editor/playhead-to-next-region-boundary-noselection|<@LEVEL4@>rightarrow|to next region edge \linebreak[4] (ignore selection)
@movp|Editor/playhead-to-next-region-sync|<@PRIMARY@><@SECONDARY@>rightarrow|to next region sync
@movp|Editor/tab-to-transient-forwards|<@PRIMARY@>rightarrow|to next transient
@movp|Editor/nudge-playhead-forward|<@SECONDARY@>rightarrow|nudge forwards
@movp|Editor/playhead-forward-to-grid|<@TERTIARY@><@LEVEL4@>rightarrow|to next grid point
@trans|Transport/Forward|<@TERTIARY@>rightarrow|fast forward
@markers|Editor/selected-marker-to-next-region-boundary|<@PRIMARY@><@TERTIARY@>rightarrow|move to next region edge

@vis|Editor/scroll-tracks-down|Page_Down|scroll down (page)
@vis|Editor/scroll-tracks-up|Page_Up|scroll up (page)
@movp|Transport/GotoStart|Home|to start marker
@movp|Transport/GotoEnd|End|to end marker
@edit|Editor/editor-delete|Delete|delete

@movp|Editor/playhead-to-edit|Return|to edit point
@eep|Editor/edit-to-playhead|<@SECONDARY@>Return|move EP to playhead
@trans|Editor/remove-last-capture|<@PRIMARY@>Delete|destroy last recording

@-group|Editor/escape|Escape|break drag or deselect all

;; keypad

@rop|Region/nudge-backward|KP_Subtract|nudge backward
@-group|Editor/nudge-next-backward|<@PRIMARY@>KP_Subtract|some text

@movp|Editor/jump-forward-to-mark|<@PRIMARY@>KP_Right|to next mark
@movp|Editor/jump-backward-to-mark|<@PRIMARY@>KP_Left|to previous mark

@rop|Region/nudge-forward|KP_Add|nudge forward
@-group|Editor/nudge-next-forward|<@PRIMARY@>KP_Add|some text

@-group|Editor/start-range|<@PRIMARY@>KP_Down|some text

@-group|Editor/finish-range|<@PRIMARY@>KP_Up|some text
@-group|Editor/finish-add-range|<@TERTIARY@><@PRIMARY@>KP_Up|some text

@markers|Editor/add-location-from-playhead|KP_Enter|add mark at playhead
@wvis|Transport/focus-on-clock|KP_Divide|focus on main clock

@movp|Transport/GotoZero|KP_0|to zero
@-group|Editor/goto-mark-1|KP_1|some text
@-group|Editor/goto-mark-2|KP_2|some text
@-group|Editor/goto-mark-3|KP_3|some text
@-group|Editor/goto-mark-4|KP_4|some text
@-group|Editor/goto-mark-5|KP_5|some text
@-group|Editor/goto-mark-6|KP_6|some text
@-group|Editor/goto-mark-7|KP_7|some text
@-group|Editor/goto-mark-8|KP_8|some text
@-group|Editor/goto-mark-9|KP_9|some text

;; F-N keys

@-group|Editor/edit-cursor-to-range-start|F1|some text
@-group|Editor/edit-cursor-to-range-end|F2|some text
@-group|Editor/crop|F3|some text
@-group|Editor/editor-separate|F4|some text
@-group|Editor/pitch-shift-region|F5|some text
@select|Editor/select-range-between-cursors|F6|convert edit range to range
@wvis|Common/ToggleMaximalEditor|F11|toggle fullscreen editor window

@-group|Editor/save-visual-state-1|<@PRIMARY@>F1|some text
@-group|Editor/save-visual-state-2|<@PRIMARY@>F2|some text
@-group|Editor/save-visual-state-3|<@PRIMARY@>F3|some text
@-group|Editor/save-visual-state-4|<@PRIMARY@>F4|some text
@-group|Editor/save-visual-state-5|<@PRIMARY@>F5|some text
@-group|Editor/save-visual-state-6|<@PRIMARY@>F6|some text
@-group|Editor/save-visual-state-7|<@PRIMARY@>F7|some text
@-group|Editor/save-visual-state-8|<@PRIMARY@>F8|some text
@-group|Editor/save-visual-state-9|<@PRIMARY@>F9|some text
@-group|Editor/save-visual-state-10|<@PRIMARY@>F10|some text
@-group|Editor/save-visual-state-11|<@PRIMARY@>F11|some text
@-group|Editor/save-visual-state-12|<@PRIMARY@>F12|some text

@-group|Editor/goto-visual-state-1|F1|some text
@-group|Editor/goto-visual-state-2|F2|some text
@-group|Editor/goto-visual-state-3|F3|some text
@-group|Editor/goto-visual-state-4|F4|some text
@-group|Editor/goto-visual-state-5|F5|some text
@-group|Editor/goto-visual-state-6|F6|some text
@-group|Editor/goto-visual-state-7|F7|some text
@-group|Editor/goto-visual-state-8|F8|some text
@-group|Editor/goto-visual-state-9|F9|some text
@-group|Editor/goto-visual-state-10|F10|some text
@-group|Editor/goto-visual-state-11|F11|some text
@-group|Editor/goto-visual-state-12|F12|some text


;; numbers

@eep|Editor/cycle-snap-mode|2|cycle to next grid snap mode
@eep|Editor/prev-snap-choice|3|use next grid unit
@eep|Editor/prev-snap-choice-music-only|<@PRIMARY@>3|use previous grid unit
@eep|Editor/next-snap-choice|4|use next grid unit
@eep|Editor/next-snap-choice-music-only|<@PRIMARY@>4|use next musical grid unit
@trans|Transport/ToggleAutoPlay|5|toggle auto play
@trans|Transport/ToggleAutoReturn|6|toggle auto return
@trans|Transport/ToggleClick|7|toggle click (metronome)
@ranges|Editor/set-tempo-from-region|9|set tempo (1 bar) from region(s)
@ranges|Editor/set-tempo-from-edit-range|0|set tempo (1 bar) from edit range

; mouse stuff

@+mobject|foo|left-click:on body|select
@+mobject|foo|<@TERTIARY@>left-click:on body|extend selection
@+mobject|foo|<@PRIMARY@>left-click:on body|add/remove selection
@+mobject|foo|left-drag:on body|move region(s)
@+mobject|foo|<@PRIMARY@>left-drag:on body|copy+move region(s)
@+mobject|foo|<@PRIMARY@>middle-drag:on body|fixed time copy+move
@+mobject|foo|middle-drag:on body|fixed time move
@+mobject|foo|<@SECONDARY@><@TERTIARY@>midde:on body|lower region
@+mobject|foo|<@TERTIARY@>middle:on body|raise region
@+mobject|foo|<@PRIMARY@>left-drag:in trim bar|slip audio in region
@+mobject|foo|left-click:in trim bar|set region start
@+mobject|foo|middle:in trim bar|set region end
@+mobject|foo|left-drag:near ends of trim bar|adjust region edges
@+mobject|foo|left-click:in auto track|add control point
@+mobject|foo|left-drag:on point|move control point
@+mobject|foo|middle-drag:on point|fixed time adjust
@+mobject|foo|<@PRIMARY@>left-drag:on point|move point+later points
@+mobject|foo|<@PRIMARY@>middle-drag:on point|fixed time move
@+mobject|foo|left-drag:on line|move line segment
@+mobject|foo|<@PRIMARY@><@SECONDARY@>left-drag:on regions|rubber-band select
@+mobject|foo|left-drag:in auto track|rubber-band select\linebreak control points
@+mobject|foo|left-drag:empty space|rubber-band select

; mouse zoom
@+mzoom|foo|<@PRIMARY@>middle|zoom to session
@+mzoom|foo|middle-click|zoom out
@+mzoom|foo|left-click|zoom in
@+mzoom|foo|left+drag |define the new visible area

; mouse solo etc.
@+mops|foo|<@PRIMARY@>middle-click|learn MIDI control
@+mops|foo|<@PRIMARY@><@TERTIARY@>left-click|apply to all tracks/busses
@+mops|foo|<@PRIMARY@>left-click|apply to group
@+mops|foo|middle-click|momentary switch
@+mops|foo|left-click|apply to track or active group

; mouse solo

@+mopsolo|foo|<@PRIMARY@><@SECONDARY@>left-click|exclusive solo
@+mopsolo|foo|<@TERTIARY@>left-click|temporary latched solo

; mouse fader etc.

@+mopsfader|foo|<@PRIMARY@>middle-click|learn MIDI control
@+mopsfader|foo|<@TERTIARY@>left-click|reset to default
@+mopsfader|foo|<@PRIMARY@><@SECONDARY@>left-drag|finest-drag control
@+mopsfader|foo|<@PRIMARY@>left-drag|fine-drag control
@+mopsfader|foo|left-drag|adjust
