Credits: Deckmatics
Deckmatics
Deckmatics vector SVG generated on this page.
Creating a Custom SHIFT Layer in Your Mapping
A SHIFT layer multiplies controller functions without adding buttons. Two ways to build it, their pitfalls and the notification that prevents value jumps.
A SHIFT layer is the most cost-effective way to get more from a controller you already own. No purchase, opening the equipment or firmware installation: the same button does two different things depending on a state.
It is also one of the worst-explained ideas in forums, because discussions almost always start with a particular interface rather than the concept. Here the concept comes first, then its implementation in each program.
The Underlying Idea: A State That Changes Meaning
Forget buttons for a moment and consider this:
A layer is a state. While that state is active, the same controls mean something else.
That is all. Everything else implements that sentence:
- A SHIFT button switches that state.
- Software modifiers are variables storing that state.
- Your controls’ functions decide what to do according to the state.
The most important consequence: a layer adds meanings, not physical controls. A controller with 16 buttons and two layers provides 32 functions. That explains its popularity: it is the only way to multiply without buying.
A Warning Before Starting
Many controllers already send different messages while SHIFT is held. If yours does, you may not need to program anything: simply declare in XML that this message activates the other function.
In other words, first check whether your equipment already does this. Mixxx documentation presents it in that order—different signals with SHIFT may mean no JavaScript is necessary—saving work for people who start programming layers they do not need.
Enter scripting only when the equipment does not distinguish messages, or when you want custom behaviour the hardware does not send.
Modifiers in Traktor
Traktor has its own name for layers: modifiers. These control types define conditions for other assignments.
Their rules, according to official documentation:
- There are eight modifiers, each taking different values according to the hardware element to which it is mapped.
- An assignment may require conditions such as
M1 = 0andM2 = 1. It executes only if all are met. - This lets one control have several assignments, only one active at a time.
- Check the current value in Modifier State.
That panel matters more than it seems: when a layered mapping “does not work,” the commonest cause is a modifier in an unexpected state. Looking there is the first debugging step.
The documentation’s own example is precisely a SHIFT layer: a modifier button alternating between two values, with two assignments for the same Play/Pause button so it operates Deck A or Deck B.
Advice Worth Taking Seriously
Traktor warns plainly that modifier mappings become complex and difficult to diagnose quickly, and recommends avoiding them if the problem can be solved without them.
This is more than a manual’s warning. A mapping with five chained modifiers is impossible to debug live. If you can solve it without layers, do so.
Two Ways to Implement a SHIFT Layer
When hardware does not provide it ready-made, there are two methods. Both work; the choice depends on scale.
Method 1: A State Variable
Declare a state variable and activate it with SHIFT. Each function checks that variable before deciding what to do.
This is direct and works very well for simple cases. Its problem appears as it grows: checking the variable in twenty functions becomes burdensome to maintain, and with more than two modes it becomes hard to follow mentally what each does. That is why the documentation describes this approach as one that “may work well for simple cases.”
Method 2: Reassign Functions
Instead of checking a state in every function, define each layer’s functions separately and let SHIFT swap the active set.
Each function stays clean: it contains no state checks because the layer already determines which runs. It also scales much better, organising code by layers instead of scattering conditions everywhere.
In return, it needs structure. Group each layer’s functions coherently; that is design work to complete before writing the first line.
| Method | How It Works | When It Fits | Drawback |
|---|---|---|---|
| State variable | A boolean variable activated by SHIFT; each function checks it before acting. | Two layers and few controls. | Awkward when checked in many functions. |
| Reassign functions | Store each layer's functions in groups; SHIFT swaps the active group. | Three or more layers, or many shared controls. | More structure: code needs careful organisation. |
| Different hardware messages | The controller itself sends different messages while SHIFT is held. | When the equipment already does this. | None: XML alone may solve it. |
Both work. Choose according to how many layers you want and how many controls share them.
Choosing Between Them
A sufficient practical rule:
- One layer, two states, few shared controls → state variable.
- Three or more layers, or many changing controls → reassign functions.
- Hardware already sends different messages → neither: solve it in XML.
The Detail That Breaks Layers: Value Jumps
This trap ruins more layered mappings than anything else and connects directly to the preceding guide.
Physical controls with end stops, such as knobs and faders, have a position. Their parameter has another. Changing layer means the physical control operates a different parameter, whose position may be anywhere.
The classic result: press SHIFT, touch the knob and the value jumps straight to the physical position.
Preventing this requires two things; the second is always forgotten:
- Enable soft takeover for controls with end stops shared across layers.
- Tell the software which physical control you are manipulating whenever its function changes. Without that notification, returning to the previous layer causes another jump, because the software thinks the control still occupies the other layer’s position.
That second point distinguishes a working layer from one that jumps in both directions.
Good Design Practices
What separates a layered mapping you use from one you abandon:
- Design on paper first. Decide what every control does in every layer before touching code.
- Group by function, not arbitrary layers. A layer mixing loops, EQ and navigation is hard to remember.
- Keep the base layer complete. The layer without SHIFT should cover normal DJing; SHIFT is for exceptions.
- Do not layer constantly used functions. Something used every two minutes cannot live behind SHIFT.
- Document your own mapping. A comment per assignment saves you six months later.
- Test the full cycle. Activate a layer, move a control, return to the previous layer: that is where jumps appear.
When NOT to Use Layers
This section is rarely written, yet is the most useful:
- When hardware already sends different messages and declarations suffice.
- When the function is critical and constantly used. Jumps and mental load are not worth it.
- When software already offers the function in its interface and you rarely use it. One click is fine for occasional tasks.
- When you cannot test before a gig. An untested layer makes you hesitate live.
Traktor’s warning reaches the same point from another angle: complexity has a cost, paid in the worst possible booth.
Common Mistakes
- Programming layers without checking whether the controller already sends them.
- Forgetting the function-change notification, causing a jump on returning to the base layer.
- Not enabling soft takeover on shared controls.
- Designing layers you cannot remember without thinking.
- Consulting Modifier State only after failure. Watch it while designing: it shows whether the logic is what you thought.
- Chaining too many modifiers. That is where a mapping stops being debuggable.
- Building the layer the night before a gig.
Next Step
You now know how to build layers without value jumps. The next part of a professional-feeling mapping lies not in its controls but in what feeds information back: LEDs. A mapping with state feedback works in the dark; one without it forces you to watch the screen. That is the next guide.
Frequently asked questions
What is a SHIFT layer in a mapping?
A state changes the meaning of other controls. While active, the same buttons and knobs do different things, multiplying functions without adding hardware.
My controller already has SHIFT. Do I need to map it?
Many controllers already send different messages while SHIFT is held; in that case XML may suffice. Scripting is needed only when equipment does not do it itself or you want custom behaviour.
What are Traktor modifiers?
Conditions whose activation you decide. There are eight, each with its own values, and an assignment can require specific values before execution. This is the mechanism behind SHIFT.
Why does the value jump when I change layer?
A physical control with end stops has one position and the new layer's parameter another. Notify software which control you manipulate when changing its function, or the value jumps when you return.
What is the best way to implement layers?
It depends on their number. Two layers usually need only a state variable. From three onwards, or if a control behaves differently in several layers, reassigning functions by layer is much easier to manage.
How many layers should I build?
As many as you can remember without thinking. A layer you must mentally look up in the booth will go unused while competing for a control needed elsewhere.
Continue learning
Start here if these concepts are new to you
Sources
- Mixxx Wiki — MIDI Scripting (Controller Scripting)
Main source for both methods. Many controllers send different MIDI signals while SHIFT is pressed, possibly requiring only XML rather than JavaScript; otherwise JavaScript is needed. Documents a boolean state variable checked by other functions and input functions reassigned by layer and stored in objects. Warns that checking the first approach in many functions becomes awkward and more than two modes become hard to follow. Also warns that changing an absolute control's function with soft takeover active requires identifying which physical control is being manipulated to avoid jumps on return.
- How to Use the Controller Manager in Traktor
Documents modifiers as the program's layer mechanism: control types defining conditions for other assignments, with values determined by the mapped hardware element and current status visible in Modifier State. Assignments execute only when every condition is met, allowing several assignments on one control with only one active. Explicitly mentions SHIFT and gives a step-by-step modifier button alternating Deck A and Deck B. Warns that modifier mappings become complex and hard to diagnose, recommending avoiding them if the problem can be solved without them.
Last technical review: 29/09/2026. Please report any errors so they can be corrected.