[Keymap] Update Xulkal user code (#5920)
This commit is contained in:
		
							parent
							
								
									f11fde9bf5
								
							
						
					
					
						commit
						a0d6c5a113
					
				
					 3 changed files with 20 additions and 64 deletions
				
			
		| 
						 | 
				
			
			@ -5,6 +5,7 @@
 | 
			
		|||
#undef TAPPING_TERM
 | 
			
		||||
#define TAPPING_TERM 175
 | 
			
		||||
 | 
			
		||||
#define SPACE_CADET_MODIFIER_CARRYOVER
 | 
			
		||||
#define LSPO_KEYS KC_LSFT, KC_TRNS, KC_LBRC
 | 
			
		||||
#define RSPC_KEYS KC_RSFT, KC_TRNS, KC_RBRC
 | 
			
		||||
#define LCPO_KEYS KC_LCTL, KC_TRNS, KC_MINS
 | 
			
		||||
| 
						 | 
				
			
			@ -27,12 +28,3 @@
 | 
			
		|||
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
 | 
			
		||||
#define DISABLE_RGB_MATRIX_SPLASH
 | 
			
		||||
#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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -15,47 +15,15 @@ qk_tap_dance_action_t tap_dance_actions[] = {
 | 
			
		|||
extern void eeconfig_update_rgb_matrix_default(void);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifdef TRILAYER_ENABLED
 | 
			
		||||
uint32_t layer_state_set_user(uint32_t state) {
 | 
			
		||||
  return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
 | 
			
		||||
}
 | 
			
		||||
#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;
 | 
			
		||||
    case GAME:
 | 
			
		||||
#ifndef GAMELAYER_DISABLE
 | 
			
		||||
      if (record->event.pressed) {
 | 
			
		||||
        set_single_persistent_default_layer(_GAME);
 | 
			
		||||
      }
 | 
			
		||||
#endif
 | 
			
		||||
      return false;
 | 
			
		||||
    case LOWER:
 | 
			
		||||
      if (record->event.pressed) {
 | 
			
		||||
        layer_on(_LOWER);
 | 
			
		||||
#ifdef TRILAYER_ENABLED
 | 
			
		||||
        update_tri_layer(_LOWER, _RAISE, _ADJUST);
 | 
			
		||||
#endif
 | 
			
		||||
      } else {
 | 
			
		||||
        layer_off(_LOWER);
 | 
			
		||||
#ifdef TRILAYER_ENABLED
 | 
			
		||||
        update_tri_layer(_LOWER, _RAISE, _ADJUST);
 | 
			
		||||
#endif
 | 
			
		||||
      }
 | 
			
		||||
      return false;
 | 
			
		||||
    case RAISE:
 | 
			
		||||
      if (record->event.pressed) {
 | 
			
		||||
        layer_on(_RAISE);
 | 
			
		||||
#ifdef TRILAYER_ENABLED
 | 
			
		||||
        update_tri_layer(_LOWER, _RAISE, _ADJUST);
 | 
			
		||||
#endif
 | 
			
		||||
      } else {
 | 
			
		||||
        layer_off(_RAISE);
 | 
			
		||||
#ifdef TRILAYER_ENABLED
 | 
			
		||||
        update_tri_layer(_LOWER, _RAISE, _ADJUST);
 | 
			
		||||
#endif
 | 
			
		||||
      }
 | 
			
		||||
      return false;
 | 
			
		||||
    case RGBRST:
 | 
			
		||||
#if defined(RGBLIGHT_ENABLE)
 | 
			
		||||
        if (record->event.pressed) {
 | 
			
		||||
| 
						 | 
				
			
			@ -79,20 +47,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
 | 
			
		|||
      return false;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  return process_record_keymap(keycode, record) &&
 | 
			
		||||
#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
 | 
			
		||||
    process_record_rgb(keycode, record) &&
 | 
			
		||||
#endif // RGBLIGHT_ENABLE;
 | 
			
		||||
    true;
 | 
			
		||||
  return process_record_keymap(keycode, record);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
__attribute__ ((weak))
 | 
			
		||||
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
 | 
			
		||||
  return true;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
__attribute__ ((weak))
 | 
			
		||||
bool process_record_rgb(uint16_t keycode, keyrecord_t *record) {
 | 
			
		||||
  return true;
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -4,6 +4,17 @@
 | 
			
		|||
#define RIS_ESC  LT(_RAISE, KC_ESC)
 | 
			
		||||
#define RIS_CAPS LT(_RAISE, KC_CAPS)
 | 
			
		||||
 | 
			
		||||
#define QWERTY DF(_QWERTY)
 | 
			
		||||
 | 
			
		||||
#ifndef GAMELAYER_DISABLE
 | 
			
		||||
#define GAME DF(_GAME)
 | 
			
		||||
#else
 | 
			
		||||
#define GAME KC_TRANSPARENT
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#define LOWER MO(_LOWER)
 | 
			
		||||
#define RAISE MO(_RAISE)
 | 
			
		||||
 | 
			
		||||
#ifdef TAP_DANCE_ENABLE
 | 
			
		||||
#include "process_tap_dance.h"
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -42,12 +53,7 @@ enum layer_number {
 | 
			
		|||
};
 | 
			
		||||
 | 
			
		||||
enum custom_keycodes {
 | 
			
		||||
  QWERTY = SAFE_RANGE,
 | 
			
		||||
  GAME,
 | 
			
		||||
  LOWER,
 | 
			
		||||
  RAISE,
 | 
			
		||||
  RGBRST
 | 
			
		||||
  RGBRST = SAFE_RANGE
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
bool process_record_keymap(uint16_t keycode, keyrecord_t *record);
 | 
			
		||||
bool process_record_rgb(uint16_t keycode, keyrecord_t *record);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue