This may be one of the most reported issues with CUIA. Select is not what you are looking for. You can assign the button to zynswitch 3 then it will act exactly like the 4th encoder, including bold and long press. (3 because it is zero-based.)
When UI Action Release is set to Zynswitch 3, in UI log I see : ERROR:zynthian_gui.cuia_zynswitch: zynswitch requires 2 parameters: index, delta, not {params}
Seems like I’m missing some parameters here and I’m not sure where to lookup the correct values
UPD: I figured! The params for short switch should be Zynswitch3,S
And it works
According to some deep forum digging:
ZYNSWITCH index, action_type
index => integer number, starting from 0
action_type =>
P => Push
R => Release
S => Short
B => Bold
L => Long
So I guess for bold press I should put Zynswitch3,B and for long Zynswitch3,L
I don’t think this all was mentioned before in the forums in the context of S1-4 action buttons at least. Phew!
Well done for figuring that out. Many may have failed our little initiation test. I sometimes forget the exact syntax because we have different configuration for hardware (wiring) binding, keybinding and MIDI binding. I feel that keybinding is better implemented and want to consolidate all of these to use similar methods. (I would say that though - I implemented keybinding! )
Didn’t want to create another post, but having zynswitch troubles again, this time with macropad keybindings.
It seems like both default and custom keybindigs do not work with zynswitches.
Example : Enter - > zynswitch 3 : nothing happens
The only working command that sort of works is, for example : Enter -> zynswitch 3,S
But it has an issue, I think it sends double impulse, when I press Enter on ZunthPad it starts playing a clip but immediately arms it to stop after single loop
For each keypress I always see 2 events firing immediately one after another, for zynswitch 3,S:
Sep 15 00:24:38 zynthian startx[1448]: DEBUG:zynthian_gui_keybinding.get_key_action: Get keybinding function name for keycode: 46, modifier: 0
Sep 15 00:24:38 zynthian startx[1448]: DEBUG:zynthian_gui.zynswitch_short: Short Switch 3
Sep 15 00:24:38 zynthian startx[1448]: DEBUG:zynthian_gui_keybinding.get_key_action: Get keybinding function name for keycode: 46, modifier: 0
Sep 15 00:24:38 zynthian startx[1448]: DEBUG:zynthian_gui.zynswitch_short: Short Switch 3
for zynswitch 3,P:
Sep 15 00:27:25 zynthian startx[1448]: DEBUG:zynthian_gui_keybinding.get_key_action: Get keybinding function name for keycode: 46, modifier: 0
Sep 15 00:27:25 zynthian startx[1448]: DEBUG:zynthian_gui_keybinding.get_key_action: Get keybinding function name for keycode: 46, modifier: 0
So for P the keybinding is working but it doesn’t call any zynswitch actions, for S it calls it twice in a row
I tried with regular keyboards as well, all showing the same behavior. Investigated further and I see that one event is sent on key press, and second on key release.
A more specific events like arrow keys, screen_audio_mixer etc. - works as expected when assigned to any key.
For example UP key:
Sep 15 11:25:39 zynthian startx[1426]: DEBUG:zynthian_gui_keybinding.get_key_action: Get keybinding function name for keycode: 111, modifier: 0
Sep 15 11:25:39 zynthian startx[1426]: DEBUG:zynthian_gui.callable_ui_action: CUIA 'arrow_up' => None
Sep 15 11:25:43 zynthian startx[1426]: DEBUG:zynthian_gui_keybinding.get_key_action: Get keybinding function name for keycode: 111, modifier: 0
CUIA 'arrow_up' => None is fired on key press and nothing is called on key release which is correct behavior. But zynswitches either not calling anything (P,R) or calling same event both on press and release (S).
That would be really nice if it worked. The workflow feels so much faster and smoother with a small macropad, so less force is needed compared to rubber buttons and encoder pushing. Looking forwards to the fix
Did you have time to look into this issue? I’ve setup a workaround keyboardings to access stuff directly but it’s not as effective without zynswithes acting as expected.