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

Reformat Iris default keymap #3534

Merged
merged 2 commits into from
Aug 2, 2018
Merged

Conversation

nooges
Copy link
Member

@nooges nooges commented Jul 31, 2018

No description provided.

)

};

void persistent_default_layer_set(uint16_t default_layer) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you're reformatting/refactoring the code, would you mind removing this function (persistent_default_layer_set) and replace all references to it with set_single_persistent_default_layer instead? (it should be called like set_single_persistent_default_layer(_QWERTY))?

bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QWERTY:
if (record->event.pressed) {
persistent_default_layer_set(1UL<<_QWERTY);
set_single_persistent_default_layer(1UL << _QWERTY);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 1UL << part isn't necessary. The function includes that automatically, so all you need is the layer number/"name".

@drashna drashna added the keymap label Aug 1, 2018
@nooges nooges force-pushed the update-iris-default branch from e495d9e to 4569425 Compare August 1, 2018 03:43
@drashna
Copy link
Member

drashna commented Aug 2, 2018

Awesome, thanks!

@drashna drashna merged commit a057f1c into qmk:master Aug 2, 2018
alexey-danilov pushed a commit to alexey-danilov/qmk_firmware that referenced this pull request Aug 3, 2018
* Reformat default keymap to use LAYOUT, move RGB controls to RAISE layer

* Use set_single_persistent_default_layer instead of old method
@pvinis
Copy link
Contributor

pvinis commented Aug 5, 2018

@nooges besides changing the small function and changing the layout_kc to layout, which i understand, why the rest of the changes? why remove the rgb buttons etc?

@Xyverz
Copy link
Contributor

Xyverz commented Aug 8, 2018

@pvinis Probably to make it easier for him. I agree that the RGB controls should have been kept on the Adjust layer, and that those RGB changes should have been made to his own keymap, but I'm not the person who created the Iris keyboard, so I'm not sure I have much of a say in the matter.

I do like the change to LAYOUT instead of LAYOUT_kc, since it makes it easier for me to simply copy-paste my other keymaps into my Iris layout. I can always move the RGB controls on my own keymap.c file to the ADJUST layer if I want.

@pvinis
Copy link
Contributor

pvinis commented Aug 8, 2018

yeah I was mostly asking for the rbg example essentially getting removed from the default. I guess people who want to find how to do it will find how to do it, same as with every other feature..

@nooges
Copy link
Member Author

nooges commented Aug 9, 2018

The RGB functions are still in the default, just moved to the Raise layer now to consolidate layers.

@nooges nooges deleted the update-iris-default branch August 13, 2018 21:33
ChrissiQ pushed a commit to ChrissiQ/qmk_firmware that referenced this pull request Sep 25, 2018
* Reformat default keymap to use LAYOUT, move RGB controls to RAISE layer

* Use set_single_persistent_default_layer instead of old method
yamad pushed a commit to yamad/qmk_firmware that referenced this pull request Apr 10, 2019
* Reformat default keymap to use LAYOUT, move RGB controls to RAISE layer

* Use set_single_persistent_default_layer instead of old method
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants