Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CONFIG_ZMK_WIDGET_LAYER_STATUS not working #2467

Closed
quiquos opened this issue Sep 8, 2024 · 7 comments
Closed

CONFIG_ZMK_WIDGET_LAYER_STATUS not working #2467

quiquos opened this issue Sep 8, 2024 · 7 comments

Comments

@quiquos
Copy link

quiquos commented Sep 8, 2024

A few days ago, CONFIG_ZMK_WIDGET_LAYER_STATUS stopped showing the layer we are in.

this is my conf file:

CONFIG_ZMK_KEYBOARD_NAME="Quiquos Corne"
CONFIG_ZMK_DISPLAY=y
CONFIG_ZMK_WIDGET_LAYER_STATUS=y
CONFIG_ZMK_WIDGET_BATTERY_STATUS=y
CONFIG_ZMK_WIDGET_BATTERY_STATUS_SHOW_PERCENTAGE=y
CONFIG_ZMK_WIDGET_OUTPUT_STATUS=y
CONFIG_ZMK_WIDGET_WPM_STATUS=y
CONFIG_ZMK_SLEEP=y
CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=900000
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
CONFIG_ZMK_PM_SOFT_OFF=y

If I flash a version from, for example, a month ago, it works great.
The same code compiled last week won't show the layer number we are in.

I tried something I read that CONFIG_ZMK_WIDGET... are no longer needed to put in conf file, but even so, it doesn't work.

My keyboard is the Split Corne wireless connected via BT (also with cable, layer is not displayed)

@caksoylar
Copy link
Contributor

caksoylar commented Sep 9, 2024

Does it work if you add display-name properties to the layer nodes? e.g. display-name = "Base";

I think this change now causes it to use empty string rather than layer index when it isn't assigned: c8c1959#diff-d159782fc3c35e2f081cc4383f5b9d2dd4daae5aa656f18a4ed09a430477916aR67

@quiquos
Copy link
Author

quiquos commented Sep 9, 2024

ok, can you tell me where I define that display name?
this is my keymap file

/*
  * Copyright (c) 2020 The ZMK Contributors
  *
  * SPDX-License-Identifier: MIT
  */

#include <behaviors.dtsi>
#include <dt-bindings/zmk/bt.h>
#include <dt-bindings/zmk/keys.h>

&soft_off {
    hold-time-ms = <3000>; // Only turn off it the key is held for 3 seconds or longer.
};

/ {
    keymap {
        compatible = "zmk,keymap";

        layer0 {
            bindings = <
&kp ESCAPE      &kp Q  &kp W  &kp E         &kp R        &kp T               &kp Y              &kp U        &kp I          &kp O    &kp P          &kp BACKSPACE
&lt 3 TAB       &kp A  &kp S  &kp D         &kp F        &kp G               &kp H              &kp J        &kp K          &kp L    &kp SEMICOLON  &kp ENTER
&kp LEFT_SHIFT  &kp Z  &kp X  &kp C         &kp V        &kp B               &kp N              &kp M        &kp COMMA      &kp DOT  &kp SLASH      &kp RIGHT_SHIFT
                              &kp LEFT_GUI  &lt 1 SPACE  &kp LEFT_CONTROL    &kp LC(BACKSPACE)  &lt 2 SPACE  &kp RIGHT_ALT
            >;
        };

        layer1 {
            bindings = <
&trans  &kp N1  &kp N2  &kp N3  &kp N4     &kp N5    &kp N6           &kp N7  &kp N8         &kp N9  &kp N0        &trans
&trans  &none   &none   &none   &none      &none     &kp KP_ASTERISK  &kp N4  &kp N5         &kp N6  &kp KP_PLUS   &trans
&trans  &none   &none   &none   &none      &none     &kp KP_SLASH     &kp N1  &kp N2         &kp N3  &kp KP_MINUS  &trans
                        &trans  &kp SPACE  &trans    &trans           &kp N0  &kp RIGHT_ALT
            >;
        };

        layer2 {
            bindings = <
&kp F1  &kp F2                &kp F3                    &kp F4      &kp F5    &kp F6    &kp F7            &kp F8      &kp F9        &kp F10           &kp F11           &kp F12
&none   &none                 &none                     &kp INSERT  &kp HOME  &none     &kp LS(NUMBER_0)  &kp LS(N8)  &kp LS(N9)    &kp LEFT_BRACKET  &kp SINGLE_QUOTE  &trans
&trans  &kp NON_US_BACKSLASH  &kp LS(NON_US_BACKSLASH)  &kp DELETE  &kp END   &none     &none             &kp RA(N7)  &kp RA(N0)    &kp RA(N8)        &kp RA(N9)        &trans
                                                        &trans      &trans    &trans    &trans            &kp SPACE   &kp LEFT_ALT
            >;
        };

        layer3 {
            bindings = <
&kp GRAVE  &kp EXCL      &kp AT        &kp HASH      &kp DLLR      &kp PRCNT       &kp CARET  &kp PAGE_UP  &kp UP        &kp PAGE_DOWN  &kp NON_US_HASH  &kp RIGHT_BRACKET
&none      &none         &kp RA(N2)    &none         &none         &none           &none      &kp LEFT     &kp DOWN      &kp RIGHT      &kp MINUS        &kp DELETE
&trans     &bt BT_SEL 0  &bt BT_SEL 1  &bt BT_SEL 2  &bt BT_SEL 3  &bt BT_SEL 4    &kp HOME   &kp END      &bt BT_PRV    &bt BT_NXT     &bt BT_CLR       &trans
                                       &trans        &kp SPACE     &trans          &tog 4     &kp SPACE    &kp LEFT_ALT
            >;
        };

        layer4 {
            bindings = <
&kp ESCAPE      &kp Q  &kp W  &kp E      &kp R         &kp T               &trans  &trans  &trans        &trans  &kp NUMBER_1  &trans
&kp TAB         &kp A  &kp S  &kp D      &kp F         &kp G               &trans  &trans  &trans        &trans  &kp NUMBER_2  &trans
&kp LEFT_SHIFT  &kp Z  &kp X  &kp C      &kp V         &kp B               &trans  &trans  &trans        &trans  &kp NUMBER_3  &trans
                              &kp SPACE  &kp LEFT_ALT  &kp LEFT_CONTROL    &tog 4  &mo 5   &kp CAPSLOCK
            >;
        };

        layer_5 {
            bindings = <
&trans     &trans  &trans  &trans  &trans  &trans    &reinforce              &trans  &trans  &trans  &trans  &trans
&trans     &trans  &trans  &trans  &trans  &trans    &shield_generator_pack  &trans  &trans  &trans  &trans  &trans
&soft_off  &trans  &trans  &trans  &trans  &trans    &orbital_laser          &trans  &trans  &trans  &trans  &soft_off
                           &trans  &trans  &trans    &trans                  &trans  &trans
            >;
        };
    };
};

my layers are
layer0
layer1
layer2
...

is this the display name?

@caksoylar
Copy link
Contributor

No, it is an additional property that goes in the node like I mentioned above. See examples in

@quiquos
Copy link
Author

quiquos commented Sep 9, 2024

Nice, it worked.

Actually, it's even better, because I thought that I could only display a number as a layer "name" to be displayed, and now I have the name I want.

Thanks

@Grazfather
Copy link
Contributor

I added this to the docs in #2460

@petejohanson
Copy link
Contributor

Flease give #2491 a test.

poppolopoppo added a commit to poppolopoppo/zmk-ppk-config that referenced this issue Sep 21, 2024
@caksoylar
Copy link
Contributor

Closing given #2491 is merged, please re-open if still an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants