1
0
Fork 0

[Keymap] Arkag Userspace Update (#5438)

* fresh commit for a new fork for PR to upstream/master

* gaming mode added, lighting changes for other modes

* rules.mk fixed...

* fixed collision issue with aesthetic and shifty modes

* fixed collision issue with aesthetic and shifty modes

* troubleshooting game mode failing

* moved game tapdance key to default layer, fixed issue
This commit is contained in:
Alexander Kagno 2019-03-18 17:31:09 +00:00 committed by Drashna Jaelre
parent 221ac2eabb
commit d7b381128e
4 changed files with 48 additions and 15 deletions

View file

@ -7,14 +7,15 @@
*/ */
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = LAYOUT_2u_space_ortho( [_QWERTY] = LAYOUT_2u_space_ortho(
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, QUOTE, KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, QUOTE,
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,
M_PMOD, LRALT, M_SMOD, LOWER, RAISE, KC_SPC, MEDIA, FUNCT, XXXXXXX, XXXXXXX, KC_LEAD), M_PMOD, LRALT, M_SMOD, LOWER, RAISE, KC_SPC, MEDIA, FUNCT, XXXXXXX, GAME , KC_LEAD),
[_RAISE] = LAYOUT_2u_space_ortho( [_RAISE] = LAYOUT_2u_space_ortho(
GRAVE, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, _______, KC_7, KC_8, KC_9, _______, _______, GRAVE, _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, _______, _______,
_______, OBRACK, CBRACK, KC_EQL, HYPHEN, _______, _______, KC_4, KC_5, KC_6, _______, KC_NLCK, _______, OBRACK, CBRACK, KC_EQL, HYPHEN, _______, _______, KC_4, KC_5, KC_6, _______, KC_NLCK,
_______, _______, _______, CEDILLA, _______, KC_COMM, KC_PDOT, KC_1, KC_2, KC_3, KC_BSLS, KC_PENT, _______, _______, _______, CEDILLA, _______, KC_COMM, KC_PDOT, KC_1, KC_2, KC_3, KC_BSLS, KC_PENT,
_______, _______, _______, KEEB, _______, _______, KC_0, KC_PSLS, KC_PMNS, KC_PPLS, KC_PAST), _______, _______, _______, KEEB, _______, _______, KC_0, KC_PSLS, KC_PMNS, KC_PPLS, KC_PAST),
@ -43,4 +44,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
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, _______, _______, _______,
RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
[_GAMING] = LAYOUT_2u_space_ortho(
KC_ESC, KC_F13, KC_1, KC_2, KC_3, KC_4, KC_5, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
KC_TAB, KC_F14, KC_Q, KC_W, KC_E, KC_R, KC_T, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
KC_LSFT, KC_F15, KC_A, KC_S, KC_D, KC_F, KC_G, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
KC_LCTL, KC_F16, KC_Z, KC_X, KC_C, KC_SPC, XXXXXXX, XXXXXXX, XXXXXXX, GAME, XXXXXXX),
}; };

View file

@ -1,4 +1,4 @@
BOOTMAGIC_ENABLE = full BOOTMAGIC_ENABLE = lite
MOUSEKEY_ENABLE = no MOUSEKEY_ENABLE = no
STENO_ENABLE = no STENO_ENABLE = no
EXTRAKEY_ENABLE = yes EXTRAKEY_ENABLE = yes
@ -6,7 +6,7 @@ CONSOLE_ENABLE = no
COMMAND_ENABLE = no COMMAND_ENABLE = no
SLEEP_LED_ENABLE = no SLEEP_LED_ENABLE = no
NKRO_ENABLE = yes NKRO_ENABLE = yes
BACKLIGHT_ENABLE = yes BACKLIGHT_ENABLE = no
AUDIO_ENABLE = no AUDIO_ENABLE = no
RGBLIGHT_ENABLE = yes RGBLIGHT_ENABLE = yes
TAP_DANCE_ENABLE = yes TAP_DANCE_ENABLE = yes

View file

@ -121,7 +121,7 @@ void check_state (void) {
case sleeping: case sleeping:
if (!slept) { if (!slept) {
rgblight_mode_noeeprom(2); rgblight_mode_noeeprom(5);
slept = true; slept = true;
activated = false; activated = false;
deactivated = false; deactivated = false;
@ -359,6 +359,26 @@ void dance_cbrck (qk_tap_dance_state_t *state, void *user_data) {
} }
} }
void dance_game (qk_tap_dance_state_t *state, void *user_data) {
if (state->count == 1) {
} else if (state->count == 2) {
} else if (state->count == 3) {
uint8_t layer = biton32(layer_state);
if (layer == _QWERTY) {
layer_off(_QWERTY);
layer_on(_GAMING);
// swirling rgb
rgblight_mode_noeeprom(12);
} else {
layer_off(_GAMING);
layer_on(_QWERTY);
rgblight_mode_noeeprom(1);
}
}
}
void matrix_init_user(void) { void matrix_init_user(void) {
current_os = eeprom_read_byte(EECONFIG_USERSPACE); current_os = eeprom_read_byte(EECONFIG_USERSPACE);
set_os(current_os, false); set_os(current_os, false);
@ -379,6 +399,7 @@ void matrix_scan_user(void) {
if (current_os == OS_WIN) { if (current_os == OS_WIN) {
long_keystroke(2, (uint16_t[]){KC_LGUI, KC_PAUSE}); long_keystroke(2, (uint16_t[]){KC_LGUI, KC_PAUSE});
} else { } else {
return;
} }
} }
SEQ_TWO_KEYS(KC_LSFT, M_PMOD) { SEQ_TWO_KEYS(KC_LSFT, M_PMOD) {
@ -442,7 +463,7 @@ void matrix_scan_user(void) {
// end format functions // end format functions
// start fancy functions // start fancy functions
SEQ_THREE_KEYS(KC_C, KC_C, KC_C) { SEQ_THREE_KEYS(KC_C, KC_C, KC_ENT) {
surround_type(6, KC_GRAVE, false); surround_type(6, KC_GRAVE, false);
pri_mod(true); pri_mod(true);
tap_code(KC_V); tap_code(KC_V);
@ -564,30 +585,30 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if(record->event.pressed){ if(record->event.pressed){
if (aesthetic) { if (aesthetic) {
aesthetic = false; aesthetic = false;
num_extra_flashes_off = 1; rgblight_mode_noeeprom(1);
} else { } else {
aesthetic = true; aesthetic = true;
shifty = false;
// snake mode
rgblight_mode_noeeprom(20);
} }
flash_color = underglow;
flash_state = flash_off;
return false; return false;
} }
case M_SFT: case M_SFT:
if(record->event.pressed){ if(record->event.pressed){
if (shifty) { if (shifty) {
shifty = false; shifty = false;
num_extra_flashes_off = 1; rgblight_mode_noeeprom(1);
} else { } else {
shifty = true; shifty = true;
aesthetic = false;
// knight mode
rgblight_mode_noeeprom(23);
} }
flash_color = underglow;
flash_state = flash_off;
return false; return false;
} }
default: default:
if (record->event.pressed) { if (record->event.pressed) {
state = active; state = active;
@ -605,4 +626,5 @@ qk_tap_dance_action_t tap_dance_actions[] = {
[TD_BRCK_PARN_O] = ACTION_TAP_DANCE_FN (dance_obrck), [TD_BRCK_PARN_O] = ACTION_TAP_DANCE_FN (dance_obrck),
[TD_BRCK_PARN_C] = ACTION_TAP_DANCE_FN (dance_cbrck), [TD_BRCK_PARN_C] = ACTION_TAP_DANCE_FN (dance_cbrck),
[TD_LALT_RALT] = ACTION_TAP_DANCE_DOUBLE (KC_LALT, KC_RALT), [TD_LALT_RALT] = ACTION_TAP_DANCE_DOUBLE (KC_LALT, KC_RALT),
[TD_GAME] = ACTION_TAP_DANCE_FN (dance_game),
}; };

View file

@ -14,6 +14,7 @@
#define STRIKE TD(TD_STRK_SHOT) #define STRIKE TD(TD_STRK_SHOT)
#define HYPHEN TD(TD_HYPH_UNDR) #define HYPHEN TD(TD_HYPH_UNDR)
#define CEDILLA TD(TD_C_CED) #define CEDILLA TD(TD_C_CED)
#define GAME TD(TD_GAME)
#define RAISE MO(1) #define RAISE MO(1)
#define LOWER MO(2) #define LOWER MO(2)
@ -40,6 +41,7 @@ enum {
_MEDIA, _MEDIA,
_FUNCT, _FUNCT,
_KEEB, _KEEB,
_GAMING,
}; };
typedef enum { typedef enum {
@ -92,6 +94,7 @@ enum tapdances {
TD_BRCK_PARN_O, TD_BRCK_PARN_O,
TD_BRCK_PARN_C, TD_BRCK_PARN_C,
TD_LALT_RALT, TD_LALT_RALT,
TD_GAME,
}; };
void velocikey_accelerate(void); void velocikey_accelerate(void);
@ -129,6 +132,7 @@ void dance_quot (qk_tap_dance_state_t *state, void *user_data);
void dance_strk (qk_tap_dance_state_t *state, void *user_data); void dance_strk (qk_tap_dance_state_t *state, void *user_data);
void dance_3 (qk_tap_dance_state_t *state, void *user_data); void dance_3 (qk_tap_dance_state_t *state, void *user_data);
void dance_c (qk_tap_dance_state_t *state, void *user_data); void dance_c (qk_tap_dance_state_t *state, void *user_data);
void dance_game (qk_tap_dance_state_t *state, void *user_data);
int cur_dance (qk_tap_dance_state_t *state); int cur_dance (qk_tap_dance_state_t *state);
void spc_finished (qk_tap_dance_state_t *state, void *user_data); void spc_finished (qk_tap_dance_state_t *state, void *user_data);