summaryrefslogtreecommitdiff
path: root/keyboards/redox/keymaps/jeherve/keymap.c
diff options
context:
space:
mode:
authorMattia Dal Ben <mattdibi@users.noreply.github.com>2018-10-27 18:40:28 +0200
committerDrashna Jaelre <drashna@live.com>2018-10-27 09:40:28 -0700
commit9ea01035202e0d9b43413537702ac77b4c32108c (patch)
treeb1aa46898c47b6bd994a2ca490512ff36d704802 /keyboards/redox/keymaps/jeherve/keymap.c
parent569545a78f24644b1b130369d53932f7f46a588a (diff)
Keyboard: Redox keymaps refactoring (#4258)
* Reconfigured keymap macro to resemble physical layout * Updated italian keymap * Added RGB controls * Updated default keymap * Updated german layout * Updated jeherve keymap * Changed include guards to pragmas * Changed include guards to pragmas in keymaps * Update readme * Fixed unused include * Fixed indentation
Diffstat (limited to 'keyboards/redox/keymaps/jeherve/keymap.c')
-rw-r--r--keyboards/redox/keymaps/jeherve/keymap.c179
1 files changed, 77 insertions, 102 deletions
diff --git a/keyboards/redox/keymaps/jeherve/keymap.c b/keyboards/redox/keymaps/jeherve/keymap.c
index d298fa9a31..f8dfc4854c 100644
--- a/keyboards/redox/keymaps/jeherve/keymap.c
+++ b/keyboards/redox/keymaps/jeherve/keymap.c
@@ -28,11 +28,6 @@ enum custom_keycodes {
NBSP
};
-// Fillers to make layering more clear
-#define KC_ KC_TRNS
-#define _______ KC_TRNS
-#define XXXXXXX KC_NO
-
// Make macros a bit simpler with this shortcut.
#define TAP_ONCE(code) \
register_code (code); \
@@ -129,118 +124,98 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
};
+// Shortcut to make keymap more readable
+#define KC_CTDN LCTL(KC_DOWN)
+#define KC_SYQT LT(_SYMB,KC_QUOT)
+#define SYM_L MO(_SYMB)
+#define MO_INTR MO(_INTER)
+#define TT_ADJ TT(_ADJUST)
+
+#define UC_00E0 UC(0x00E0)
+#define UC_00FC UC(0x00FC)
+#define UC_00E8 UC(0x00E8)
+#define UC_00F6 UC(0x00F6)
+#define UC_00E1 UC(0x00E1)
+#define UC_00F9 UC(0x00F9)
+#define UC_00E9 UC(0x00E9)
+#define UC_00ED UC(0x00ED)
+#define UC_00F3 UC(0x00F3)
+#define UC_00E2 UC(0x00E2)
+#define UC_00E7 UC(0x00E7)
+#define UC_0171 UC(0x0171)
+#define UC_00EA UC(0x00EA)
+#define UC_0151 UC(0x0151)
+
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-/* COLEMAK
- * ,------------------------------------------------. ,------------------------------------------------.
- * | ` | 1 | 2 | 3 | 4 | 5 | Esc | | Exp | 6 | 7 | 8 | 9 | 0 | = |
- * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
- * | Tab | Q | W | F | P | G | ( | | ) | J | L | U | Y | ; | \ |
- * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
- * | Lay1 | A | R | S | T | D | Lay2 | | Lay2 | H | N | E | I | O |'/Lay1|
- * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
- * | Shift| Z | X | C | V | B | Lay1 | | Lay1 | K | M | , | . | / |Shift |
- * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
- * | Lay3 | Ctrl | Hyper| Alt | Cmd |Bcksp | Ctrl | |Enter |Space | Cmd | Lay4 | Hyper| Ctrl | Lay3 |
- * `------------------------------------------------' `------------------------------------------------'
- */
[_COLEMAK] = LAYOUT(
- //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
- KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 ,KC_ESC, LCTL(KC_DOWN), KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_EQL,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- KC_TAB , KC_Q , KC_W , KC_F , KC_P , KC_G , M_BRACKET_LEFT, M_BRACKET_RIGHT , KC_J , KC_L , KC_U , KC_Y , KC_SCLN , KC_BSLS,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- MO(_SYMB) , KC_A , KC_R , KC_S , KC_T , KC_D ,TT(_NAV), TT(_NAV) , KC_H , KC_N , KC_E , KC_I , KC_O , LT(_SYMB,KC_QUOT),
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- KC_LSFT , KC_Z , KC_X , KC_C , KC_V , KC_B ,TT(_SYMB), TT(_SYMB) , KC_K , KC_M , KC_COMM , KC_DOT , KC_SLSH , KC_RSFT,
- //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
- MO(_INTER),KC_LCTL,KC_HYPR,KC_LALT, KC_LCMD, KC_BSPC,KC_LCTL, KC_ENT,KC_SPC , KC_RCMD , TT(_ADJUST),KC_HYPR,KC_RCTL,MO(_INTER)
- //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----'
+ //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
+ KC_GRV ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_EQL ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ KC_TAB ,KC_Q ,KC_W ,KC_F ,KC_P ,KC_G ,KC_ESC , KC_CTDN ,KC_J ,KC_L ,KC_U ,KC_Y ,KC_SCLN ,KC_BSLS ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ SYM_L ,KC_A ,KC_R ,KC_S ,KC_T ,KC_D ,M_BRACKET_LEFT, M_BRACKET_RIGHT ,KC_H ,KC_N ,KC_E ,KC_I ,KC_O ,KC_SYQT ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,TT(_NAV),TT(_SYMB), TT(_SYMB),TT(_NAV),KC_K ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSFT ,
+ //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
+ MO_INTR ,KC_LCTL ,KC_HYPR ,KC_LALT , KC_LCMD , KC_BSPC ,KC_LCTL , KC_ENT ,KC_SPC , KC_RCMD , TT_ADJ ,KC_HYPR ,KC_RCTL ,MO_INTR
+ //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
),
-/* Symbols
- * ,------------------------------------------------. ,------------------------------------------------.
- * | | | | | | | | | | | | | | | |
- * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
- * | | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | | |
- * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
- * | | ! | @ | # | $ | % | | | | ^ | & | * | - | _ | |
- * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
- * | | | | | | | | | | | | | | | |
- * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
- * | | | | | | | | | | | | | | | |
- * `------------------------------------------------' `------------------------------------------------'
- */
-
[_SYMB] = LAYOUT(
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_LCBR, KC_RCBR, KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , _______,
- _______, KC_EXLM, KC_AT , KC_HASH, KC_DLR , KC_PERC, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_MINS, KC_UNDS, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
+ _______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ _______ ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_LCBR , KC_RCBR ,KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,_______ ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ _______ ,KC_EXLM ,KC_AT ,KC_HASH ,KC_DLR ,KC_PERC ,_______ , _______ ,KC_CIRC ,KC_AMPR ,KC_ASTR ,KC_MINS ,KC_UNDS ,_______ ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,
+ //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
+ _______ ,_______ ,_______ ,_______ , _______ , _______ ,_______ , _______ ,_______ , _______ , _______ ,_______ ,_______ ,_______
+ //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
),
-/* Navigation
- * ,------------------------------------------------. ,------------------------------------------------.
- * | | | | | | | | | | | | | | | |
- * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
- * | | | | | | | | | | | | | | | |
- * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
- * | | | |VOLDOW|VOL UP| MUTE | | | | LEFT | DOWN | UP |RIGHT | | |
- * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
- * | | | | | | | | | | | | | | | |
- * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
- * | | | | | | | | | | | | | | | |
- * `------------------------------------------------' `------------------------------------------------'
- */
[_NAV] = LAYOUT(
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
- XXXXXXX, XXXXXXX, KC_VOLD, KC_VOLU, KC_MUTE, XXXXXXX, _______, _______, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP , KC_RIGHT, XXXXXXX,
- XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
- _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, _______
+ //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
+ _______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ , _______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ XXXXXXX ,XXXXXXX ,KC_VOLD ,KC_VOLU ,KC_MUTE ,XXXXXXX ,_______ , _______ ,XXXXXXX ,KC_LEFT ,KC_DOWN ,KC_UP ,KC_RIGHT,XXXXXXX ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ , _______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,
+ //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
+ _______ ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,_______ , _______ ,XXXXXXX , XXXXXXX , _______ ,XXXXXXX ,XXXXXXX ,_______
+ //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
),
-/* i18n + emoji
-* ,------------------------------------------------. ,------------------------------------------------.
-* | | | | | | | | | | | | | | | |
-* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
-* | | à | 👋 | | | | | | | | ü | è | YOSHI| ö | |
-* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
-* | | á | |SHRUG | 👍 | | | | | | ú | é | í | ó | |
-* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
-* | | â | | ç | | | | | | | ű | ê | | ő | |
-* |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
-* | | | | | | | | | | | | | | | |
-* `------------------------------------------------' `------------------------------------------------'
-*/
[_INTER] = LAYOUT(
- XXXXXXX, _______ , _______, _______ , _______ , _______, _______, _______, _______, _______, _______, _______, _______, _______,
- XXXXXXX, UC(0x00E0), WAVE , XXXXXXX , XXXXXXX , XXXXXXX, _______, _______, XXXXXXX, UC(0x00FC), UC(0x00E8), YOSHI, UC(0x00F6), XXXXXXX,
- _______, UC(0x00E1), XXXXXXX, SHRUG , THUMB_UP, XXXXXXX, _______, _______, XXXXXXX, UC(0x00F9), UC(0x00E9), UC(0x00ED) , UC(0x00F3), _______,
- XXXXXXX, UC(0x00E2), XXXXXXX, UC(0x00E7), XXXXXXX , XXXXXXX, _______, _______, XXXXXXX, UC(0x0171), UC(0x00EA), XXXXXXX, UC(0x0151), XXXXXXX,
- _______, XXXXXXX , XXXXXXX, XXXXXXX , XXXXXXX , XXXXXXX, _______, _______, NBSP, XXXXXXX, _______, XXXXXXX, XXXXXXX, _______
+ //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
+ XXXXXXX ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ XXXXXXX ,UC_00E0 ,WAVE ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ , _______ ,XXXXXXX ,UC_00FC ,UC_00E8 ,YOSHI ,UC_00F6 ,XXXXXXX ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ _______ ,UC_00E1 ,XXXXXXX ,SHRUG ,THUMB_UP,XXXXXXX ,_______ , _______ ,XXXXXXX ,UC_00F9 ,UC_00E9 ,UC_00ED ,UC_00F3 ,_______ ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ XXXXXXX ,UC_00E2 ,XXXXXXX ,UC_00E7 ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ , _______ ,XXXXXXX ,XXXXXXX ,UC_0171 ,UC_00EA ,XXXXXXX ,UC_0151 ,XXXXXXX ,
+ //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
+ _______ ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,_______ , _______ ,NBSP , XXXXXXX , _______ ,XXXXXXX ,XXXXXXX ,_______
+ //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
),
-/* Adjust keyboard settings
- * ,------------------------------------------------. ,------------------------------------------------.
- * | | | | | | | | | | | | | | | |
- * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
- * | | | | | | | | | | | | | | | |
- * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
- * | | | RGB- | RGB+ |RGB ON| | | | | | RESET| DEBUG|AUD ON| | |
- * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
- * | | | | | | | | | | | | | | | |
- * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
- * | | | | | | | | | | | | | | | |
- * `------------------------------------------------' `------------------------------------------------'
- */
[_ADJUST] = LAYOUT(
- XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
- XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
- _______, XXXXXXX, RGB_VAD, RGB_VAI, RGB_TOG, XXXXXXX, _______, _______, XXXXXXX, RESET , DEBUG , AU_TOG , XXXXXXX, _______,
- XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
- _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, _______
+ //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
+ XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ _______ ,XXXXXXX ,RGB_VAD ,RGB_VAI ,RGB_TOG ,XXXXXXX ,_______ , _______ ,XXXXXXX ,RESET ,DEBUG ,AU_TOG ,XXXXXXX ,_______ ,
+ //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
+ XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ , _______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,
+ //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
+ _______ ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,_______ , _______ ,XXXXXXX , XXXXXXX , _______ ,XXXXXXX ,XXXXXXX ,_______
+ //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
)
};