qmk/qmk_firmware

[Bug] Documentation on layers doesn't match code

Open

#25.386 geöffnet am 18. Juni 2025

Auf GitHub ansehen
 (4 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)C (43.867 Forks)batch import
bughelp wanted

Repository-Metriken

Stars
 (20.368 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 20T 9h) (27 gemergte PRs in 30 T)

Beschreibung

Describe the Bug

I've been debugging why the led map module is not working, and it seems that the document is a bit wrong.

Here is some values taken after boot:

Layer0 is default (some 0s removed)

                     default_layer_state: 0b0001
                                  layer_state:  0b0000

Layer1 is default (some 0s removed)

                     default_layer_state: 0b0010
                                  layer_state:  0b0000

which doesn't match the documentation:

Initial state of Keymap          Change base layout
-----------------------          ------------------

  31                               31
  30                               30
  29                               29
   :                                :
   :                                :   ____________
   2   ____________                 2  /           /
   1  /           /              ,->1 /___________/
,->0 /___________/               |  0
|                                |
`--- default_layer = 0           `--- default_layer = 1
     layer_state   = 0x00000001       layer_state   = 0x00000002

I'm not sure why layers_state is at 0 after boot, when according to the documentation it should be always > 0 (when there's a default layer)

Keyboard Used

No response

Link to product page (if applicable)

No response

Operating System

No response

qmk doctor Output

Is AutoHotKey / Karabiner installed

  • AutoHotKey (Windows)
  • Karabiner (macOS)

Other keyboard-related software installed

No response

Additional Context

No response

Contributor Guide