Skip to content

Commit

Permalink
feat: Improve default keybindings
Browse files Browse the repository at this point in the history
  • Loading branch information
gwatcha committed May 27, 2020
2 parents bb41484 + cb9b454 commit eddf246
Show file tree
Hide file tree
Showing 7 changed files with 110 additions and 124 deletions.
8 changes: 4 additions & 4 deletions definitions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ action type section.

timeline_operator = {
["c"] = "Change",
["t"] = "LoopAndPlay",
["t"] = "PlayAndLoop",
["d"] = "CutItems",
["y"] = "CopyItems",
},
Expand All @@ -43,7 +43,7 @@ Actions may also be put into folders. To create a folder, follow this format:
["<SPC>"] = "ShowActionList",
["h"] = "ShowReaperKeysHelp",
["r"] = {"+regions", {
["d"] = "DeleteRegion",
["d"] = "RemoveRegion",
}},
}}, -- be sure to close the folder

Expand Down Expand Up @@ -446,7 +446,7 @@ the actions used to trigger it.

So in this case, if one types `tl`

Reaper keys will find the entries "LoopAndPlay" and "NextBeat" in it's search in the definitions.
Reaper keys will find the entries "PlayAndLoop" and "NextBeat" in it's search in the definitions.

-- in definitoins/global.lua the
timeline_operator = {
Expand All @@ -459,7 +459,7 @@ Reaper keys will find the entries "LoopAndPlay" and "NextBeat" in it's search in
And find the value of the action in actions.lua

-- in definitions/actions.lua
LoopAndPlay = {"SetLoopSelectionToTimeSelection", "LoopStart", "TransportPlay", setTimeSelection=true},
PlayAndLoop = {"SetLoopSelectionToTimeSelection", "LoopStart", "TransportPlay", setTimeSelection=true},
NextBeat = 40841,

and execute the function with
Expand Down
84 changes: 44 additions & 40 deletions definitions/actions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ return {
ActivateNextMidiItem = {40833, midiCommand=true},
ActivatePrevMidiItem = {40834, midiCommand=true},
AddTrackVirtualInstrument = 40701,
AllTrackItems = {"SaveItemSelectionAll", "SelectItemsOnTrack", "SelectedItems", "RestoreItemSelection"},
AllTrackItems = {"SaveItemSelection", "SelectItemsOnTrack", "SelectedItems", "RestoreItemSelection"},
AllTracks = 40296,
ArmAllEnvelopes = "_S&M_ARMALLENVS",
ArmSelectedTracks = "_XENAKIOS_SELTRAX_RECARMED",
Expand Down Expand Up @@ -44,7 +44,7 @@ return {
CopyTrack = 40210,
CropToActiveTake = 40131,
CutEnvelopePoints = 40325,
CutItems = {"SelectItems", "CutSelectedItems"},
CutItems = {"SaveItemSelection", "SelectItemsAndSplit", "CutSelectedItems", "RestoreItemSelection"},
CutNotes = {"SelectNotes", "CutSelectedEvents"},
CutSelectedEvents = {40734, midiCommand=true},
CutSelectedItems = 40699,
Expand All @@ -59,7 +59,7 @@ return {
DeleteEnvelope = 40333,
DeleteItem = 40006,
DeleteNote = {40002, midiCommand=true},
DeleteRegion = 40615,
DeleteTimeline = 40201,
EnterTrackAbove = {"InsertTrackAbove", "ColorTrackWithTrackBelow", "RenameTrack"},
EnterTrackBelow = {"InsertTrackBelow", "ColorTrackWithTrackAbove", "RenameTrack"},
EventSelectionEnd = {40639, midiCommand=true},
Expand Down Expand Up @@ -91,29 +91,28 @@ return {
FxToggleShow8 = "_S&M_TOGLFLOATFX8",
FxToggleShow = "_S&M_WNTGL5",
GlueItemIgnoringTimeSelection = 40362,
GlueItems = {"SelectItems", "GlueSelectedItemsInTimeSelection"},
GlueItems = {"SaveItemSelection", "SelectItems", "GlueSelectedItemsInTimeSelection", "RestoreItemSelection"},
GlueSelectedItemsInTimeSelection = 41588,
GoToEnd = {40037, midiCommand=true},
GoToLastItemAndRecord = {"LastItemEnd", "RecordNormal"},
GoToStart = {40036, midiCommand=true},
GridSetTo1by10 = 42002,
GridSetTo1by12 = 40777,
GridSetTo1by128 = 41047,
GridSetTo1by1 = 40781,
GridSetTo1by16 = 40776,
GridSetTo1by18 = 42001,
GridSetTo1by2 = 40780,
GridSetTo1by24 = 41213,
GridSetTo1by32 = 40775,
GridSetTo1by3 = 42000,
GridSetTo1by4 = 40779,
GridSetTo1by48 = 41212,
GridSetTo1by5 = 42005,
GridSetTo1by6 = 41214,
GridSetTo1by64 = 40774,
GridSetTo1by7 = 42004,
GridSetTo1by8 = 40778,
GridSetTo1by9 = 42003,
GridSetTo1by10 = 42002,
GridSetTo1by12 = 40777,
GridSetTo1by16 = 40776,
GridSetTo1by18 = 42001,
GridSetTo1by24 = 41213,
GridSetTo1by32 = 40775,
GridSetTo1by48 = 41212,
GridSetTo1by64 = 40774,
GridSetTo1by128 = 41047,
GridSetTo2by1 = 41210,
GridSetTo2by3 = 42007,
GridSetTo3by1 = 42006,
Expand All @@ -129,6 +128,7 @@ return {
InnerFolder = {"FolderParent", "SelectOnlyFoldersChildren"},
InsertAutomationItem = 42082,
InsertDefaultSizeNote = {40051, midiCommand=true},
InsertMarker = "_S&M_INS_MARKER_EDIT",
InsertMidiItem = 40214,
InsertNote = {"InsertDefaultSizeNote", "FitNotes"},
InsertOrExtendMidiItem = 42069,
Expand All @@ -150,9 +150,8 @@ return {
Left40Pix = {"Left10Pix", repetitions=4},
LeftByGrid = {40047, midiCommand=true},
LeftByMeasure = {40683, midiCommand=true},
LeftGridDivision = 40646,
LeftPix = 40104,
LoopAndPlay = {"SetLoopSelectionToTimeSelection", "SaveEditCursorPosition", "LoopStart", "TransportPlay", "RestoreEditCursorPosition", setTimeSelection=true},
LoopAndRecordInput= {"SetTrackRecInput", "SetLoopSelectionToTimeSelection", "RecordTimeSelectionNormal", setTimeSelection=true},
LoopEnd = 40633,
LoopSelection = "SetTimeSelectionToLoopSelection",
LoopStart = 40632,
Expand All @@ -169,12 +168,11 @@ return {
MidiZoomLoopSelection = {40726, midiCommand=true},
MidiZoomOutHoriz = {1011, midiCommand=true},
MidiZoomOutVert = {40112, midiCommand=true},
MidiZoomTimeSelection = {"SaveLoopSelectionSlot5", "SetLoopSelectionToTimeSelection", "MidiZoomLoopSelection", "RestoreLoopSelectionSlot5"},
MidiZoomTimeSelection = {"SaveLoopSelection", "SetLoopSelectionToTimeSelection", "MidiZoomLoopSelection", "RestoreLoopSelection"},
MinimizeTracks = "_SWS_MINTRACKS",
MixerShowHideChildrenOfSelectedTrack = 41665,
Mouse = 40514,
MouseAndSnap = 40513,
LeftGridDivision = 40646,
RightGridDivision = 40647,
MoveEditCursorToNextTransientInSelectedItems = 40375,
MoveEditCursorToPrevTransientInSelectedItems = 40376,
MoveNoteDownOctave= {40180, midiCommand=true},
Expand Down Expand Up @@ -211,7 +209,7 @@ return {
NextNoteSamePitchEnd = {"SelectNextNoteSamePitch", "EventSelectionEnd"},
NextNoteSamePitchStart = {"SelectNextNoteSamePitch", "EventSelectionStart"},
NextNoteStart = {"SelectNextNote", "EventSelectionStart"},
NextRegion = "_SWS_SELNEXTREG",
NextRegion = {"SetLoopRegionToNextRegion", "SetTimeSelectionToLoopSelection"},
NextTab = 40861,
NextTake = 40125,
NextTrack = 40285,
Expand All @@ -232,6 +230,7 @@ return {
PitchUp = {40049, midiCommand=true},
PitchUp7 = {"PitchUp", repetitions=7},
PitchUpOctave = {40187, midiCommand=true},
PlayAndLoop = {"SetLoopSelectionToTimeSelection", "SaveEditCursorPosition", "LoopStart", "TransportPlay", "RestoreEditCursorPosition", setTimeSelection=true},
PlayFromMouse = "_BR_PLAY_MOUSECURSOR",
PlayMacro = "PlayMacro",
PlayPosition = 40434,
Expand All @@ -252,25 +251,24 @@ return {
PrevNoteSamePitchEnd = {"SelectPrevNoteSamePitch", "EventSelectionEnd"},
PrevNoteSamePitchStart = {"SelectPrevNoteSamePitch", "EventSelectionStart"},
PrevNoteStart = {"SelectPrevNote", "EventSelectionStart"},
PrevRegion = "_SWS_SELPREVREG",
PrevRegion = {"SetLoopRegionToPrevRegion", "SetTimeSelectionToLoopSelection"},
SetLoopRegionToPrevRegion = "_SWS_SELPREVREG",
PrevTab = 40862,
PrevTake = 40126,
PrevTrack = 40286,
PrevTransientInItem = {"SaveItemSelection", "SelectItemsUnderEditCursor", "MoveEditCursorToPrevTransientInSelectedItems", "RestoreItemSelection"},
ProjectEnd = util.moveToProjectEnd,
ProjectStart = util.moveToProjectStart,
Project = util.selectInnerProject,
ProjectTimeline = util.selectInnerProjectTimeline,
Quantize = {40009, midiCommand=true},
RecordByAdding = {"SetTrackRecMidiTouchReplace", "RecordTimeSelectionNormal", setTimeSelection=true},
RecordByChanging = {"SetTrackRecMidiReplace", "RecordTimeSelectionConditional", setTimeSelection=true},
RecordConditional = {"TransportStop", "ToggleRecordConditional"},
RecordMacro = "RecordMacro",
RecordNormal = {"TransportStop", "ToggleRecordNormal"},
Record = {"RecordTimeSelectionNormal", setTimeSelection=true},
RecordTimeSelectionConditional = {"SaveEditCursorPosition", "TimeSelectionStart", "RecordConditional", "RestoreEditCursorPosition"},
RecordTimeSelectionNormal = {"SaveEditCursorPosition", "TimeSelectionStart", "RecordNormal", "RestoreEditCursorPosition"},
Record = {"SaveEditCursorPosition", "TimeSelectionStart", "RecordConditional", "RestoreEditCursorPosition", setTimeSelection=true},
Redo = 40030,
RegionSelectItems = 40717,
RemoveMarker = 40613,
RemoveRegion = 40615,
RemoveTimeSelection = 40635,
RemoveTrack = 40005,
RenameTrack = 40696,
Expand All @@ -283,26 +281,26 @@ return {
ResetAllControlSurfaceDevices = 42348,
ResetAllMidiDevices = 41175,
ResetControlDevices = {"ResetAllMidiDevices", "ResetAllControlSurfaceDevices"},
Reset = {"Stop", "SetModeNormal", "SetRecordModeNormal"},
Reset = {"Stop", "SetModeNormal", "UnselectAll"},
ResetTrackToNormal = {"UnarmSelectedTracks", "UnarmAllEnvelopes", "SetAutomationModeTrimRead"},
RestoreEditCursorPosition = "_BR_RESTORE_CURSOR_POS_SLOT_16",
RestoreItemSelection = "_SWS_RESTALLSELITEMS1",
RestoreLastItemSelection = "_SWS_RESTLASTSEL",
RestoreLoopSelectionSlot5 = "_SWS_RESTLOOP5",
RestoreTimeSelectionSlot5 = "_SWS_RESTTIME5",
RestoreLoopSelection = "_SWS_RESTLOOP5",
RestoreTimeSelection = "_SWS_RESTTIME5",
RestoreTrackSelection = "_SWS_TOGSAVESEL",
Right10Pix = "_XENAKIOS_MOVECUR10PIX_RIGHT",
Right40Pix = {"Right10Pix", repetitions=4},
RightByGrid = {40048, midiCommand=true},
RightByMeasure = {40682, midiCommand=true},
RightGridDivision = 40647,
RightPix = 40105,
RightPixel = 40105,
SaveEditCursorPosition = "_BR_SAVE_CURSOR_POS_SLOT_16",
SaveItemSelectionAll = "_SWS_SAVEALLSELITEMS1",
SaveItemSelection = "_SWS_SAVEALLSELITEMS1",
SaveLoopSelectionSlot5 = "_SWS_SAVELOOP5",
SaveLoopSelection = "_SWS_SAVELOOP5",
SaveProject = 40026,
SaveTimeSelectionSlot5 = "_SWS_SAVETIME5",
SaveTimeSelection = "_SWS_SAVETIME5",
SaveTrackSelection = "_SWS_SAVESEL",
ScrollToPlayPosition = 40150,
ScrollToSelectedTracks = 40913,
Expand All @@ -317,14 +315,16 @@ return {
SelectFolderParent = "_SWS_SELPARENTS",
SelectFoldersChildren = "_SWS_SELCHILDREN2",
Selection = "NoOp",
SelectItemsAndSplit = {"OnlySelectItemsCrossingTimeAndTrackSelection", "SplitAtTimeSelection"},
SelectItemsCrossingTimeAndTrackSelection = 40718,
SelectItemsInGroups = 40034,
SelectItems = {"OnlySelectItemsCrossingTimeAndTrackSelection", "SplitAtTimeSelection"},
SelectItemsOnTrack = 40421,
SelectItems = "SelectItemsCrossingTimeAndTrackSelection",
SelectItemsUnderEditCursor = "_XENAKIOS_SELITEMSUNDEDCURSELTX",
SelectLastOfSelectedTracks = "_XENAKIOS_SELLASTOFSELTRAX",
SelectNextNote = {40413, midiCommand=true},
SelectNextNoteSamePitch = {40428, midiCommand=true},
SelectNoteClosestToEditCursor = {40426, midiCommand=true},
SelectNotes = "SelectNotesStartingInTimeSelection",
SelectNotesStartingInTimeSelection = {40877, midiCommand=true},
SelectOnlyFoldersChildren = "_SWS_SELCHILDREN",
Expand Down Expand Up @@ -356,6 +356,7 @@ return {
SetItemFadeBoundaries = {"SelectItemsCrossingTimeAndTrackSelection", "SetSelectedItemFadeBoundaries"},
SetLoopEnd = 40223,
SetLoopRegionToNextRegion = "_SWS_SELNEXTREG",
SetLoopRegionToPrevRegion = "_SWS_SELPREVREG",
SetLoopSelectionToTimeSelection = 40622,
SetLoopStart = 40222,
SetModeNormal = lib.setModeNormal,
Expand All @@ -374,6 +375,8 @@ return {
SetTrackRecMidiReplace = 40504,
SetTrackRecMidiTouchReplace = 40852,
SetTrackRecMonitorOnly = 40498,
ShiftTimeSelectionLeft = 40037,
ShiftTimeSelectionRight = 40038,
ShowActionList = 40605,
ShowEnvelopeModulationLastTouchedFx = 41143,
ShowReaperKeysHelp = "ShowReaperKeysHelp",
Expand Down Expand Up @@ -417,12 +420,9 @@ return {
TogglePanEnvelope = 40407,
TogglePlaybackAutoScroll = 40036,
ToggleRecord = 1013,
ToggleRecordByAdding = {"SetTrackRecMidiTouchReplace", "ToggleRecord"},
ToggleRecordByChanging = {"SetTrackRecMidiReplace", "ToggleRecordConditional"},
ToggleRecordConditional = "_SWS_AWRECORDCOND",
ToggleRecordingAutoScroll = 40262,
ToggleRecordingPreroll = 41819,
ToggleRecordNormal = {"SetRecordModeNormal", "ToggleRecord"},
ToggleShowAllEnvelope = 41151,
ToggleShowAllEnvelopeGlobal = 41152,
ToggleShowSelectedEnvelope = 40884,
Expand All @@ -437,7 +437,7 @@ return {
TrackWithNumber = {"SelectTrackByNumber", "ScrollToSelectedTracks"},
TransportPause = 1008,
TransportPlay = 1007,
TransportRecordOrStop = "_SWS_RECTOGGLE",
RecordOrStop = "_SWS_RECTOGGLE",
TransportStop = 1016,
TrimSelectedItemLeftEdgeToEditCursor = 41305,
TrimSelectedItemRightEdgeToEditCursor = 41311,
Expand All @@ -451,7 +451,7 @@ return {
UnfreezeTrack = 41644,
UnmuteAllTracks = 40339,
UnselectAllEvents = {40214, midiCommand=true},
UnselectAll = {"UnselectTracks", "UnselectItems"},
UnselectAll = {"UnselectTracks", "UnselectItems", "UnselectEnvelopePoints", "UnselectAllEvents"},
UnselectEnvelopePoints = 40331,
UnselectItems = 40289,
UnselectTracks = 40297,
Expand All @@ -460,11 +460,15 @@ return {
VerticalScrollStart = "_XENAKIOS_TVPAGEHOME",
ViewFxChainInputCurrentTrack = 40844,
ViewFxChainMaster = 40846,
ZoomAllItems = {"SaveItemSelection", "SelectAllItems", "ZoomItemSelection", "RestoreItemSelection"},
ZoomAllTracks = {"SaveTrackSelection", "SelectAllTracks", "ZoomTrackSelection", "RestoreTrackSelection"},
ZoomInHoriz = 1012,
ZoomInVert = 40111,
ZoomItemSelection = "_SWS_HZOOMITEMS",
ZoomOutHoriz = 1011,
ZoomOutVert = 40112,
ZoomProject = 40295,
ZoomProjectTimeline = 40295,
ZoomProject = {"ZoomAllTracks", "ZoomAllItems"},
ZoomRedo = "_SWS_REDOZOOM",
ZoomTimeAndTrackSelection = {"ZoomTrackSelection", "ZoomTimeSelection"},
ZoomTimeSelection = 40031,
Expand Down
2 changes: 0 additions & 2 deletions definitions/config.lua

This file was deleted.

Loading

0 comments on commit eddf246

Please sign in to comment.