Browse Source

layer defines to enum

pull/1034/head
Jack Humbert 7 years ago
parent
commit
938422ce99
2 changed files with 19 additions and 13 deletions
  1. +10
    -7
      keyboards/planck/keymaps/default/keymap.c
  2. +9
    -6
      keyboards/preonic/keymaps/default/keymap.c

+ 10
- 7
keyboards/planck/keymaps/default/keymap.c View File

@ -14,13 +14,16 @@ extern keymap_config_t keymap_config;
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
// Layer names don't all need to be of the same length, obviously, and you can also skip them
// entirely and just use numbers.
#define _QWERTY 0
#define _COLEMAK 1
#define _DVORAK 2
#define _LOWER 3
#define _RAISE 4
#define _PLOVER 5
#define _ADJUST 16
enum planck_layers {
_QWERTY,
_COLEMAK,
_DVORAK,
_LOWER,
_RAISE,
_PLOVER,
_ADJUST
};
enum planck_keycodes {
QWERTY = SAFE_RANGE,


+ 9
- 6
keyboards/preonic/keymaps/default/keymap.c View File

@ -9,12 +9,15 @@
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
// Layer names don't all need to be of the same length, obviously, and you can also skip them
// entirely and just use numbers.
#define _QWERTY 0
#define _COLEMAK 1
#define _DVORAK 2
#define _LOWER 3
#define _RAISE 4
#define _ADJUST 16
enum preonic_layers {
_QWERTY,
_COLEMAK,
_DVORAK,
_LOWER,
_RAISE,
_ADJUST
};
enum preonic_keycodes {
QWERTY = SAFE_RANGE,


Loading…
Cancel
Save