Hi, I’ve updated my firmware from a pretty old version to the latest one, 1.96.0.
My implementation
(Activate a different Layer when both function keys are depressed)
for this to stopped working. I’ve tried Algernon’s solution
(Activate a different Layer when both function keys are depressed)
like this (had to rename the methods according to the updated ones):
if (Layer.isActive(LFNandRFN)) {
Layer.deactivate(LFNandRFN);
} else {
Layer.activate(LFNandRFN);
}
But that does not seem to work anymore either. When I press both FN keys, they keyboard shifts to the LFNandRFN layer as intended, but it stays stuck in that layer.
Any ideas on how to do this with the latest firmware? Are there any new plugins solving this that I’ve missed?
Edit: Found this basic solution. I haven’t tested it that much yet, but it seems to be clean. You do not get stuck in any sort of leftover layers.
Solution: I basically shift my way (using ShiftToLayer) to the target layer depending on what layer I’m on. This is how my left FN (LFN) and right FN (RFN) keys are set up to get me to the target layer “LFNandRFN”. Each FN key has its own layer when pressed on its own. When both LFN and RFN are pressed, I get LFNandRFN.
These are the layer definitions (all keys except LFN and RFN are omitted):
KEYMAPS
(
[DVORAK] = KEYMAP_STACKED
(...,
ShiftToLayer(LFN),
...,
ShiftToLayer(RFN)),
[LFN] = KEYMAP_STACKED
(...,
___,
...,
ShiftToLayer(LFNandRFN)),
[RFN] = KEYMAP_STACKED
(...,
ShiftToLayer(LFNandRFN),
...,
___),
[LFNandRFN] = KEYMAP_STACKED
(/*...*/),
)