[Keymap] Jonavin userspace keymap updates INVERT_NUMLOCK_INDICATOR (#14880)

Co-authored-by: Jonavin <=>
This commit is contained in:
jonavin 2021-10-23 02:04:08 -04:00 committed by GitHub
parent 09daafd489
commit 443d306827
Failed to generate hash of commit
14 changed files with 93 additions and 25 deletions

View file

@ -23,6 +23,7 @@
#define GRAVE_ESC_CTRL_OVERRIDE // Always send Escape if Control is pressed
#define TAPPING_TERM 180
#define TAPPING_TERM_PER_KEY
#ifdef RGB_MATRIX_ENABLE
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR

View file

@ -341,6 +341,18 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
};
uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case KC_SFTUP:
return 300;
case KC_RAISESPC:
case KC_LOWERSPC:
return 450;
default:
return TAPPING_TERM;
}
}
// Turn on/off NUM LOCK if current state is different
void activate_numlock(bool turn_on) {
if (IS_HOST_LED_ON(USB_LED_NUM_LOCK) != turn_on) {

View file

@ -55,6 +55,10 @@ enum custom_user_keycodes {
#define CT_PGDN RCTL(KC_PGDN)
#define CT_HOME RCTL(KC_HOME)
#define CT_END RCTL(KC_END)
#define KC_SFTUP RSFT_T(KC_UP) // Shift when held, Up arrow when tapped
#define KC_RAISESPC LT(_RAISE,KC_SPC) // _RAISE layer mod when held, space when tapped
#define KC_LOWERSPC LT(_LOWER,KC_SPC) // _LOWER layer mod when held, space when tapped
#ifdef TD_LSFT_CAPSLOCK_ENABLE
// Tap Dance Definitions

View file

@ -32,6 +32,9 @@ KEYCODES:
- CT_PGDN Ctrl-PgDn
- CT_HOME Ctrl-HOme
- CT_END Ctrl-End
- KC_SFTUP RShift when held, Up arrow when tapped
- KC_RAISESPC _RAISE layer mod when held, space when tapped
- KC_LOWERSPC _LOWER layer mod when held, space when tapped
-
When EMOTICON_ENABLE = yes
- EMO_SHRUG `\_("/)_/`
@ -39,6 +42,7 @@ KEYCODES:
- EMD_TEARS (T_T)
- EMO_NERVOUS (~_~;)
- EMO_JOY (^o^)
- EMO_SAD :'-(
AVAILABLE ENCODER ACTIONS:
@ -79,7 +83,15 @@ IDLE_TIMEOUT_ENABLE = yes
- Enables Timer functionality; for RGB idle timeouts that can be changed dynamically
- When enabled, use this in the keymap for an additional matrix processing: void matrix_scan_keymap(void)
- Functions:
EMOTICON_ENABLE
- adds EMO_ keycodes for text emojis
INVERT_NUMLOCK_INDICATOR
- inverts the Num lock indicator, LED is on when num lock is off
FUNCTIONS
------------------------
- u16int_t get_timeout_threshold(void) // returns the current timeout threshold
- void timeout_update_threshold(bool increase) // change threshold: true = increase, false = decrease
- void timeout_reset_timer(void) // resets timer (put in process_record_user if you override it)

View file

@ -17,3 +17,6 @@ endif
ifeq ($(strip $(EMOTICON_ENABLE)), yes)
OPT_DEFS += -DEMOTICON_ENABLE
endif
ifeq ($(strip $(INVERT_NUMLOCK_INDICATOR)), yes)
OPT_DEFS += -DINVERT_NUMLOCK_INDICATOR
endif