Skip to content

Commit

Permalink
fix(Mapping): Make "Shift + Left" and "Shift + Right" set the left an…
Browse files Browse the repository at this point in the history
…d right locator, respectively
  • Loading branch information
bjoluc committed Mar 22, 2023
1 parent b4ce7ce commit 8b08a7c
Showing 1 changed file with 22 additions and 3 deletions.
25 changes: 22 additions & 3 deletions src/mapping/control.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,14 @@ function setShiftableButtonsLedValues(
) {
const buttons = controlSectionElements.buttons;

for (const button of [buttons.edit, buttons.modify[0], buttons.modify[2], buttons.utility[2]]) {
for (const button of [
buttons.edit,
buttons.modify[0],
buttons.modify[2],
buttons.utility[2],
buttons.transport[0],
buttons.transport[1],
]) {
button.mLedValue.setProcessValue(context, value);
}
}
Expand Down Expand Up @@ -188,8 +195,20 @@ export function bindControlButtons(
// Transport buttons
const mTransport = host.mTransport;

page.makeCommandBinding(buttons.transport[0].mSurfaceValue, "Transport", "To Left Locator");
page.makeCommandBinding(buttons.transport[1].mSurfaceValue, "Transport", "To Right Locator");
page
.makeCommandBinding(buttons.transport[0].mSurfaceValue, "Transport", "To Left Locator")
.setSubPage(regularSubPage);
page
.makeCommandBinding(buttons.transport[0].mSurfaceValue, "Transport", "Set Left Locator")
.setSubPage(shiftSubPage);

page
.makeCommandBinding(buttons.transport[1].mSurfaceValue, "Transport", "To Right Locator")
.setSubPage(regularSubPage);
page
.makeCommandBinding(buttons.transport[1].mSurfaceValue, "Transport", "Set Right Locator")
.setSubPage(shiftSubPage);

page
.makeValueBinding(buttons.transport[2].mSurfaceValue, mTransport.mValue.mCycleActive)
.setTypeToggle();
Expand Down

0 comments on commit 8b08a7c

Please sign in to comment.