Skip to content

Commit

Permalink
Xulkal Keymap Changes (qmk#5861)
Browse files Browse the repository at this point in the history
  • Loading branch information
XScorpion2 authored and mechmerlin committed May 13, 2019
1 parent 8e3cbe0 commit 9b46fab
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 11 deletions.
2 changes: 1 addition & 1 deletion keyboards/sol/keymaps/xulkal/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RGBLIGHT_ENABLE = no # Enable global lighting effects. Do not enable
RGBLIGHT_ANIMATIONS = no # LED animations
LED_MIRRORED = no # Mirror LEDs across halves (enable DIP 1 on slave, and DIP 2 and 3 on master)
RGB_MATRIX_ENABLE = WS2812 # Enable per-key coordinate based RGB effects. Do not enable with RGBlight (+8500)
RGB_MATRIX_KEYPRESSES = yes # Enable reactive per-key effects. Can be very laggy (+1500)
RGB_MATRIX_KEYPRESSES = no # Enable reactive per-key effects. Can be very laggy (+1500)
RGBLIGHT_FULL_POWER = no # Allow maximum RGB brightness. Otherwise, limited to a safe level for a normal USB-A port
UNICODE_ENABLE = no # Unicode
SWAP_HANDS_ENABLE = no # Enable one-hand typing
Expand Down
17 changes: 14 additions & 3 deletions users/xulkal/config.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#pragma once

#ifndef TAPPING_FORCE_HOLD
#define TAPPING_FORCE_HOLD
#endif // TAPPING_FORCE_HOLD
#undef TAPPING_FORCE_HOLD

#undef TAPPING_TERM
#define TAPPING_TERM 175
Expand All @@ -12,6 +10,17 @@
#define LCPO_KEYS KC_LCTL, KC_TRNS, KC_MINS
#define RCPC_KEYS KC_RCTL, KC_TRNS, KC_EQL

// Running out of firmware space
#if defined(__AVR__)
#undef RGB_MATRIX_KEYPRESSES
#undef RGB_MATRIX_KEYRELEASES
#undef RGB_MATRIX_FRAMEBUFFER_EFFECTS
#else
#define RGB_MATRIX_KEYPRESSES
#undef RGB_MATRIX_KEYRELEASES
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#endif

// No need for the single versions when multi performance isn't a problem =D
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
Expand All @@ -20,8 +29,10 @@
#define DISABLE_RGB_MATRIX_SOLID_SPLASH

// Don't like or feel to identical to other effects
#if defined(__AVR__)
#define DISABLE_RGB_MATRIX_RAINBOW_BEACON
#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
#define DISABLE_RGB_MATRIX_DIGITAL_RAIN
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
#endif
4 changes: 2 additions & 2 deletions users/xulkal/layouts.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | | | | | | | | | | | | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | | | | | | | | | PREV | VOL- | VOL+ | NEXT | PLAY |
* | | | | | | | | | PREV | VOL+ | VOL- | NEXT | PLAY |
* `-----------------------------------------' `-----------------------------------------'
*/

Expand All @@ -64,7 +64,7 @@
#define __________________RAISE_R2_________________ _______, KC_INS, KC_HOME, KC_PGUP, KC_PSCR, _______
#define __________________RAISE_R3_________________ _______, KC_DEL, KC_END, KC_PGDN, KC_SLCK, _______
#define __________________RAISE_R4_________________ _______, _______, _______, _______, _______, _______
#define __________________RAISE_R5_________________ _______, KC_MPRV, KC_MPRV, KC_VOLD, KC_MNXT, KC_MPLY
#define __________________RAISE_R5_________________ _______, KC_MPRV, KC_VOLU, KC_VOLD, KC_MNXT, KC_MPLY

/* LOWER Layout
* ,-----------------------------------------. ,-----------------------------------------.
Expand Down
15 changes: 10 additions & 5 deletions users/xulkal/process_records.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,20 @@ extern void eeconfig_update_rgb_matrix_default(void);
#endif

bool process_record_user(uint16_t keycode, keyrecord_t *record) {
static uint16_t reset_timer;
switch (keycode) {
case QWERTY:
if (record->event.pressed) {
set_single_persistent_default_layer(_QWERTY);
}
return false;
break;
case GAME:
#ifndef GAMELAYER_DISABLE
if (record->event.pressed) {
set_single_persistent_default_layer(_GAME);
}
#endif
return false;
break;
case LOWER:
if (record->event.pressed) {
layer_on(_LOWER);
Expand All @@ -44,7 +43,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#endif
}
return false;
break;
case RAISE:
if (record->event.pressed) {
layer_on(_RAISE);
Expand All @@ -58,7 +56,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#endif
}
return false;
break;
case RGBRST:
#if defined(RGBLIGHT_ENABLE)
if (record->event.pressed) {
Expand All @@ -71,7 +68,15 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
#endif
return false;
break;
case RESET:
if (record->event.pressed) {
reset_timer = timer_read();
} else {
if (timer_elapsed(reset_timer) >= 500) {
reset_keyboard();
}
}
return false;
}

return process_record_keymap(keycode, record) &&
Expand Down

0 comments on commit 9b46fab

Please sign in to comment.