Is reverse macro possible? [newbie]

is reverse macro possible?
e.g. (Ctrl+Up_Arrow) → Volume_Up

is macro to macro also possible?
e.g. (Ctrl+C) → (Ctrl+A)

It’s possible, but not as straightforward as a simple mapping if you want Control to still function as Control normally, but not be pressed while the key combination is active.

For example in your first case you probably want to still be able to use Control for Ctrl-V, but when you press Ctrl-Up arrow, you don’t want Control to be pressed simultaneously with Volume up (at least that’s what I assume is your intention).

You can do it using an expression like this:

0x000700e0 input_state_binary /* left control */
0x000700e4 input_state_binary /* right control */
bitwise_or
0x00070052 input_state_binary /* up arrow */
mul
1 store /* ctrl+up arrow */

0x000700e0 input_state_binary
1 recall not
mul
2 store /* left control output */

0x000700e4 input_state_binary
1 recall not
mul
3 store /* right control output */

0x00070052 input_state_binary
1 recall not
mul
4 store /* up arrow output */

with mappings like this:

Here’s a JSON file with this configuration:

hid-remapper-key-combination.json (3.8 KB)

If you want to have multiple different key combinations that use Control, you’d have to implement them similarly and then check for each combination in the part of the expression that is responsible for normal Control use.

For macros that are simple combinations like Ctrl-A you don’t actually have to use macros. You can make two separate mappings with the same input, one with Control as output and another with A as output. The keys will just be pressed simultaneously whenever the input side of the mappings is active.

1 Like