swapped casp for esc in vim layout and improved poll rate

This commit is contained in:
Rohit Pai 2022-01-08 17:08:24 +00:00
parent 2a730b9b74
commit 42d0d1b7b6
2 changed files with 60 additions and 37 deletions

View File

@ -69,7 +69,7 @@
#define USB_POLLING_INTERVAL_MS 1 #define USB_POLLING_INTERVAL_MS 1
/* Send up to 4 key press events per scan */ /* Send up to 4 key press events per scan */
#define QMK_KEYS_PER_SCAN 4 #define QMK_KEYS_PER_SCAN 12
/* Set debounce time to 5ms */ /* Set debounce time to 5ms */
#define DEBOUNCE 5 #define DEBOUNCE 5

View File

@ -62,7 +62,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record)
if (record->event.pressed) if (record->event.pressed)
{ {
// when keycode KC_GMAIL is pressed // when keycode KC_GMAIL is pressed
SEND_STRING("xxxxxxxxxxxxxxx"); SEND_STRING("rodude123@gmail.com");
} }
else else
{ {
@ -74,7 +74,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record)
if (record->event.pressed) if (record->event.pressed)
{ {
// when keycode KC_HMAIL is pressed // when keycode KC_HMAIL is pressed
SEND_STRING("xxxxxxxxxxxxx"); SEND_STRING("rohitpai@hotmail.co.uk");
} }
else else
{ {
@ -86,7 +86,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record)
if (record->event.pressed) if (record->event.pressed)
{ {
// when keycode KC_UNI is pressed // when keycode KC_UNI is pressed
SEND_STRING("xxxxxxxxxxxxxx"); SEND_STRING("rap33@sussex.ac.uk");
} }
else else
{ {
@ -97,7 +97,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record)
if(record->event.pressed) if(record->event.pressed)
{ {
// when keycode KC_PHN is pressed // when keycode KC_PHN is pressed
SEND_STRING("xxxxxxxxxxxxxx"); SEND_STRING("07449063029");
} }
else else
{ {
@ -139,6 +139,12 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
RGB prevColour = hsv_to_rgb(rgb_matrix_get_hsv()); RGB prevColour = hsv_to_rgb(rgb_matrix_get_hsv());
RGB_MATRIX_INDICATOR_SET_COLOR(19, 255 - prevColour.r, 192 - prevColour.g, 128 - prevColour.b); RGB_MATRIX_INDICATOR_SET_COLOR(19, 255 - prevColour.r, 192 - prevColour.g, 128 - prevColour.b);
} }
if (layer_state_is(3))
{
RGB prevColour = hsv_to_rgb(rgb_matrix_get_hsv());
RGB_MATRIX_INDICATOR_SET_COLOR(24, 255 - prevColour.r, 192 - prevColour.g, 128 - prevColour.b);
}
} }
// clang-format off // clang-format off
@ -172,19 +178,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(2), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(2), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
[1] = LAYOUT( [1] = LAYOUT(
KC_ESC, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, KC_TRNS, KC_MPLY, KC_ESC, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, KC_TRNS, KC_MPLY,
KC_GRV, TG(0), KC_TRNS, TG(2), KC_4, KC_5, KC_6, KC_7, KC_8, KC_PSLS, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_PSCR, KC_GRV, TG(0), KC_TRNS, TG(2), TG(3), KC_5, KC_6, KC_7, KC_8, KC_PSLS, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_PSCR,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_P7, KC_P8, KC_P9, KC_PAST, KC_P, KC_LBRC, KC_RBRC, KC_DEL, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_P7, KC_P8, KC_P9, KC_PAST, KC_P, KC_LBRC, KC_RBRC, KC_DEL,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_DBL0, KC_P4, KC_P5, KC_P6, KC_PMNS, KC_PPLS, KC_QUOT, KC_NUHS, KC_ENT, KC_HOME, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_DBL0, KC_P4, KC_P5, KC_P6, KC_PMNS, KC_PPLS, KC_QUOT, KC_NUHS, KC_ENT, KC_HOME,
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_P0, KC_P1, KC_P2, KC_3, KC_PDOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_P0, KC_P1, KC_P2, KC_3, KC_PDOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(2), KC_NLCK, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(2), KC_NLCK, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
[2] = LAYOUT( [2] = LAYOUT(
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_GMAIL, KC_HMAIL, KC_UNI, KC_PHN, KC_TRNS, KC_MPLY, KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_GMAIL, KC_HMAIL, KC_UNI, KC_PHN, KC_TRNS, KC_MUTE,
KC_GRV, TG(0), TG(1), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSPC, KC_PSCR, KC_GRV, TG(0), TG(1), KC_TRNS, TG(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSPC, KC_INS,
KC_TAB, BL_TOGG, BL_ON, KC_TRNS, KC_TRNS, KC_INS, KC_PGUP, KC_PGDN, KC_TRNS, RGB_HUI, RGB_SAI, RGB_VAI, KC_TRNS, KC_DEL, KC_TAB, BL_TOGG, BL_ON, KC_TRNS, KC_TRNS, KC_INS, KC_PGUP, KC_PGDN, KC_TRNS, RGB_HUI, RGB_SAI, RGB_VAI, KC_TRNS, KC_PGUP,
KC_CAPS, RGB_TOG, KC_YELLOW, KC_GREEN, KC_TRNS, KC_MYCM, KC_MAIL, KC_CALC, KC_TRNS, RGB_HUD, RGB_SAD, RGB_VAD, RESET, KC_ENT, KC_HOME, KC_CAPS, RGB_TOG, KC_YELLOW, KC_GREEN, KC_TRNS, KC_MYCM, KC_MAIL, KC_CALC, KC_TRNS, RGB_HUD, RGB_SAD, RGB_VAD, RESET, KC_ENT, KC_PGDN,
KC_LSFT, KC_TRNS, KC_MPRV, KC_MNXT, KC_MSEL, KC_TRNS, KC_BRIU, KC_BRID, KC_TRNS, KC_TRNS, KC_TRNS, KC_APP, KC_RSFT, RGB_MOD, KC_END, KC_LSFT, KC_TRNS, KC_MPRV, KC_MNXT, KC_MSEL, KC_TRNS, KC_BRIU, KC_BRID, KC_TRNS, KC_TRNS, KC_TRNS, KC_APP, KC_RSFT, RGB_MOD, KC_SLEP,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SPI, RGB_RMOD, RGB_SPD) KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SPI, RGB_RMOD, RGB_SPD),
[3] = LAYOUT(
KC_ESC, TG(0), TG(1), TG(2), KC_4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_MPLY,
KC_GRV, KC_1, KC_2, KC_3, KC_TRNS, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_PSCR,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_DEL,
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_HOME,
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(2), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
}; };
// clang-format on // clang-format on
@ -225,6 +237,17 @@ bool encoder_update_user(uint8_t index, bool clockwise)
{ {
rgb_matrix_decrease_hue(); rgb_matrix_decrease_hue();
} }
break;
case 3:
if (clockwise)
{
tap_code16(KC_VOLU);
}
else
{
tap_code16(KC_VOLD);
}
break;
} }
} }