Keyboard shortcuts to increase / decrease selected slider

I am currently using a midi controller with rotary encoders to edit in darktable, where each knob is assigned to a slider, e.g. exposure, shadows, highlights etc.

I was wondering if it’s possible to use just one knob to do adjustments, and the previously clicked slider in the GUI would be increased/decreased, or a keyboard shortcut could be used to select the slider to control. I’m looking at getting a new keyboard and I’m considering getting one with a single rotary encoder which I would use for this purpose. This would remove the need to bring the midi controller with me on the go and would simplify my workflow. I’ve been looking through the shortcut settings and cant work out if this would be possible or not?

@dterrahe is the expert (and the author) for the shortcut module.

You can assign a keyboard shortcut and a mouse movement to control a slider. I’m thinking the problem would be how the operating system encodes the rotary input. If it’s encoded in a way that darktable can recognize it, then it would probably be assignable.

See darktable 4.0 user manual - shortcuts

In theory, if the MIDI driver of the device allows for it, you could assign a midi channel to mouse scrolling.
However, there is a simpler solution:
I have a Korg NanoKontrol which - as you can see here - has three buttons, a fader and a rotary control per channel.
I have assigned Shift, Ctrl and Alt to the buttons on some channels, which then allows me to use the same fader for different controls (mostly of the same module per channel) - i.e. black point, white point and contrast in filmic.
So yes, it is possible.
You could even set up a scondary binding with the same shortcut + mouse scroll to seamlessy switch between both.

It depends. The input system is not really meant to be stateful (i.e. one shortcut giving focus and then the next one working on the focused widget). So with the current implementation, you’d have to hold a shortcut key (assigned to a widget) and then, while holding, turn the “midi” knob to make adjustments. You can already do this with the mousewheel. So the question would be what the keyboard you have in mind sends when turning its encoder. It could be an emulated mouse scroll. Dt supports vertical and horizontal scroll separately, so you could map key+mouse scroll and key+encoder turn to different things.

Some of the few thing that do affect just the focused widget are arrow keys. So if the keyboard encoder can be configured to send left/right key pressed when turned up/down, they would get picked up by the last slider you focused by (ctrl+)clicking on it . There currently is no shortcut effect for sliders that just gives focus to them.

1 Like

The shortcut extending feature seems to be what I’m after. thanks for the help!