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

Removing layer related functionality #24303

Open
jkavalec opened this issue Aug 19, 2024 · 2 comments
Open

Removing layer related functionality #24303

jkavalec opened this issue Aug 19, 2024 · 2 comments

Comments

@jkavalec
Copy link

Issue Description

I am prototyping alternative layer solution, and I am wondering if it is possible to get rid of things related to the original layers.

As of now I am using layer functionality just to map keycodes like Key_1, Key_2 to the the first layer, then forgetting they exist:

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
    [BASE] = LAYOUT_ergodox_80(
        _Key_00_, Key_01_, _Key_02_, _Key_03_, _Key_04_, _Key_05_, // and so on

I would prefer to get rid of this completely e.g. I don't want to have for instance global variable layer_state available which disallows mee to have var for my layer implementation to have some name. And I would also like this code not to increase firmware size.

Is there any way to do this? So that I can rely purely on matrix line/pos coordinates?

@tzarc
Copy link
Member

tzarc commented Aug 19, 2024

About the extent of it is to use #define NO_ACTION_LAYER and hope nothing breaks.
It's not really a tested configuration, so you're pretty much on your own.

@jkavalec
Copy link
Author

This was helpful, thank you very much.

I was able together with taps and oneshots get about 30% more space for my firmware.
The only thing that still remains is that action_layer.h still adds layer_state definition like this "# define layer_state 0" into resulting code so I still cannot use that variable name. This is small issue, and will most likely keep using layer_data name.

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

No branches or pull requests

2 participants