Update layer output code based on mtei's suggestion/code

This commit is contained in:
Drashna Jaelre 2019-03-28 12:22:57 -07:00
parent d709e01fb9
commit 036d347db3
No known key found for this signature in database
GPG Key ID: 4C4221222CD5F9F0
3 changed files with 13 additions and 11 deletions

View File

@ -22,9 +22,9 @@ extern uint8_t is_master;
// Layer names don't all need to be of the same length, obviously, and you can also skip them // Layer names don't all need to be of the same length, obviously, and you can also skip them
// entirely and just use numbers. // entirely and just use numbers.
#define _QWERTY 0 #define _QWERTY 0
#define _LOWER 1 #define _LOWER 3
#define _RAISE 2 #define _RAISE 4
#define _ADJUST 3 #define _ADJUST 16
enum custom_keycodes { enum custom_keycodes {
QWERTY = SAFE_RANGE, QWERTY = SAFE_RANGE,
@ -240,3 +240,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
} }
return true; return true;
} }

View File

@ -22,9 +22,9 @@ extern uint8_t is_master;
// Layer names don't all need to be of the same length, obviously, and you can also skip them // Layer names don't all need to be of the same length, obviously, and you can also skip them
// entirely and just use numbers. // entirely and just use numbers.
#define _QWERTY 0 #define _QWERTY 0
#define _LOWER 1 #define _LOWER 3
#define _RAISE 2 #define _RAISE 4
#define _ADJUST 3 #define _ADJUST 16
enum custom_keycodes { enum custom_keycodes {
QWERTY = SAFE_RANGE, QWERTY = SAFE_RANGE,
@ -241,3 +241,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
} }
return true; return true;
} }

View File

@ -3,11 +3,11 @@
#include <stdio.h> #include <stdio.h>
#include "crkbd.h" #include "crkbd.h"
#define L_BASE 0 #define L_BASE 0
#define L_LOWER 2 #define L_LOWER (1<<_LOWER)
#define L_RAISE 4 #define L_RAISE (1<<_RAISE)
#define L_ADJUST 8 #define L_ADJUST (1<<_ADJUST)
#define L_ADJUST_TRI 14 #define L_ADJUST_TRI (L_ADJUST|L_RAISE|L_LOWER)
char layer_state_str[24]; char layer_state_str[24];