SOCD for multiple keys

Hello.
I’m going to use the HIDremapper firmware for hitbox|flatbox devices (as you prefer), with the Xbox controller or Switch PRO controller detection mode.

For my configuration, I need the SOCD_last_input feature for multiple keys. Example: <->; LB-RB; LS-RS; or ←RB; LS-LB and so on…
Can I implement this in your firmware?
I’ve been using the GP2040-ce for a long time, and it’s not possible to do this there.

Not sure what you mean by “Xbox controller or Switch PRO controller detection mode”, but yes, you can implement SOCD for multiple button pairs.

I want to connect to Xbox or NSwitch game consoles.

Can you tell me how to write the code?
The extension in the WEB configurator is only set up for the A and D keyboard mode.

If you look at the example expression:

/* register 1 = A is pressed and has priority */
1 recall
0x00070004 prev_input_state_binary not /* A */
bitwise_or /* if A was just pressed, it has priority */
0x00070007 input_state_binary not /* D */
bitwise_or /* if D is not pressed, A has priority */
0x00070007 prev_input_state_binary not /* D */
0x00070007 input_state_binary /* D */
mul
not
mul /* if D was just pressed, A doesn't have priority */
0x00070004 input_state_binary /* A */
mul /* none of the above matters unless A is pressed */
dup
1 store
/* result used as A */

It reads the state of A and D keys. You need to replace 0x00070004 and 0x00070007 with whatever inputs you want to use. You can get the codes from the Monitor tab. Then you can use the result of the expression as the input on a mapping that will trigger whatever button you want it to trigger. Note that each expression keeps state in a register (1 store/1 recall) so if you add more expressions you have to use a different register number in each one.

It won’t work on an Xbox by the way, not without some kind of an adapter anyway.