-
Notifications
You must be signed in to change notification settings - Fork 486
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
Add a key for replacing the top layer #942
Conversation
def _df_pressed(self, key, keyboard, *args, **kwargs): | ||
''' | ||
Switches the default layer | ||
''' | ||
self.activate_layer(keyboard, key.meta.layer, as_default=True) | ||
self.activate_layer(keyboard, key.meta.layer, idx=-1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just really want to say I really like this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
so Using this change I expected that the base layer and the current layer are active, thet are not. It changes the default layer and it seems other layers are not active. Running it from thonny shows that indeed all other layers are deactivated:
|
I'm guessing you probably want to keep layer 0 as the lowest layer. If so, you want to add another layer on top first, and then switch out that top layer, then activating only layer 0 to complete the cycle. Example snippet for 1 base and 3 overlay layers: keymap = [
[KC.TG(1)],
[KC.FD(2)],
[KC.FD(3)],
[KC.TO(0)],
] |
Thank you very much for explaining this, it works now :) |
Reference: chat discussion