[Keymap] update arkag keymap, add hitbox layout (#20271)

Co-authored-by: Alex Kagno <alex@turncommerce.com>
master
Alexander Kagno 2023-04-02 03:57:54 -05:00 committed by GitHub
parent b53356f7ab
commit be9f6e679b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 106 deletions

View File

@ -20,11 +20,11 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = LAYOUT_preonic_grid( [_QWERTY] = LAYOUT_preonic_grid(
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, XXXXXXX, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, M_OS,
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
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_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
KC_LCTL, KC_LGUI, KC_LALT, MEDIA, SYMBOL, KC_SPC, QK_LEAD, ARROW, FUNCT, XXXXXXX, KC_RALT, QK_LEAD), KC_LCTL, KC_LGUI, KC_LALT, MEDIA, SYMBOL, KC_SPC, QK_LEAD, ARROW, FUNCT, KC_RALT, XXXXXXX, HITBOX),
[_SYMBOL] = LAYOUT_preonic_grid( [_SYMBOL] = LAYOUT_preonic_grid(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
@ -47,15 +47,22 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
[_HITBOX] = LAYOUT_preonic_grid(
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_U, KC_I, KC_O, KC_P, XXXXXXX,
XXXXXXX, XXXXXXX, KC_A, KC_S, KC_D, XXXXXXX, XXXXXXX, KC_J, KC_K, KC_L, KC_SCLN, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_ENT,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_W, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, HITBOX),
[_FUNCT] = LAYOUT_preonic_grid( [_FUNCT] = LAYOUT_preonic_grid(
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______,
_______, _______, _______, KC_END, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_END, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, KC_HOME, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, _______, _______, _______, _______, _______,
M_SFTY, _______, _______, KC_CALC, _______, _______, _______, _______, _______, _______, _______, KC_CAPS, _______, _______, _______, KC_CALC, _______, _______, _______, _______, _______, _______, _______, KC_CAPS,
_______, _______, _______, _______, _______, _______, M_AEST, _______, _______, _______, _______, M_OS ), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
[_KEEB] = LAYOUT_preonic_grid( [_KEEB] = LAYOUT_preonic_grid(
CK_TOGG, AU_TOGG, MU_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, CK_TOGG, AU_TOGG, MU_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, HITBOX,
M_USSR, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, M_USSR, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, BL_TOGG, BL_STEP, BL_UP, BL_DOWN, BL_BRTG, _______, _______, _______, _______, _______, _______, _______, BL_TOGG, BL_STEP, BL_UP, BL_DOWN, BL_BRTG, _______, _______, _______, _______, _______, _______,
RGB_M_P, RGB_TOG, RGB_MOD, RGB_VAI, RGB_VAD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, _______, _______, _______, RGB_M_P, RGB_TOG, RGB_MOD, RGB_VAI, RGB_VAD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, _______, _______, _______,

View File

@ -41,7 +41,6 @@ uint8_t velocikey_match_speed(uint8_t minValue, uint8_t maxValue) {
} }
// End: Written by Chris Lewis // End: Written by Chris Lewis
static int shift_int = 0;
uint8_t current_os, uint8_t current_os,
mod_primary_mask, mod_primary_mask,
fade_interval, fade_interval,
@ -53,8 +52,6 @@ Color underglow,
flashState flash_state = no_flash; flashState flash_state = no_flash;
fadeState fade_state = add_fade; fadeState fade_state = add_fade;
activityState state = boot; activityState state = boot;
bool aesthetic = false,
shifty = false;
float song_ussr[][2] = SONG(USSR_ANTHEM); float song_ussr[][2] = SONG(USSR_ANTHEM);
@ -208,7 +205,7 @@ void set_os (uint8_t os, bool update) {
flash_color = underglow; flash_color = underglow;
flash_state = flash_off; flash_state = flash_off;
state = boot; state = boot;
num_extra_flashes_off = 1; num_extra_flashes_off = 3;
} }
// register GUI if Mac or Ctrl if other // register GUI if Mac or Ctrl if other
@ -245,17 +242,6 @@ void sec_mod(bool press) {
} }
} }
// register Meh if Win or Hyper if other
// KC_MEH/HYPR registers both sides, causes issues with some apps
// I'll do it myself, then
void meh_hyper(bool press) {
if (current_os == OS_WIN) {
(press) ? register_mods(L_BIT_MEH) : unregister_mods(L_BIT_MEH);
} else {
(press) ? register_mods(L_BIT_HYPR) : unregister_mods(L_BIT_HYPR);
}
}
void multi_tap(uint8_t num_of_chars, uint16_t keycode, bool use_shift) { void multi_tap(uint8_t num_of_chars, uint16_t keycode, bool use_shift) {
if (use_shift) { if (use_shift) {
register_code(KC_LSFT); register_code(KC_LSFT);
@ -441,56 +427,6 @@ void matrix_scan_user(void) {
} }
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (aesthetic) {
switch (keycode) {
case KC_A ... KC_0:
case KC_SPACE ... KC_SLASH:
if (record->event.pressed) {
state = active;
velocikey_accelerate();
tap_code(keycode);
tap_code(KC_SPACE);
}
return false;
case KC_BACKSPACE:
if (record->event.pressed) {
state = active;
velocikey_accelerate();
tap_code(keycode);
tap_code(keycode);
}
return false;
default: // Do nothing
break;
}
}
if (shifty) {
switch (keycode) {
case KC_A ... KC_Z:
if (record->event.pressed) {
shift_int += (rand() % 5);
int shift = ((shift_int % 2) == 1) ? true : false;
state = active;
velocikey_accelerate();
(shift) ? register_code(KC_LSFT) : NULL;
tap_code(keycode);
(shift) ? unregister_code(KC_LSFT) : NULL;
}
return false;
case KC_SPC:
if (record->event.pressed) {
state = active;
velocikey_accelerate();
tap_code(keycode);
}
return false;
default: // Do nothing
break;
}
}
switch (keycode) { switch (keycode) {
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
case M_USSR: case M_USSR:
@ -509,29 +445,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
register_unicode(0x2014); // — register_unicode(0x2014); // —
} }
return false; return false;
case M_LMHYP:
case M_EHYPR:
(keycode = M_LMHYP) ? (record->event.pressed) ? layer_on(_ARROW) : layer_off(_ARROW) : NULL;
meh_hyper(record->event.pressed);
return false;
case M_SFTY:
if(record->event.pressed){
num_extra_flashes_off = (shifty) ? 1 : 0;
shifty = !shifty;
flash_color = underglow;
flash_state = flash_off;
return false;
}
case M_AEST:
if(record->event.pressed){
num_extra_flashes_off = (aesthetic) ? 1 : 0;
aesthetic = !aesthetic;
flash_color = underglow;
flash_state = flash_off;
return false;
}
default: default:
if (record->event.pressed) { if (record->event.pressed) {

View File

@ -4,14 +4,12 @@
#define EECONFIG_USERSPACE (uint8_t *)20 #define EECONFIG_USERSPACE (uint8_t *)20
#define SYMBOL MO(1) #define SYMBOL MO(_SYMBOL)
#define MEDIA MO(2) #define MEDIA MO(_MEDIA)
#define ARROW MO(3) #define ARROW MO(_ARROW)
#define FUNCT MO(4) #define FUNCT MO(_FUNCT)
#define KEEB MO(5) #define KEEB MO(_KEEB)
#define HITBOX TT(_HITBOX)
#define L_BIT_MEH MOD_BIT(KC_LCTL) | MOD_BIT(KC_LALT) | MOD_BIT(KC_LSFT)
#define L_BIT_HYPR MOD_BIT(KC_LCTL) | MOD_BIT(KC_LGUI) | MOD_BIT(KC_LALT) | MOD_BIT(KC_LSFT)
#define LED_FLASH_DELAY 150 #define LED_FLASH_DELAY 150
@ -30,6 +28,7 @@ enum {
_ARROW, _ARROW,
_FUNCT, _FUNCT,
_KEEB, _KEEB,
_HITBOX,
}; };
typedef enum { typedef enum {
@ -68,10 +67,6 @@ enum custom_keycodes {
M_OS, M_OS,
M_DASH, M_DASH,
M_USSR, M_USSR,
M_EHYPR,
M_LMHYP,
M_SFTY,
M_AEST,
}; };
void velocikey_accelerate(void); void velocikey_accelerate(void);