Control+Control = Control+Alt

Next to my inverse T arrow section IKJL, I have bound U and O to LCTRL(Left) and LCTRL(Right).

This works really well for text editing. I have bound Ctrl+Alt+Left/Right to another useful editing action, but I find that I can reach my ctrl key much easier than my alt key.

So I’d like LCTRL(Left) to be LCTRL(LALT(Left)), when LCTRL is already pressed.

I suppose I could write a macro, but I have this feeling that a more elegant solution is possible.

Something like:

#define LCTRL(k)  ((Key) { k.keyCode, k.flags | CTRL_HELD })
#define LALT(k)   ((Key) { k.keyCode, k.flags | LALT_HELD })
// hold both alt and ctrl, if ctrl is already held
#define CTRAL(k) ((Key) { k.keyCode, ???????? })

Does it make sense?

You’ll have to use a macro for that, unless you want the key to always be control + alt + keycode. The in-keymap definition either has a modifier flag or it doesn’t; it can’t be conditional on other modifiers being pressed.

You could also use a layer shift, but that’s probably not as good a solution.

Ok. I’ll get cracking then :slight_smile:

I’m thinking about making dedicated ctrl + alt, ctrl + shift and ctrl + shit + alt layers and shift to them with function + ctrl/shift/alt

that could simulate a double modifier key isn’t it??