I do my keyboard configuration with Vial, which may or may not be relevant.
I am unable to momentarily switch layers from a particular layer, and I’m looking for tips.
I have a base Dvorak layer, with all of my layer switches as tap-dance keys under my left hand, with holds triggering a momentary layer switch and all of the other keys under my right hand: a layer for punctuation, a layer for numbers, a layer for function keys, for WM navigation, for tmux navigation… 9 layers in total. It all works well.
Recently, I started playing Factorio again, so I set up a combo switch to the 9th layer, which is bog-standard QWERTY, it being easier to just learn new muscle memory than to reconfigure all 9,000 Factorio key bindings for Dvorak. But now entering numbers was a PITA because my keyboard has no number keys, so I have to switch back to the base layer to use the MO binding to switch to my number layer.
Eventually, I decided this was too much trouble, so I created a tap-dance MO binding for the same physical key in the QWERTY layer… but it doesn’t work, in that the layer is not switched to the number layer - except for “0”: that combination works. The fact that one key works makes me think it is actually sorta switching layers? But all of the other keys just enter the un-switched QWERTY keys.
I’ve tried setting the trigger key to a different one, with identical results. All of the keys on the left hand (and under the trigger key) are KC_TRNS on the number layer, so in both cases I’ve tried the trigger key is KC_TRNS on the number layer. I have not yet tried duplicating the number layer and using that instead.
Does the target layer (the number layer) have to be a layer number greater than the starting layer? Number layer is layer 4, and QWERTY is 9 - do I need to move 4 to 10? Is there some other, common, issue I’m encountering?
Does the target layer (the number layer) have to be a layer number greater than the starting layer? Number layer is layer 4, and QWERTY is 9 - do I need to move 4 to 10? Is there some other, common, issue I’m encountering?
Yes, you’ll need to move the number layer, to have a higher index than the QWERTY layer. In QMK, layers are index-ordered (see the docs here), no matter the order you activate them. If you activate layer 9 (qwerty) and layer 4 (numpad), then even if you activated layer 4 later, it will still be below layer 9. So any key that is not transparent on 9, will be looked up from 9. Only transparent keys will be looked up from layers below.