-
Notifications
You must be signed in to change notification settings - Fork 53
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
KC_TRANS #55
Comments
I looked into this issue, but I think implementing transparent keys will require refactoring the way layers are implemented to introduce the concept of whether a layer is active or not. Imagine the following hypothetical keyboard: # key1 key2 key3
kbd.add_layer :default, %i(KC_A KC_B KC_C SPC_NUM ENT_SYM ESC_NAV)
kbd.add_layer :numbers, %i(_______ KC_2 KC_3 SPC_NUM ENT_SYM ESC_NAV)
kbd.add_layer :symbols, %i(KC_DOT _______ KC_COMMA SPC_NUM ENT_SYM ESC_NAV)
kbd.add_layer :nav, %i(KC_UP KC_DOWN _______ SPC_NUM ENT_SYM ESC_NAV)
kbd.define_mode_key :SPC_NUM, [ :KC_SPACE, :numbers, 200, 200 ]
kbd.define_mode_key :ENT_SYM, [ :KC_ENTER, :symbols, 200, 200 ]
kbd.define_mode_key :ESC_NAV, [ :KC_ESC, :nav, 200, 200 ] Case 1 Hold down Case 2 Hold down
Case 3 Hold down
The problem is that a transparent keycode needs to consider the layers that are currently active underneath it, not just whatever layer is underneath it, and there is no concept in PRK at the moment that multiple layers could be active. Not sure if refactoring the layer model is something that should be undertaken right now, or if it should wait? Edit: having thought about this some more, perhaps having |
@rschenk Good point, thanks! |
It does look like QMK has the notion of multiple active layers:
So it seems like PRK needs to get the concept of active layers. I guess the question then becomes, how "Ruby-like" should/can this be implemented? Right now the layers are modeled as a hash of arrays. Now it seems that we need to also store a |
@rschenk Thanks again. Now that I want the PRK's layer system to become similar to the QMK's one. But I, for now, don't know whether the state should be an independent variable or a member of the existing keymap object. At the same time, I'm reluctant to introduce a specified class such as LayerStack because I am a believer in PORO, Plain Old Ruby Objects, like Array and Hash. So, two major improvements we will have:
Are we now seeing a common perspective? |
#51
Aliases:
KC_TRNS
and_______
(seven "_"s)The text was updated successfully, but these errors were encountered: