Skip to content

Commit

Permalink
Traktor S2 Mk1: Adjust browse knob behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
leifhelm committed Jul 4, 2023
1 parent ffe07c8 commit e462e6e
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions res/controllers/Traktor-Kontrol-S2-MK1-hid-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ class DeckClass {
this.controller.setOutput(this.channel, "!shift",
shiftPressed ? ButtonBrightnessOn : ButtonBrightnessOff,
!this.parent.batchingLEDUpdate);
engine.setValue("[Library]", "focused_widget", shiftPressed ? 2: 3);
}
syncButton(field) {
const now = Date.now();
Expand Down Expand Up @@ -1313,17 +1312,20 @@ class TraktorS2MK1Class {
const delta = encoderDirection(field.value, this.previousBrowse);
this.previousBrowse = field.value;

engine.setValue("[Library]", "MoveVertical", delta);
if (this.shiftPressed()) {
engine.setValue("[Library]", "ScrollVertical", delta);
} else {
engine.setValue("[Library]", "MoveVertical", delta);
}
}

browseEncoderPress(field) {
if (this.shiftPressed()) {
engine.setValue("[Library]", "GoToItem", field.value);
if(this.shiftPressed()) {
engine.setValue("[Library]", "MoveFocusBackward", field.value);
} else {
if (field.value > 0) {
script.toggleControl("[Master]", "maximize_library");
}
engine.setValue("[Library]", "GoToItem", field.value);
}

}
crossfader(field) {
setFaderParameter("[Master]", "crossfader", field.value, this.calibration.crossfader);
Expand Down

0 comments on commit e462e6e

Please sign in to comment.