forked from mirrors/qmk_userspace
[Keyboard] Added via support for orthocode (#15777)
This commit is contained in:
parent
372c9102e2
commit
cd12b54650
7 changed files with 140 additions and 6 deletions
|
@ -15,6 +15,36 @@
|
|||
*/
|
||||
#include "orthocode.h"
|
||||
|
||||
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||
if (!process_record_user(keycode, record)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool shiftspace_mods = false;
|
||||
switch (keycode) {
|
||||
case SHIFTSPACE:
|
||||
if (record->event.pressed) {
|
||||
if(get_mods() & MOD_BIT(KC_RSFT)) {
|
||||
register_code(KC_MINS);
|
||||
shiftspace_mods = true;
|
||||
}
|
||||
else {
|
||||
register_code(KC_SPC);
|
||||
}
|
||||
} else {
|
||||
if (shiftspace_mods) {
|
||||
unregister_code(KC_MINS);
|
||||
shiftspace_mods = false;
|
||||
} else {
|
||||
unregister_code(KC_SPC);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) { return false; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue