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

annepro2: match default keymap to stock keycaps #16724

Merged
merged 6 commits into from
Apr 13, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
updated keymap
  • Loading branch information
bwisn committed Mar 25, 2022
commit c7b87dd787563cbf6b6c1226cbdbb0816ae938bc
57 changes: 57 additions & 0 deletions keyboards/annepro2/annepro2.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,63 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
else ap2_led_enable();
return true;
#endif

case KC_AP_RGB_VAI:
if (record->event.pressed) {
if (get_mods() & MOD_MASK_SHIFT) {
tap_code16(RGB_HUI);
return false;
} else if (get_mods() & MOD_MASK_CTRL) {
tap_code16(RGB_HUD);
return false;
} else {
tap_code16(RGB_VAI);
}
}
return true;

case KC_AP_RGB_VAD:
if (record->event.pressed) {
if (get_mods() & MOD_MASK_SHIFT) {
tap_code16(RGB_SAI);
return false;
} else if (get_mods() & MOD_MASK_CTRL) {
tap_code16(RGB_SAD);
return false;
} else {
tap_code16(RGB_VAD);
}
}
return true;

case KC_AP_RGB_TOG:
if (record->event.pressed) {
if (get_mods() & MOD_MASK_SHIFT) {
tap_code16(RGB_SAI);
return false;
} else if (get_mods() & MOD_MASK_CTRL) {
tap_code16(RGB_SAD);
return false;
} else {
tap_code16(RGB_TOG);
return true;
}
}
return true;

case KC_AP_RGB_MOD:
if (record->event.pressed) {
if (get_mods() & MOD_MASK_SHIFT) {
tap_code16(RGB_SPI);
return false;
} else if (get_mods() & MOD_MASK_CTRL) {
tap_code16(RGB_SPD);
return false;
} else {
tap_code16(RGB_MOD);
}
}
return true;

default:
break;
Expand Down
4 changes: 4 additions & 0 deletions keyboards/annepro2/annepro2.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ enum AP2KeyCodes {
KC_AP_LED_PREV_PROFILE,
KC_AP_LED_NEXT_INTENSITY,
KC_AP_LED_SPEED,
KC_AP_RGB_VAI,
KC_AP_RGB_VAD,
KC_AP_RGB_TOG,
KC_AP_RGB_MOD,
AP2_SAFE_RANGE,
};

Expand Down
10 changes: 5 additions & 5 deletions keyboards/annepro2/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@ enum anne_pro_layers {
*
*/
[FN2] = LAYOUT_60_ansi( /* FN2 */
_______, KC_AP2_BT1, KC_AP2_BT2, KC_AP2_BT3, KC_AP2_BT4, _______, _______, _______, _______, RGB_MOD, RGB_TOG, RGB_VAD, RGB_VAI, _______,
MO(FN2), _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_HOME, KC_END, _______,
_______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, KC_PGUP, KC_PGDN, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_DEL, _______,
_______, _______, _______, _______, _______, MO(FN1), MO(FN2), _______
_______, KC_AP2_BT1, KC_AP2_BT2, KC_AP2_BT3, KC_AP2_BT4, _______, _______, _______, _______, KC_AP_RGB_MOD, KC_AP_RGB_TOG, KC_AP_RGB_VAD, KC_AP_RGB_VAI, _______,
MO(FN2), _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_HOME, KC_END, _______,
_______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, KC_PGUP, KC_PGDN, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_DEL, _______,
_______, _______, _______, _______, _______, MO(FN1), MO(FN2), _______
),
};
// clang-format on