Add files via upload
This commit is contained in:
parent
41ee8332d1
commit
885b3154f2
15 changed files with 2044 additions and 0 deletions
60
users/smathev/process_records.c
Normal file
60
users/smathev/process_records.c
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
#include "smathev.h"
|
||||
#include "casemodes.h"
|
||||
#include "autoshift.c"
|
||||
|
||||
// for alternating between 45 degree angle routing and free angle routing with one key
|
||||
bool kicad_free_angle_routing = false;
|
||||
|
||||
__attribute__((weak)) bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { return true; }
|
||||
|
||||
__attribute__((weak)) bool process_record_secrets(uint16_t keycode, keyrecord_t *record) { return true; }
|
||||
|
||||
// Defines actions tor my global custom keycodes. Defined in smathev.h file
|
||||
// Then runs the _keymap's record handler if not processed here
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
#ifdef CASEMODES_ENABLE
|
||||
// Process case modes
|
||||
if (!process_case_modes(keycode, record)) {
|
||||
return false;
|
||||
}
|
||||
// If console is enabled, it will print the matrix position and status of each key pressed
|
||||
#endif
|
||||
|
||||
if (!(process_record_keymap(keycode, record) && process_record_secrets(keycode, record))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
switch (keycode) {
|
||||
case C_CAPSWORD:
|
||||
// NOTE: if you change this behavior, may want to update in keymap.c for COMBO behavior
|
||||
#ifdef CASEMODES_ENABLE
|
||||
if (record->event.pressed) {
|
||||
enable_caps_word();
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case C_HYPHENCASE:
|
||||
#ifdef CASEMODES_ENABLE
|
||||
if (record->event.pressed) {
|
||||
enable_xcase_with(KC_MINS);
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case C_ANYCASE:
|
||||
#ifdef CASEMODES_ENABLE
|
||||
if (record->event.pressed) {
|
||||
enable_xcase();
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case C_UNDERSCORECASE:
|
||||
#ifdef CASEMODES_ENABLE
|
||||
if (record->event.pressed) {
|
||||
enable_xcase_with(KC_UNDS);
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
// COMMENT TO DISABLE MACROS
|
||||
}
|
||||
return true;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue