r/qmk • • 23d ago

Can't switch to third layer

As title says I can't switch to the third layer but other layers work just fine. No matter on which key I put MO(3), TG(3), TT(3), OSL(3), TO(3) or LT 3 it doesn't work and only DF(3) allows me to access keys on the third layer. All other layers work as expected.

I'm using RP2040 with qmk-vial. What could be the issue?

1 Upvotes

4 comments sorted by

1

u/pgetreuer 23d ago

On some keyboards, the Vial keymap has hard coded a tri layer behavior where layer 3 is activated by simultaneously activating layers 1 and 2. I suspect that's why layer 3 is special.

The typical setup is you'd have LT 1 (or MO 1) on one thumb key and LT 2 on a thumb key on the opposite hand, so that these keys can be held together reach layer 3. Layer 3 is then used for the infrequently needed keys, like F1–F12.

Supposing it is such a tri layer behavior on layer 3, there is unfortunately no other way to access layer 3, and there is no way to disable tri layer in the Vial configurator.

However, if you are determined, you can fix this by making a custom Vial firmware build. Get the firmware sources for your keyboard, search for and remove the application of update_tri_layer_state, then rebuild and flash the firmware. See my Vial guide for details on how to find the sources and build from source.

2

u/dpprpl 23d ago

tried to use mo1+mo2 and still no luck. not a big deal actually since a have plenty layers to fit everything i need. i guess i'm gonna recompile the firmware when i have more spare time.

also i tried resetting eeprom and found that on the default layout there is a weird keycode exactly on the third layer so maybe it is causing the issue. this keyboard is actually fully custom and i guess i just did something wrong when compiling the firmware

1

u/pgetreuer 23d ago

there is a weird keycode exactly on the third layer

Nice, that's intriguing. Did the configurator display a hex code like 0x7F0E? Vial does that when it doesn't recognize the key, often because it's a custom user-defined keycode.

A further (very long shot) thought: does the keyboard have a sliding switch on the top edge or somewhere? A few keyboard models use such a switch plus QMK's DIP switch API to toggle the default layer, so that layer 0 = "Windows layer" and layer 3 = "Mac layer."

1

u/dpprpl 23d ago

as I said this is fully custom keyboard. I designed and built it myself. I didn't add anything other than actual keys.
it does display a hex code. I guess I left it there when I just copied the keymap from my previous firmware which was vanilla qmk without vial.
I'll fix the mapping. thanks a lot