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

Kbd6x #14164

Merged
merged 4 commits into from
Aug 30, 2021
Merged

Kbd6x #14164

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
My Prime E keymap. Now with change from CR.
  • Loading branch information
peott-fr committed Aug 26, 2021
commit 9f875907fa1cba901a3fd994a348a6d102088a18
42 changes: 17 additions & 25 deletions keyboards/primekb/prime_e/keymaps/peott-fr/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ enum custom_layers {
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = LAYOUT(
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC,
LCTL_T(KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC,
LCTL_T(KC_MPRV), LALT_T(KC_MPLY), FN_NUM, SPC_LFT, BSP_FUNC, LGUI_T(KC_DEL), RALT_T(KC_HOME), RCTL_T(KC_END)
LCTL_T(KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC,
LCTL_T(KC_MPRV), LALT_T(KC_MPLY), FN_NUM, SPC_LFT, BSP_FUNC, LGUI_T(KC_DEL), RALT_T(KC_HOME), RCTL_T(KC_END)
),
[_LEFTHAND] = LAYOUT(
KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
Expand All @@ -59,44 +59,36 @@ void matrix_init_user(void) {
// set CapsLock LED to output and low
setPinOutput(B1);
writePinLow(B1);
// set NumLock LED to output and low
// set Layer 1 to output and low
setPinOutput(B2);
writePinLow(B2);
// set ScrollLock LED to output and low
// set Layer 2 to output and low
setPinOutput(B3);
writePinLow(B3);
}

void matrix_scan_user(void) {

}

void led_set_user(uint8_t usb_led) {
if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
writePinHigh(B2);
} else {
writePinLow(B2);
}
if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
writePinHigh(B1);
} else {
writePinLow(B1);
}
/*
if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) {
writePinHigh(B3);
} else {
writePinLow(B3);
}*/

//function to activate Caps Lock LED
bool led_update_user(led_t led_state) {
writePin(B1, led_state.caps_lock);
return false;
}

//function for layer indicator LED
layer_state_t layer_state_set_user(layer_state_t state)
{
if (get_highest_layer(state) == 1) {
writePinHigh(B2);
}
else {
writePinLow(B2);
}
if (get_highest_layer(state) == 2) {
writePinHigh(B3);
} else {
}
else {
writePinLow(B3);
}
return state;
Expand Down