mirror of
https://github.com/qmk/qmk_firmware
synced 2024-11-19 11:46:08 +00:00
0c03811d6a
* add userspace and atreus keymap * cleaning up notes/comments * Update keyboards/atreus/keymaps/ridingqwerty/atreus.c Co-Authored-By: Joel Challis <git@zvecr.com> * Update keyboards/atreus/keymaps/ridingqwerty/atreus.c Co-Authored-By: Joel Challis <git@zvecr.com> * Create readme.md * remove reference to matrix_init_kb from atreus.c * correct atreus.c * remove unnecessary defines * merge register/unregister sequence into single tapcode * move 'LAYOUT to keymap.c; remove atreus.h * remove TAPPING_TERM from keyboard-level config.h
33 lines
859 B
C
33 lines
859 B
C
#include "ridingqwerty.h"
|
|
|
|
__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;
|
|
}
|
|
|
|
uint16_t user_key_timer;
|
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|
switch(keycode) {
|
|
case RG_QUOT:
|
|
if (record->event.pressed) {
|
|
user_key_timer = timer_read();
|
|
layer_on(_NUMBER);
|
|
register_mods(MOD_BIT(KC_RGUI));
|
|
} else {
|
|
unregister_mods(MOD_BIT(KC_RGUI));
|
|
layer_off(_NUMBER);
|
|
if (timer_elapsed(user_key_timer) < TAPPING_TERM) {
|
|
register_code(KC_QUOT);
|
|
unregister_code(KC_QUOT);
|
|
}
|
|
}
|
|
return false; break;
|
|
}
|
|
return process_record_keymap(keycode, record) &&
|
|
process_record_secrets(keycode, record);
|
|
}
|