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

Add Macro keyboards 2x6 #20482

Closed
wants to merge 15 commits into from
Closed

Add Macro keyboards 2x6 #20482

wants to merge 15 commits into from

Conversation

asesmero
Copy link

@asesmero asesmero commented Apr 17, 2023

Add "/handwired/asesmero/2x6" keyboard
with default keymap and 3 layer via keymap

Description

Types of Changes

  • Core
  • Bugfix
  • New feature
  • Enhancement/optimization
  • Keyboard (addition or update)
  • Keymap/layout/userspace (addition or update)
  • Documentation

Issues Fixed or Closed by This PR

Checklist

  • My code follows the code style of this project: C, Python
  • I have read the PR Checklist document and have made the appropriate changes.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have tested the changes and verified that they work and don't break anything (as well as I can manage).

@github-actions github-actions bot added keyboard keymap via Adds via keymap and/or updates keyboard for via support labels Apr 17, 2023
@asesmero
Copy link
Author

Corrected cli build

Copy link
Contributor

Choose a reason for hiding this comment

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

Per the PR guidelines, this information should be moved to info.json.

You can use qmk info -f json -kb handwired/asesmero/2x6 to assist with this, but do not copy and paste this output unedited as it contains some duplicate/unnecessary information. Instead, compare its output to the info.json documentation and recently-accepted pull requests.

#20136 may be a good example for you as it also uses a Pro Micro.

Comment on lines 34 to 51


// Runs constantly in the background, in a loop.
void matrix_scan_user(void) {

uint8_t layer = biton32(layer_state);

// INSERT CODE HERE: turn off all leds

switch (layer) {
case LAYER_0:
// INSERT CODE HERE: turn on leds that correspond to YOUR_LAYER_0
rgblight_setrgb(RGB_BLUE);
break;

// add case for each layer
}
};
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// Runs constantly in the background, in a loop.
void matrix_scan_user(void) {
uint8_t layer = biton32(layer_state);
// INSERT CODE HERE: turn off all leds
switch (layer) {
case LAYER_0:
// INSERT CODE HERE: turn on leds that correspond to YOUR_LAYER_0
rgblight_setrgb(RGB_BLUE);
break;
// add case for each layer
}
};

This is not an appropriate use of matrix_scan_user(). If you would like to have RGB default to a particular color, use the RGBLIGHT_DEFAULT_* settings. If you would like the RGB to change color based on layer, you can use lighting layers.

Comment on lines 44 to 68


// Runs constantly in the background, in a loop.
void matrix_scan_user(void) {

uint8_t layer = biton32(layer_state);

// INSERT CODE HERE: turn off all leds

switch (layer) {
case LAYER_0:
// INSERT CODE HERE: turn on leds that correspond to YOUR_LAYER_1
rgblight_setrgb(RGB_BLUE);
break;
case LAYER_1:
// INSERT CODE HERE: turn on leds that correspond to YOUR_LAYER_2
rgblight_setrgb(RGB_RED);
break;
case LAYER_2:
// INSERT CODE HERE: turn on leds that correspond to YOUR_LAYER_2
rgblight_setrgb(RGB_GREEN);
break;
// add case for each layer
}
};
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// Runs constantly in the background, in a loop.
void matrix_scan_user(void) {
uint8_t layer = biton32(layer_state);
// INSERT CODE HERE: turn off all leds
switch (layer) {
case LAYER_0:
// INSERT CODE HERE: turn on leds that correspond to YOUR_LAYER_1
rgblight_setrgb(RGB_BLUE);
break;
case LAYER_1:
// INSERT CODE HERE: turn on leds that correspond to YOUR_LAYER_2
rgblight_setrgb(RGB_RED);
break;
case LAYER_2:
// INSERT CODE HERE: turn on leds that correspond to YOUR_LAYER_2
rgblight_setrgb(RGB_GREEN);
break;
// add case for each layer
}
};

See previous comment re: matrix_scan_user().

Copy link
Contributor

Choose a reason for hiding this comment

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

Since your keyboard does not support any non-Pro Micro dev boards, you should simplify the folder structure by moving all of the information under the promicro folder into the top level rules.mk and info.json files. Then you won't need a DEFAULT_FOLDER, either.

Comment on lines 11 to 12
"layouts": {
"LAYOUT_12": {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"layouts": {
"LAYOUT_12": {
"community_layouts": [ "ortho_2x6" ]
"layouts": {
"LAYOUT_ortho_2x6": {


const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {

[LAYER_0] = LAYOUT_12(
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
[LAYER_0] = LAYOUT_12(
[LAYER_0] = LAYOUT_ortho_2x6(


const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {

[LAYER_0] = LAYOUT_12(
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
[LAYER_0] = LAYOUT_12(
[LAYER_0] = LAYOUT_ortho_2x6(

MEH(KC_A), MEH(KC_B), MEH(KC_C), MEH(KC_D), MEH(KC_E), MEH(KC_F),
LSG(KC_G), MEH(KC_H), MEH(KC_I), MEH(KC_J), MEH(KC_K), TO(1)),

[LAYER_1] = LAYOUT_12(
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
[LAYER_1] = LAYOUT_12(
[LAYER_1] = LAYOUT_ortho_2x6(




[LAYER_2] = LAYOUT_12(
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
[LAYER_2] = LAYOUT_12(
[LAYER_2] = LAYOUT_ortho_2x6(

Removed folders for another hardware, removed rgb, maybe i rename the folder
@asesmero
Copy link
Author

I have decided to simplify my project. My idea is to create keyboards for simple and easily configurable shortcuts for the user. I think using multiple layers and RGB is too much.

@asesmero asesmero requested a review from lesshonor April 18, 2023 22:11
keyboards/handwired/asesmero/2x6/info.json Outdated Show resolved Hide resolved
keyboards/handwired/asesmero/2x6/info.json Outdated Show resolved Hide resolved
keyboards/handwired/asesmero/2x6/info.json Outdated Show resolved Hide resolved
keyboards/handwired/asesmero/2x6/rules.mk Outdated Show resolved Hide resolved
keyboards/handwired/asesmero/2x6/readme.md Outdated Show resolved Hide resolved
keyboards/handwired/asesmero/2x6/keymaps/default/keymap.c Outdated Show resolved Hide resolved
keyboards/handwired/asesmero/2x6/info.json Outdated Show resolved Hide resolved
keyboards/handwired/asesmero/2x6/info.json Outdated Show resolved Hide resolved
keyboards/handwired/asesmero/3x3/info.json Outdated Show resolved Hide resolved
@asesmero asesmero requested a review from zvecr April 19, 2023 13:25
@asesmero asesmero closed this Apr 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
keyboard keymap via Adds via keymap and/or updates keyboard for via support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants