From 2d5c16dfd4ef193c4f692722157aa2b526a4c877 Mon Sep 17 00:00:00 2001 From: Olivier Poitrey Date: Tue, 7 May 2019 10:43:08 -0700 Subject: [Keymap] crkbd/keymaps/rs: add rs keymap to corne keyboard and adapt others (#5181) Update all my keymaps to work with 40 keys. Refactor code using Userspace. --- layouts/community/ortho_5x12/rs/keymap.c | 48 +++++++++++++++----------------- 1 file changed, 23 insertions(+), 25 deletions(-) (limited to 'layouts/community/ortho_5x12/rs/keymap.c') diff --git a/layouts/community/ortho_5x12/rs/keymap.c b/layouts/community/ortho_5x12/rs/keymap.c index e4e590669f..15cbabaac1 100644 --- a/layouts/community/ortho_5x12/rs/keymap.c +++ b/layouts/community/ortho_5x12/rs/keymap.c @@ -1,19 +1,5 @@ #include QMK_KEYBOARD_H - -enum layers { - _QWERTY, - _HYPER, -}; - -#define KC_ KC_TRNS - -#define KC_ESCC MT(MOD_LCTL, KC_ESC) -#define KC_RST RESET -#define KC_BSPH LT(_HYPER, KC_BSPC) -#define KC_ENTS MT(MOD_LSFT, KC_ENT) -// Brightness -#define KC_BRUP KC_PAUS -#define KC_BRDN KC_SLCK +#include "rs.h" // Used to create a keymap using only KC_ prefixed keys #ifndef LAYOUT_kc @@ -34,7 +20,6 @@ enum layers { #endif const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = LAYOUT_kc( \ // ,-----------------------------------------------------------------------------------. GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , MINS , @@ -45,21 +30,34 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // |------+------+------+------+------+------+------+------+------+------+------+------| LSFT , Z , X , C , V , B , N , M , COMM , DOT , SLSH , ENTS , // |------+------+------+------+------+------+------+------+------+------+------+------| - , LCTL , LALT , LGUI , SPC , SPC , BSPC , BSPH , LEFT , DOWN , UP , RGHT + , , LCTL , LALT , LGUI , SPC , SPC , BCOD , FN , , LEFT , RGHT // `---------------------------------------------------+-------------------------------' - ), // | - // | - [_HYPER] = LAYOUT_kc( /* V */ \ + ), + [_CODE] = LAYOUT_kc( + // ,-----------------------------------------------------------------------------------. + , , , , , , , , , , , , + // |------+------+------+------+------+------+------+------+------+------+------+------| + GRV , EXLM , AT , HASH , DLR , PERC , CIRC , LPLT , ASTR , RPGT , NEQL , , + // |------+------+------+------+------+------+------+------+------+------+------+------| + , 1 , 2 , 3 , 4 , 5 , MINS , LBRC , UP , RBRC , , BSLS , + // |------+------+------+------+------+------+------+------+------+------+------+------| + , 6 , 7 , 8 , 9 , 0 , AMPR , LEFT , DOWN , RGHT , , PIPE , + // |------+------+------+------+------+------+------+------+------+------+------+------| + , , , , , DOT , , , , , , + // `-----------------------------------------------------------------------------------' + ), + [_FN] = LAYOUT_kc( // ,-----------------------------------------------------------------------------------. - RST , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , LBRC , RBRC , , + , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 , F10 , F11 , // |------+------+------+------+------+------+------+------+------+------+------+------| - , , , PGUP , , , , , UP , LCBR , RCBR , BSLS , + , , , , , , , , , , , , // |------+------+------+------+------+------+------+------+------+------+------+------| - , , HOME , PGDN , END , , MINS , LEFT , DOWN , RGHT , , PIPE , + BLTG , BLUP , , , , BRMU , VOLU , , PGUP , , , , // |------+------+------+------+------+------+------+------+------+------+------+------| - , , , , , , , , , BRDN , BRUP , , + BLTG , BLDN , , , RST , BRMD , VOLD , CTRA , PGDN , CTRE , , , // |------+------+------+------+------+------+------+------+------+------+------+------| - , , , , , , , , MUTE , VOLD , VOLU , MPLY + , , , , , , MUTE , , , , , // `-----------------------------------------------------------------------------------' ), }; + -- cgit v1.2.3