From f044edbed9b542de573a321628ddd6a3afc348b0 Mon Sep 17 00:00:00 2001 From: Didier Loiseau Date: Sun, 31 Jan 2016 15:30:48 +0100 Subject: [PATCH 01/23] Initial bepo layout based on tm2030 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit No more SFT_T: - moved ] (bépo W) below Tab - moved - (bépo =) in place of ] (top right) - removed SFT_T from ' (bépo M) - moved \ (bépo Ç) in place of = (bépo %) - moved = (bépo %) in place of - (bépo =) --- keyboard/ergodox_ez/keymaps/bepo/keymap.c | 242 ++++++++++++++++++++++ 1 file changed, 242 insertions(+) create mode 100644 keyboard/ergodox_ez/keymaps/bepo/keymap.c diff --git a/keyboard/ergodox_ez/keymaps/bepo/keymap.c b/keyboard/ergodox_ez/keymaps/bepo/keymap.c new file mode 100644 index 0000000000..1fe23a9323 --- /dev/null +++ b/keyboard/ergodox_ez/keymaps/bepo/keymap.c @@ -0,0 +1,242 @@ +/* TypeMatrix-2030-like keymap */ +#include "ergodox_ez.h" +#include "debug.h" +#include "action_layer.h" +#include "led.h" + +#define BASE 0 // default layer +#define DVRK 1 // Dvorak layer +#define NUMR 8 // numeric layer +#define FNLR 9 // fn layer + +#define MDBL0 1 +#define MFNLR 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Basic layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | Del | | Del | 6 | 7 | 8 | 9 | 0 | - | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | Q | W | E | R | T |Backsp| |Backsp| Y | U | I | O | P | [ | + * |--------+------+------+------+------+------|ace | |ace |------+------+------+------+------+--------| + * | ] | A | S | D | F | G |------| |------| H | J | K | L | ; | ' | + * |--------+------+------+------+------+------|Enter | |Enter |------+------+------+------+------+--------| + * | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |LCtrl | fn | LGui | Play |App/Alt| | RAlt | = | Home | \ |End/Ctl| + * `-----------------------------------' `-----------------------------------' + * ,--------------. ,-------------. + * |Esc/Alt| num | | Left |Right | + * ,------+-------+------| |------+------+------. + * | | | PgUp | | Up | | | + * |Space |LShift |------| |------|RShift|Space | + * | | | PgDn | | Down | | | + * `---------------------' `--------------------' + */ +// If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* +[BASE] = KEYMAP( // layer 0 : default + // left hand + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_DELT, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_BSPC, + KC_RBRC, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_ENT, + KC_LCTL, M(MFNLR), KC_LGUI,KC_MPLY,ALT_T(KC_APP), + + ALT_T(KC_ESC), TG(NUMR), + KC_PGUP, + KC_SPC, KC_LSFT, KC_PGDN, + + // right hand + KC_DELT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_BSPC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, + KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_ENT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_RALT, KC_EQL, KC_HOME, KC_BSLS, CTL_T(KC_END), + + KC_LEFT, KC_RGHT, + KC_UP, + KC_DOWN, KC_RSFT, KC_SPC + ), +/* Dvorak layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | Del | | Del | 6 | 7 | 8 | 9 | 0 | = | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | ' | , | . | P | Y |Backsp| |Backsp| F | G | C | R | L | / | + * |--------+------+------+------+------+------|ace | |ace |------+------+------+------+------+--------| + * | LShift | A | O | E | U | I |------| |------| D | H | T | N | S | -/Shift| + * |--------+------+------+------+------+------|Enter | |Enter |------+------+------+------+------+--------| + * | LShift | ; | Q | J | K | X | | | | B | M | W | V | Z | \/Shift| + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |LCtrl | fn | LGui | Play |App/Alt| | RAlt | [ | Home | ] |End/Ctl| + * `-----------------------------------' `-----------------------------------' + * ,--------------. ,-------------. + * |Esc/Alt| num | | Left |Right | + * ,------+-------+------| |------+------+------. + * | | | PgUp | | Up | | | + * |Space |LShift |------| |------|RShift|Space | + * | | | PgDn | | Down | | | + * `---------------------' `--------------------' + */ +// If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* +[DVRK] = KEYMAP( // layer 0 : default + // left hand + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_DELT, + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_BSPC, + KC_LSFT, KC_A, KC_O, KC_E, KC_U, KC_I, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_ENT, + KC_LCTL, M(MFNLR), KC_LGUI, KC_MPLY, ALT_T(KC_APP), + + ALT_T(KC_ESC), TG(NUMR), + KC_PGUP, + KC_SPC, KC_LSFT, KC_PGDN, + + // right hand + KC_DELT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, + KC_BSPC, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, + KC_D, KC_H, KC_T, KC_N, KC_S, SFT_T(KC_MINS), + KC_ENT, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_T(KC_BSLS), + KC_RALT, KC_LBRC, KC_HOME, KC_RBRC, CTL_T(KC_END), + + KC_LEFT, KC_RGHT, + KC_UP, + KC_DOWN, KC_RSFT, KC_SPC + ), +/* Numeric Layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | | | | | Tab | / | * | - | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | F6 | F7 | F8 | F9 | F10 | | | | | Home | 7 | 8 | 9 | + | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | F11 | F12 | | | |------| |------| Up | End | 4 | 5 | 6 | + | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | Left | Down | Right| 1 | 2 | 3 |KpEnter | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | 0 | 00 | . |Etr/Ctl| + * `----------------------------------' `-----------------------------------' + * ,-------------. ,-------------. + * | | | |n.lock|c.lock| + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// SYMBOLS +[NUMR] = KEYMAP( + // left hand + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, + KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS, + KC_TRNS, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS,KC_TRNS, + // right hand + KC_TRNS, KC_F6, KC_F7, KC_TAB, KC_PSLS, KC_PAST, KC_PMNS, + KC_TRNS, KC_TRNS, KC_HOME, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_UP, KC_END, KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_LEFT, KC_DOWN, KC_RGHT, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_TRNS, KC_P0, M(MDBL0),KC_PDOT, CTL_T(KC_PENT), + + KC_NLCK, KC_CAPS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), +/* fn layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | |Insert| |Insert|Eject |Power |Sleep | Wake |PrtScr|ScrollLk| + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | |VolUp | | | | | | | | Pause | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | Calc | Mail |Browsr|------| |------| | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | cut | copy |paste | Mute |VolDn | | | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | Next | | | + * | Mute | |------| |------| | | + * | | | | | Prev | | | + * `--------------------' `--------------------' + */ +// MEDIA AND MOUSE +[FNLR] = KEYMAP( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, + KC_TRNS, KC_TRNS, KC_TRNS, KC_CALC, KC_MAIL, KC_WHOM, + KC_TRNS, KC_TRNS, LSFT(KC_DELT),LCTL(KC_INS),LSFT(KC_INS), KC_MUTE, KC_VOLD, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_MUTE, KC_TRNS, KC_TRNS, + // right hand + KC_INS, KC_EJCT, KC_PWR, KC_SLEP, KC_WAKE, KC_PSCR, KC_SLCK, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PAUS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + + KC_TRNS, KC_TRNS, + KC_MPRV, + KC_MNXT, KC_TRNS, KC_TRNS +), +}; + +const uint16_t PROGMEM fn_actions[] = { +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case MDBL0: + if (record->event.pressed) { + return MACRO( I(25), T(P0), T(P0), END ); + } + break; + case MFNLR: + layer_invert(NUMR); + layer_invert(FNLR); + break; + } + return MACRO_NONE; +}; + +// Runs just one time when the keyboard initializes. +void * matrix_init_user(void) { + return NULL; +}; + +// Runs constantly in the background, in a loop. +void * matrix_scan_user(void) { + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + // led 1: numeric layer + if (layer_state & (1 << NUMR)) { + ergodox_right_led_1_on(); + } + // led 2: Dvorak layer + if (default_layer_state == 1 << DVRK) { + ergodox_right_led_2_on(); + } + // led 3: caps lock + if (host_keyboard_leds() & (1< Date: Sun, 7 Feb 2016 19:29:49 +0100 Subject: [PATCH 02/23] =?UTF-8?q?Use=20B=C3=89PO=20sp=C3=A9cific=20key=20a?= =?UTF-8?q?liases=20with=20BP=5F=20prefix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit keymap_bepo.h: define BP_* keycodes for all possible characters bepo/keymap.c: use those keycodes in the bépo keymap --- keyboard/ergodox_ez/keymaps/bepo/keymap.c | 88 +++++------------------ 1 file changed, 19 insertions(+), 69 deletions(-) diff --git a/keyboard/ergodox_ez/keymaps/bepo/keymap.c b/keyboard/ergodox_ez/keymaps/bepo/keymap.c index 1fe23a9323..835db147af 100644 --- a/keyboard/ergodox_ez/keymaps/bepo/keymap.c +++ b/keyboard/ergodox_ez/keymaps/bepo/keymap.c @@ -3,9 +3,9 @@ #include "debug.h" #include "action_layer.h" #include "led.h" +#include "keymap_extras/keymap_bepo.h" #define BASE 0 // default layer -#define DVRK 1 // Dvorak layer #define NUMR 8 // numeric layer #define FNLR 9 // fn layer @@ -16,15 +16,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Basic layer * * ,--------------------------------------------------. ,--------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | Del | | Del | 6 | 7 | 8 | 9 | 0 | - | + * | $ | " | « | » | ( | ) | Del | | Del | @ | + | - | / | * | = | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | Tab | Q | W | E | R | T |Backsp| |Backsp| Y | U | I | O | P | [ | + * | Tab | B | É | P | O | È |Backsp| |Backsp| ^ | V | D | L | J | Z | * |--------+------+------+------+------+------|ace | |ace |------+------+------+------+------+--------| - * | ] | A | S | D | F | G |------| |------| H | J | K | L | ; | ' | + * | W | A | U | I | E | , |------| |------| C | T | S | R | N | M | * |--------+------+------+------+------+------|Enter | |Enter |------+------+------+------+------+--------| - * | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift | + * | LShift | À | Y | X | . | K | | | | ' | Q | G | H | F | RShift | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * |LCtrl | fn | LGui | Play |App/Alt| | RAlt | = | Home | \ |End/Ctl| + * |LCtrl | fn | LGui | Play |App/Alt| |Alt Gr| % | Home | Ç |End/Ctl| * `-----------------------------------' `-----------------------------------' * ,--------------. ,-------------. * |Esc/Alt| num | | Left |Right | @@ -38,72 +38,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Otherwise, it needs KC_* [BASE] = KEYMAP( // layer 0 : default // left hand - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_DELT, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_BSPC, - KC_RBRC, KC_A, KC_S, KC_D, KC_F, KC_G, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_ENT, - KC_LCTL, M(MFNLR), KC_LGUI,KC_MPLY,ALT_T(KC_APP), + BP_DLR, KC_1, KC_2, KC_3, KC_4, KC_5, KC_DELT, + KC_TAB, BP_B, BP_ECUT, BP_P, BP_O, BP_EGRV, KC_BSPC, + BP_W, BP_A, BP_U, BP_I, BP_E, BP_COMM, + KC_LSFT, BP_AGRV, BP_Y, BP_X, BP_DOT, BP_K, KC_ENT, + KC_LCTL, M(MFNLR), KC_LGUI, KC_MPLY, ALT_T(KC_APP), ALT_T(KC_ESC), TG(NUMR), KC_PGUP, KC_SPC, KC_LSFT, KC_PGDN, // right hand - KC_DELT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, - KC_BSPC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, - KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, - KC_ENT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, - KC_RALT, KC_EQL, KC_HOME, KC_BSLS, CTL_T(KC_END), + KC_DELT, KC_6, KC_7, KC_8, KC_9, KC_0, BP_EQL, + KC_BSPC, BP_DCRC, BP_V, BP_D, BP_L, BP_J, BP_Z, + BP_C, BP_T, BP_S, BP_R, BP_N, BP_M, + KC_ENT, BP_APOS, BP_Q, BP_G, BP_H, BP_F, KC_RSFT, + BP_ALGR, BP_PERC, KC_HOME, BP_CCED, CTL_T(KC_END), - KC_LEFT, KC_RGHT, - KC_UP, - KC_DOWN, KC_RSFT, KC_SPC - ), -/* Dvorak layer - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | Del | | Del | 6 | 7 | 8 | 9 | 0 | = | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | Tab | ' | , | . | P | Y |Backsp| |Backsp| F | G | C | R | L | / | - * |--------+------+------+------+------+------|ace | |ace |------+------+------+------+------+--------| - * | LShift | A | O | E | U | I |------| |------| D | H | T | N | S | -/Shift| - * |--------+------+------+------+------+------|Enter | |Enter |------+------+------+------+------+--------| - * | LShift | ; | Q | J | K | X | | | | B | M | W | V | Z | \/Shift| - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * |LCtrl | fn | LGui | Play |App/Alt| | RAlt | [ | Home | ] |End/Ctl| - * `-----------------------------------' `-----------------------------------' - * ,--------------. ,-------------. - * |Esc/Alt| num | | Left |Right | - * ,------+-------+------| |------+------+------. - * | | | PgUp | | Up | | | - * |Space |LShift |------| |------|RShift|Space | - * | | | PgDn | | Down | | | - * `---------------------' `--------------------' - */ -// If it accepts an argument (i.e, is a function), it doesn't need KC_. -// Otherwise, it needs KC_* -[DVRK] = KEYMAP( // layer 0 : default - // left hand - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_DELT, - KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_BSPC, - KC_LSFT, KC_A, KC_O, KC_E, KC_U, KC_I, - KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_ENT, - KC_LCTL, M(MFNLR), KC_LGUI, KC_MPLY, ALT_T(KC_APP), - - ALT_T(KC_ESC), TG(NUMR), - KC_PGUP, - KC_SPC, KC_LSFT, KC_PGDN, - - // right hand - KC_DELT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, - KC_BSPC, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, - KC_D, KC_H, KC_T, KC_N, KC_S, SFT_T(KC_MINS), - KC_ENT, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_T(KC_BSLS), - KC_RALT, KC_LBRC, KC_HOME, KC_RBRC, CTL_T(KC_END), - - KC_LEFT, KC_RGHT, - KC_UP, - KC_DOWN, KC_RSFT, KC_SPC + KC_LEFT, KC_RGHT, + KC_UP, + KC_DOWN, KC_RSFT, KC_SPC ), /* Numeric Layer * @@ -230,10 +184,6 @@ void * matrix_scan_user(void) { if (layer_state & (1 << NUMR)) { ergodox_right_led_1_on(); } - // led 2: Dvorak layer - if (default_layer_state == 1 << DVRK) { - ergodox_right_led_2_on(); - } // led 3: caps lock if (host_keyboard_leds() & (1< Date: Sun, 14 Feb 2016 15:18:04 +0100 Subject: [PATCH 03/23] Swapped w and = to keep the w on the right hand (better for English) --- keyboard/ergodox_ez/keymaps/bepo/keymap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/keyboard/ergodox_ez/keymaps/bepo/keymap.c b/keyboard/ergodox_ez/keymaps/bepo/keymap.c index 835db147af..2a4cce075e 100644 --- a/keyboard/ergodox_ez/keymaps/bepo/keymap.c +++ b/keyboard/ergodox_ez/keymaps/bepo/keymap.c @@ -16,11 +16,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Basic layer * * ,--------------------------------------------------. ,--------------------------------------------------. - * | $ | " | « | » | ( | ) | Del | | Del | @ | + | - | / | * | = | + * | $ | " | « | » | ( | ) | Del | | Del | @ | + | - | / | * | W | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * | Tab | B | É | P | O | È |Backsp| |Backsp| ^ | V | D | L | J | Z | * |--------+------+------+------+------+------|ace | |ace |------+------+------+------+------+--------| - * | W | A | U | I | E | , |------| |------| C | T | S | R | N | M | + * | = | A | U | I | E | , |------| |------| C | T | S | R | N | M | * |--------+------+------+------+------+------|Enter | |Enter |------+------+------+------+------+--------| * | LShift | À | Y | X | . | K | | | | ' | Q | G | H | F | RShift | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' @@ -40,7 +40,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // left hand BP_DLR, KC_1, KC_2, KC_3, KC_4, KC_5, KC_DELT, KC_TAB, BP_B, BP_ECUT, BP_P, BP_O, BP_EGRV, KC_BSPC, - BP_W, BP_A, BP_U, BP_I, BP_E, BP_COMM, + BP_EQL, BP_A, BP_U, BP_I, BP_E, BP_COMM, KC_LSFT, BP_AGRV, BP_Y, BP_X, BP_DOT, BP_K, KC_ENT, KC_LCTL, M(MFNLR), KC_LGUI, KC_MPLY, ALT_T(KC_APP), @@ -49,7 +49,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_SPC, KC_LSFT, KC_PGDN, // right hand - KC_DELT, KC_6, KC_7, KC_8, KC_9, KC_0, BP_EQL, + KC_DELT, KC_6, KC_7, KC_8, KC_9, KC_0, BP_W, KC_BSPC, BP_DCRC, BP_V, BP_D, BP_L, BP_J, BP_Z, BP_C, BP_T, BP_S, BP_R, BP_N, BP_M, KC_ENT, BP_APOS, BP_Q, BP_G, BP_H, BP_F, KC_RSFT, From bf78ca1ef2983f87e9acb5f115326290f9626931 Mon Sep 17 00:00:00 2001 From: Didier Loiseau Date: Wed, 17 Feb 2016 21:07:38 +0100 Subject: [PATCH 04/23] Use enums to define layers and macros --- keyboard/ergodox_ez/keymaps/bepo/keymap.c | 56 ++++++++++++----------- 1 file changed, 30 insertions(+), 26 deletions(-) diff --git a/keyboard/ergodox_ez/keymaps/bepo/keymap.c b/keyboard/ergodox_ez/keymaps/bepo/keymap.c index 2a4cce075e..855379e3cf 100644 --- a/keyboard/ergodox_ez/keymaps/bepo/keymap.c +++ b/keyboard/ergodox_ez/keymaps/bepo/keymap.c @@ -5,12 +5,16 @@ #include "led.h" #include "keymap_extras/keymap_bepo.h" -#define BASE 0 // default layer -#define NUMR 8 // numeric layer -#define FNLR 9 // fn layer +enum layers { + LR_BASE, // default layer + LR_NUMR, // numeric layer + LR_FN, // fn layer +}; -#define MDBL0 1 -#define MFNLR 2 +enum macros { + M_DBL0, + M_FNLR, +}; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Basic layer @@ -36,15 +40,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* -[BASE] = KEYMAP( // layer 0 : default +[LR_BASE] = KEYMAP( // layer 0 : default // left hand BP_DLR, KC_1, KC_2, KC_3, KC_4, KC_5, KC_DELT, KC_TAB, BP_B, BP_ECUT, BP_P, BP_O, BP_EGRV, KC_BSPC, BP_EQL, BP_A, BP_U, BP_I, BP_E, BP_COMM, KC_LSFT, BP_AGRV, BP_Y, BP_X, BP_DOT, BP_K, KC_ENT, - KC_LCTL, M(MFNLR), KC_LGUI, KC_MPLY, ALT_T(KC_APP), + KC_LCTL, M(M_FNLR), KC_LGUI, KC_MPLY, ALT_T(KC_APP), - ALT_T(KC_ESC), TG(NUMR), + ALT_T(KC_ESC), TG(LR_NUMR), KC_PGUP, KC_SPC, KC_LSFT, KC_PGDN, @@ -81,7 +85,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // SYMBOLS -[NUMR] = KEYMAP( +[LR_NUMR] = KEYMAP( // left hand KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS, @@ -91,13 +95,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS,KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS,KC_TRNS, + KC_TRNS, KC_TRNS,KC_TRNS, // right hand - KC_TRNS, KC_F6, KC_F7, KC_TAB, KC_PSLS, KC_PAST, KC_PMNS, - KC_TRNS, KC_TRNS, KC_HOME, KC_P7, KC_P8, KC_P9, KC_PPLS, - KC_UP, KC_END, KC_P4, KC_P5, KC_P6, KC_PPLS, - KC_LEFT, KC_DOWN, KC_RGHT, KC_P1, KC_P2, KC_P3, KC_PENT, - KC_TRNS, KC_P0, M(MDBL0),KC_PDOT, CTL_T(KC_PENT), + KC_TRNS, KC_F6, KC_F7, KC_TAB, KC_PSLS, KC_PAST, KC_PMNS, + KC_TRNS, KC_TRNS, KC_HOME, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_UP, KC_END, KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_LEFT, KC_DOWN, KC_RGHT, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_TRNS, KC_P0, M(M_DBL0),KC_PDOT, CTL_T(KC_PENT), KC_NLCK, KC_CAPS, KC_TRNS, @@ -125,12 +129,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ // MEDIA AND MOUSE -[FNLR] = KEYMAP( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, - KC_TRNS, KC_TRNS, KC_TRNS, KC_CALC, KC_MAIL, KC_WHOM, - KC_TRNS, KC_TRNS, LSFT(KC_DELT),LCTL(KC_INS),LSFT(KC_INS), KC_MUTE, KC_VOLD, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, +[LR_FN] = KEYMAP( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, + KC_TRNS, KC_TRNS, KC_TRNS, KC_CALC, KC_MAIL, KC_WHOM, + KC_TRNS, KC_TRNS, LSFT(KC_DELT),LCTL(KC_INS),LSFT(KC_INS), KC_MUTE, KC_VOLD, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -155,14 +159,14 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function switch(id) { - case MDBL0: + case M_DBL0: if (record->event.pressed) { return MACRO( I(25), T(P0), T(P0), END ); } break; - case MFNLR: - layer_invert(NUMR); - layer_invert(FNLR); + case M_FNLR: + layer_invert(LR_NUMR); + layer_invert(LR_FN); break; } return MACRO_NONE; @@ -181,7 +185,7 @@ void * matrix_scan_user(void) { ergodox_right_led_2_off(); ergodox_right_led_3_off(); // led 1: numeric layer - if (layer_state & (1 << NUMR)) { + if (layer_state & (1 << LR_NUMR)) { ergodox_right_led_1_on(); } // led 3: caps lock From b8ddbd21810951f64a081e4c3096bbc6aedc9aeb Mon Sep 17 00:00:00 2001 From: Didier Loiseau Date: Fri, 26 Feb 2016 00:54:19 +0100 Subject: [PATCH 05/23] Added RESET key on fn-= --- keyboard/ergodox_ez/keymaps/bepo/keymap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboard/ergodox_ez/keymaps/bepo/keymap.c b/keyboard/ergodox_ez/keymaps/bepo/keymap.c index 855379e3cf..1cebf8c9e8 100644 --- a/keyboard/ergodox_ez/keymaps/bepo/keymap.c +++ b/keyboard/ergodox_ez/keymaps/bepo/keymap.c @@ -114,7 +114,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * | | | | | | |VolUp | | | | | | | | Pause | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | Calc | Mail |Browsr|------| |------| | | | | | | + * | RESET | | | Calc | Mail |Browsr|------| |------| | | | | | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | | | cut | copy |paste | Mute |VolDn | | | | | | | | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' @@ -132,7 +132,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [LR_FN] = KEYMAP( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, - KC_TRNS, KC_TRNS, KC_TRNS, KC_CALC, KC_MAIL, KC_WHOM, + RESET, KC_TRNS, KC_TRNS, KC_CALC, KC_MAIL, KC_WHOM, KC_TRNS, KC_TRNS, LSFT(KC_DELT),LCTL(KC_INS),LSFT(KC_INS), KC_MUTE, KC_VOLD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, From a7cef2ca0a2322448d02008337013936b1d550ec Mon Sep 17 00:00:00 2001 From: Didier Loiseau Date: Wed, 17 Feb 2016 21:45:38 +0100 Subject: [PATCH 06/23] =?UTF-8?q?Initial=20B=C3=89PO=20over=20CSA=20with?= =?UTF-8?q?=20Shift=20layer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Initial implementation of the BÉPO layout for use with the Canadian Multilingual Standard layout (a.k.a. CSA / ACNOR layout) on the OS-side. - support all bépo characters from the default and shifted layers --- keyboard/ergodox_ez/keymaps/bepo/keymap.c | 159 +++++++++++++++++- .../keymap_canadian_multilingual.h | 105 ++++++++++++ 2 files changed, 262 insertions(+), 2 deletions(-) create mode 100644 quantum/keymap_extras/keymap_canadian_multilingual.h diff --git a/keyboard/ergodox_ez/keymaps/bepo/keymap.c b/keyboard/ergodox_ez/keymaps/bepo/keymap.c index 1cebf8c9e8..ce887997e7 100644 --- a/keyboard/ergodox_ez/keymaps/bepo/keymap.c +++ b/keyboard/ergodox_ez/keymaps/bepo/keymap.c @@ -4,14 +4,39 @@ #include "action_layer.h" #include "led.h" #include "keymap_extras/keymap_bepo.h" +#include "keymap_extras/keymap_canadian_multilingual.h" enum layers { LR_BASE, // default layer + LR_CSA, // BÉPO over Canadian Multilingual (CSA) + LR_CSA_SFT, // shifted BÉPO over CSA + LR_CSA_AGR, // altgr-ed BÉPO over CSA + LR_CSA_AGR_SFT, // altgr-shifted BÉPO over CSA LR_NUMR, // numeric layer LR_FN, // fn layer }; +#define IS_CA_MULT_ENABLED() (default_layer_state & (1 << LR_CSA)) + enum macros { + M_TGCM, // toggle CA-mult + M_CMSFT, // toggle shift on CA-mult + // macros for characters that need to be un-shifted in LR_CA_MULT_SHIFT + M_1, + M_2, + M_3, + M_4, + M_5, + M_6, + M_7, + M_8, + M_9, + M_0, + M_DEGR, + M_SCLN, + M_GRV, + M_NBSP, + // other layer macros M_DBL0, M_FNLR, }; @@ -63,6 +88,76 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_UP, KC_DOWN, KC_RSFT, KC_SPC ), +/** + * Same as default but for use with Canadian Multilingual on OS side + */ +[LR_CSA] = KEYMAP( + // left hand + KC_DLR, CM_DQOT, CM_LGIL, CM_RGIL, KC_LPRN, KC_RPRN, KC_DELT, + KC_TAB, KC_B, CM_ECUT, KC_P, KC_O, CM_EGRV, KC_BSPC, + KC_EQL, KC_A, KC_U, KC_I, KC_E, KC_COMM, + M(M_CMSFT), CM_AGRV, KC_Y, KC_X, KC_DOT, KC_K, KC_ENT, + KC_LCTL, M(M_FNLR), KC_LGUI, KC_MPLY, ALT_T(KC_APP), + + ALT_T(KC_ESC), TG(LR_NUMR), + KC_PGUP, + KC_SPC, KC_LSFT, KC_PGDN, + + // right hand + KC_DELT, KC_AT, KC_PLUS, KC_MINS, CM_SLSH, KC_ASTR, KC_W, + KC_BSPC, CM_DCRC, KC_V, KC_D, KC_L, KC_J, KC_Z, + KC_C, KC_T, KC_S, KC_R, KC_N, KC_M, + KC_ENT, CM_APOS, KC_Q, KC_G, KC_H, KC_F, M(M_CMSFT), + CM_ALGR, KC_PERC, KC_HOME, CM_CCED, CTL_T(KC_END), + + KC_LEFT, KC_RGHT, + KC_UP, + KC_DOWN, KC_RSFT, KC_SPC + ), +/* Shifted BÉPO over Canadian Multilingual + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | # | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | | | | ! | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | ° | | | | | ; |------| |------| | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | : | | | | | ? | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | ` | | | | + * `----------------------------------' `-----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[LR_CSA_SFT] = KEYMAP( + // left hand + KC_HASH, M(M_1), M(M_2), M(M_3), M(M_4), M(M_5), KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + M(M_DEGR),KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M(M_SCLN), + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_COLN, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + + KC_TRNS, KC_TRNS, + KC_TRNS, + M(M_NBSP), KC_TRNS, KC_TRNS, + + // right hand + KC_TRNS, M(M_6), M(M_7), M(M_8), M(M_9), M(M_0), KC_TRNS, + KC_TRNS, KC_EXLM, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, CM_QEST, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, M(M_GRV), KC_TRNS, KC_TRNS, KC_TRNS, + + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, M(M_NBSP) + ), /* Numeric Layer * * ,--------------------------------------------------. ,--------------------------------------------------. @@ -110,7 +205,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* fn layer * * ,--------------------------------------------------. ,--------------------------------------------------. - * | | | | | | |Insert| |Insert|Eject |Power |Sleep | Wake |PrtScr|ScrollLk| + * |~CA-mult| | | | | |Insert| |Insert|Eject |Power |Sleep | Wake |PrtScr|ScrollLk| * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * | | | | | | |VolUp | | | | | | | | Pause | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| @@ -130,7 +225,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // MEDIA AND MOUSE [LR_FN] = KEYMAP( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, + M(M_TGCM), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, RESET, KC_TRNS, KC_TRNS, KC_CALC, KC_MAIL, KC_WHOM, KC_TRNS, KC_TRNS, LSFT(KC_DELT),LCTL(KC_INS),LSFT(KC_INS), KC_MUTE, KC_VOLD, @@ -155,10 +250,66 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM fn_actions[] = { }; +void hold_shift(void) { + register_code(KC_LSHIFT); +} + +void release_shift(void) { + unregister_code(KC_LSHIFT); +} + const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function switch(id) { + case M_TGCM: + if (record->event.pressed) { + default_layer_xor(1 << LR_CSA); + } + break; + case M_CMSFT: + if (record->event.pressed) { + layer_on(LR_CSA_SFT); + hold_shift(); + } else { + release_shift(); + layer_off(LR_CSA_SFT); + } + break; + case M_1 ... M_0: + case M_DEGR: + case M_SCLN: + case M_GRV: + case M_NBSP: + // macros of the shift layer that require to release shift + if (record->event.pressed) { + release_shift(); + switch (id) { + case M_1 ... M_0: + register_code(KC_1 + (id - M_1)); + break; + case M_DEGR: + return MACRO(DOWN(CM_ALTGR), D(SCLN), END); + case M_SCLN: + return MACRO(D(SCLN), END); + case M_GRV: + return MACRO(DOWN(CM_ALTGR), TYPE(CM_DCRC), UP(CM_ALTGR), T(SPACE), END); + case M_NBSP: + return MACRO(DOWN(CM_ALTGR), T(SPACE), UP(CM_ALTGR), END); + } + } else { + hold_shift(); + switch (id) { + case M_1 ... M_0: + unregister_code(KC_1 + (id - M_1)); + break; + case M_DEGR: + return MACRO(UP(CM_ALTGR), D(LSFT), U(SCLN), END); + case M_SCLN: + return MACRO(D(LSFT), U(SCLN), END); + } + } + break; case M_DBL0: if (record->event.pressed) { return MACRO( I(25), T(P0), T(P0), END ); @@ -188,6 +339,10 @@ void * matrix_scan_user(void) { if (layer_state & (1 << LR_NUMR)) { ergodox_right_led_1_on(); } + // led 2: BÉPO over Canadian Multilingual + if (IS_CA_MULT_ENABLED()) { + ergodox_right_led_2_on(); + } // led 3: caps lock if (host_keyboard_leds() & (1< +#define CM_GRTR CM_GREATER + +// Space bar +#define CM_NON_BREAKING_SPACE ALTGR(KC_SPACE) +#define CM_NBSP CM_NON_BREAKING_SPACE + +#endif From 7840e69bfaee1d67de273c235b532d6f20c905a9 Mon Sep 17 00:00:00 2001 From: Didier Loiseau Date: Thu, 18 Feb 2016 00:47:23 +0100 Subject: [PATCH 07/23] =?UTF-8?q?B=C3=89PO=20over=20CSA:=20AltGr=20layer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - implemented the most useful characters: - all French characters + € - common programmer characters - other keys implemented as KC_NO to avoid mistyping a character from a lower layer - AltGr+Shift not supported (yet) --- keyboard/ergodox_ez/keymaps/bepo/keymap.c | 54 ++++++++++++++++++- .../keymap_canadian_multilingual.h | 11 ++++ 2 files changed, 64 insertions(+), 1 deletion(-) diff --git a/keyboard/ergodox_ez/keymaps/bepo/keymap.c b/keyboard/ergodox_ez/keymaps/bepo/keymap.c index ce887997e7..64fac7f9ba 100644 --- a/keyboard/ergodox_ez/keymaps/bepo/keymap.c +++ b/keyboard/ergodox_ez/keymaps/bepo/keymap.c @@ -36,6 +36,8 @@ enum macros { M_SCLN, M_GRV, M_NBSP, + // macros for characters that don't have a simple key combination in LR_CA_MULT_ALTGR + M_CRC, // other layer macros M_DBL0, M_FNLR, @@ -108,7 +110,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_BSPC, CM_DCRC, KC_V, KC_D, KC_L, KC_J, KC_Z, KC_C, KC_T, KC_S, KC_R, KC_N, KC_M, KC_ENT, CM_APOS, KC_Q, KC_G, KC_H, KC_F, M(M_CMSFT), - CM_ALGR, KC_PERC, KC_HOME, CM_CCED, CTL_T(KC_END), + MO(LR_CSA_AGR), KC_PERC, KC_HOME, CM_CCED, CTL_T(KC_END), KC_LEFT, KC_RGHT, KC_UP, @@ -158,6 +160,51 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, M(M_NBSP) ), +/* AltGr-ed BÉPO over Canadian Multilingual + * "////" indicates that the key is disabled (unsupported bépo character) + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ////// | //// | < | > | [ | ] | | | | ^ | //// | //// | //// | //// | ////// | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | |dead '| & | œ |dead `| | | | //// | //// | //// | //// | //// | ////// | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | ////// | æ | ù |dead "| € | //// |------| |------| //// | //// | //// | //// | //// | ////// | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | \ | { | } | //// | ~ | | | | //// | //// | //// | //// | //// | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | //// | | //// | | + * `----------------------------------' `-----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | _ | |------| |------| | _ | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[LR_CSA_AGR] = KEYMAP( + // left hand + KC_NO, KC_NO, CM_LESS, CM_GRTR, CM_LBRC, CM_RBRC, KC_TRNS, + KC_TRNS, CM_PIPE, CM_DACT, KC_AMPR, CM_OE, CM_DGRV, KC_TRNS, + KC_NO, CM_AE, CM_UGRV, CM_DTRM, CM_EURO, KC_NO, + KC_TRNS, CM_BSLS, CM_LCBR, CM_RCBR, KC_NO, CM_TILD, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_UNDS, KC_TRNS, KC_TRNS, + + // right hand + KC_TRNS, M(M_CRC), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_TRNS, KC_NO, KC_TRNS, KC_NO, KC_TRNS, + + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_UNDS + ), /* Numeric Layer * * ,--------------------------------------------------. ,--------------------------------------------------. @@ -310,6 +357,11 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) } } break; + case M_CRC: + if (record->event.pressed) { + return MACRO(TYPE(CM_DCRC), T(SPACE), END); + } + break; case M_DBL0: if (record->event.pressed) { return MACRO( I(25), T(P0), T(P0), END ); diff --git a/quantum/keymap_extras/keymap_canadian_multilingual.h b/quantum/keymap_extras/keymap_canadian_multilingual.h index ae60ffe37e..e30419b5be 100644 --- a/quantum/keymap_extras/keymap_canadian_multilingual.h +++ b/quantum/keymap_extras/keymap_canadian_multilingual.h @@ -102,4 +102,15 @@ #define CM_NON_BREAKING_SPACE ALTGR(KC_SPACE) #define CM_NBSP CM_NON_BREAKING_SPACE +// GR2A-ed characters (non-exhaustive list) +// second row +#define CM_OE_LIGATURE GR2A(KC_E) // œ +#define CM_OE CM_OE_LIGATURE + +// third row +#define CM_AE_LIGATURE GR2A(KC_A) // æ +#define CM_AE CM_AE_LIGATURE +#define CM_DEAD_ACUTE GR2A(KC_SCLN) // dead acute accent +#define CM_DACT CM_DEAD_ACUTE + #endif From fbf1333d87aa4487692f068881ab1ce46fa79be5 Mon Sep 17 00:00:00 2001 From: Didier Loiseau Date: Fri, 26 Feb 2016 00:53:30 +0100 Subject: [PATCH 08/23] =?UTF-8?q?B=C3=89PO=20over=20CSA:=20unicode=20suppo?= =?UTF-8?q?rt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - implement easy way to define and send unicode characters on Windows - define 3 characters not available in CSA: - en dash: – - em dash: — - ellipsis: … --- keyboard/ergodox_ez/keymaps/bepo/keymap.c | 59 +++++++++++++++++++++-- 1 file changed, 54 insertions(+), 5 deletions(-) diff --git a/keyboard/ergodox_ez/keymaps/bepo/keymap.c b/keyboard/ergodox_ez/keymaps/bepo/keymap.c index 64fac7f9ba..b08b47217c 100644 --- a/keyboard/ergodox_ez/keymaps/bepo/keymap.c +++ b/keyboard/ergodox_ez/keymaps/bepo/keymap.c @@ -19,6 +19,13 @@ enum layers { #define IS_CA_MULT_ENABLED() (default_layer_state & (1 << LR_CSA)) enum macros { + // Characters that do not exist in CSA and must be implemented based on unicode support + // Note: these are intentionally declared first to be used as indexes in spec_chars below + UC_NDSH, // – + UC_MDSH, // — + UC_ELPS, // … + END_UC, // indicates the last unicode character macro + // other macros M_TGCM, // toggle CA-mult M_CMSFT, // toggle shift on CA-mult // macros for characters that need to be un-shifted in LR_CA_MULT_SHIFT @@ -43,6 +50,15 @@ enum macros { M_FNLR, }; +const uint16_t unicode_chars[] = { + [UC_NDSH] = L'–', + [UC_MDSH] = L'—', + [UC_ELPS] = L'…', +}; + +/* shortcut for unicod character macros */ +#define MUC(name) M(UC_##name) + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Basic layer * @@ -164,13 +180,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * "////" indicates that the key is disabled (unsupported bépo character) * * ,--------------------------------------------------. ,--------------------------------------------------. - * | ////// | //// | < | > | [ | ] | | | | ^ | //// | //// | //// | //// | ////// | + * | – | — | < | > | [ | ] | | | | ^ | //// | //// | //// | //// | ////// | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * | | | |dead '| & | œ |dead `| | | | //// | //// | //// | //// | //// | ////// | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | ////// | æ | ù |dead "| € | //// |------| |------| //// | //// | //// | //// | //// | ////// | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | \ | { | } | //// | ~ | | | | //// | //// | //// | //// | //// | | + * | | \ | { | } | … | ~ | | | | //// | //// | //// | //// | //// | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * | | | | | | | | //// | | //// | | * `----------------------------------' `-----------------------------------' @@ -184,10 +200,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [LR_CSA_AGR] = KEYMAP( // left hand - KC_NO, KC_NO, CM_LESS, CM_GRTR, CM_LBRC, CM_RBRC, KC_TRNS, + MUC(NDSH),MUC(MDSH),CM_LESS, CM_GRTR, CM_LBRC, CM_RBRC, KC_TRNS, KC_TRNS, CM_PIPE, CM_DACT, KC_AMPR, CM_OE, CM_DGRV, KC_TRNS, KC_NO, CM_AE, CM_UGRV, CM_DTRM, CM_EURO, KC_NO, - KC_TRNS, CM_BSLS, CM_LCBR, CM_RCBR, KC_NO, CM_TILD, KC_TRNS, + KC_TRNS, CM_BSLS, CM_LCBR, CM_RCBR, MUC(ELPS),CM_TILD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -305,10 +321,43 @@ void release_shift(void) { unregister_code(KC_LSHIFT); } +uint16_t hextokeycode(int hex) { + if (hex == 0x0) { + return KC_P0; + } else if (hex < 0xA) { + return KC_P1 + (hex - 0x1); + } else { + return KC_A + (hex - 0xA); + } +} + +void send_unicode(uint16_t unicode) +{ + // For more info on how this works per OS, see here: https://en.wikipedia.org/wiki/Unicode_input#Hexadecimal_code_input + // Implemented for Windows: + // Pressing ALT followed by + followed by the unicode code point in hex. + // Requires registry key HKEY_CURRENT_USER\Control Panel\Input Method\EnableHexNumpad set to String 1 + register_code(KC_LALT); + register_code(KC_PPLS); + unregister_code(KC_PPLS); + + for (int i = 12; i >= 0; i -= 4) { + register_code(hextokeycode((unicode >> i) & 0xF)); + unregister_code(hextokeycode((unicode >> i) & 0xF)); + } + + unregister_code(KC_LALT); +} + const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function switch(id) { + case 0 ... END_UC: + if (record->event.pressed) { + send_unicode(unicode_chars[id]); + } + break; case M_TGCM: if (record->event.pressed) { default_layer_xor(1 << LR_CSA); @@ -364,7 +413,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) break; case M_DBL0: if (record->event.pressed) { - return MACRO( I(25), T(P0), T(P0), END ); + return MACRO( I(25), T(P0), T(P0), END ); } break; case M_FNLR: From 911222892ecb1c01551e0abdfbe98ed1dbf82139 Mon Sep 17 00:00:00 2001 From: Didier Loiseau Date: Fri, 26 Feb 2016 00:55:39 +0100 Subject: [PATCH 09/23] =?UTF-8?q?B=C3=89PO=20over=20CSA:=20GR2A=20characte?= =?UTF-8?q?rs=20in=20AltGr=20layer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - define aliases for all GR2A characters (unshifted) - use the available characters in the BÉPO over CSA AltGr layer --- keyboard/ergodox_ez/keymaps/bepo/keymap.c | 22 ++--- .../keymap_canadian_multilingual.h | 81 ++++++++++++++++++- 2 files changed, 88 insertions(+), 15 deletions(-) diff --git a/keyboard/ergodox_ez/keymaps/bepo/keymap.c b/keyboard/ergodox_ez/keymaps/bepo/keymap.c index b08b47217c..a3b8d9c49f 100644 --- a/keyboard/ergodox_ez/keymaps/bepo/keymap.c +++ b/keyboard/ergodox_ez/keymaps/bepo/keymap.c @@ -180,15 +180,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * "////" indicates that the key is disabled (unsupported bépo character) * * ,--------------------------------------------------. ,--------------------------------------------------. - * | – | — | < | > | [ | ] | | | | ^ | //// | //// | //// | //// | ////// | + * | – | — | < | > | [ | ] | | | | ^ | ± | //// | //// | //// | ////// | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | | |dead '| & | œ |dead `| | | | //// | //// | //// | //// | //// | ////// | + * | | | |dead '| & | œ |dead `| | | | //// | //// | ð | //// | ij | ////// | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | ////// | æ | ù |dead "| € | //// |------| |------| //// | //// | //// | //// | //// | ////// | + * | ////// | æ | ù |dead "| € | ̛’ |------| |------| //// | þ | ß | //// |dead ~| ////// | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | \ | { | } | … | ~ | | | | //// | //// | //// | //// | //// | | + * | | \ | { | } | … | ~ | | | | //// | //// | μ | //// | //// | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | | | | | //// | | //// | | + * | | | | | | | | //// | |dead ¸| | * `----------------------------------' `-----------------------------------' * ,-------------. ,-------------. * | | | | | | @@ -202,7 +202,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // left hand MUC(NDSH),MUC(MDSH),CM_LESS, CM_GRTR, CM_LBRC, CM_RBRC, KC_TRNS, KC_TRNS, CM_PIPE, CM_DACT, KC_AMPR, CM_OE, CM_DGRV, KC_TRNS, - KC_NO, CM_AE, CM_UGRV, CM_DTRM, CM_EURO, KC_NO, + KC_NO, CM_AE, CM_UGRV, CM_DTRM, CM_EURO, CM_RQOT, KC_TRNS, CM_BSLS, CM_LCBR, CM_RCBR, MUC(ELPS),CM_TILD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -211,11 +211,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_UNDS, KC_TRNS, KC_TRNS, // right hand - KC_TRNS, M(M_CRC), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, - KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_TRNS, KC_NO, KC_TRNS, KC_NO, KC_TRNS, + KC_TRNS, M(M_CRC), CM_PSMS, KC_NO, KC_NO, KC_NO, KC_NO, + KC_TRNS, KC_NO, KC_NO, CM_ETH, KC_NO, CM_IJ, KC_NO, + KC_NO, CM_THRN, CM_SRPS, KC_NO, CM_DTLD, KC_TRNS, + KC_TRNS, KC_NO, KC_NO, CM_MU, KC_NO, KC_NO, KC_NO, + KC_TRNS, KC_NO, KC_TRNS, CM_DCED, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/quantum/keymap_extras/keymap_canadian_multilingual.h b/quantum/keymap_extras/keymap_canadian_multilingual.h index e30419b5be..9b13b1e4e6 100644 --- a/quantum/keymap_extras/keymap_canadian_multilingual.h +++ b/quantum/keymap_extras/keymap_canadian_multilingual.h @@ -103,14 +103,87 @@ #define CM_NBSP CM_NON_BREAKING_SPACE // GR2A-ed characters (non-exhaustive list) -// second row -#define CM_OE_LIGATURE GR2A(KC_E) // œ -#define CM_OE CM_OE_LIGATURE +// First row +#define CM_SUPERSCRIPT_ONE GR2A(KC_1) // ¹ +#define CM_SUP1 CM_SUPERSCRIPT_ONE +#define CM_SUPERSCRIPT_TWO GR2A(KC_2) // ² +#define CM_SUP2 CM_SUPERSCRIPT_TWO +#define CM_SUPERSCRIPT_THREE GR2A(KC_3) // ³ +#define CM_SUP3 CM_SUPERSCRIPT_THREE +#define CM_ONE_QUARTER GR2A(KC_4) // ¼ +#define CM_1QRT CM_ONE_QUARTER +#define CM_ONE_HALF GR2A(KC_5) // ½ +#define CM_1HLF CM_ONE_HALF +#define CM_THREE_QUARTERS GR2A(KC_6) // ¾ +#define CM_3QRT CM_THREE_QUARTERS +// nothing on 7-0 and - +#define CM_DEAD_CEDILLA GR2A(KC_EQUAL) // dead ¸ +#define CM_DCED CM_DEAD_CEDILLA -// third row +// Second row +#define CM_OMEGA GR2A(KC_Q) // ω +#define CM_OMEG CM_OMEGA +#define CM_L_STROKE GR2A(KC_W) // ł +#define CM_LSTK CM_L_STROKE +#define CM_OE_LIGATURE GR2A(KC_E) // œ +#define CM_OE CM_OE_LIGATURE +#define CM_PARAGRAPH GR2A(KC_R) // ¶ +#define CM_PARG CM_PARAGRAPH +#define CM_T_STROKE GR2A(KC_T) // ŧ +#define CM_LEFT_ARROW GR2A(KC_Y) // ← +#define CM_LARW CM_LEFT_ARROW +#define CM_DOWN_ARROW GR2A(KC_U) // ↓ +#define CM_DARW CM_DOWN_ARROW +#define CM_RIGHT_ARROW GR2A(KC_I) // → +#define CM_RARW CM_RIGHT_ARROW +#define CM_O_STROKE GR2A(KC_O) // ø +#define CM_OSTK CM_O_STROKE +#define CM_THORN GR2A(KC_P) // þ +#define CM_THRN CM_THORN +// nothing on ^ +#define CM_DEAD_TILDE GR2A(CM_C_CEDILLA) // dead ~ +#define CM_DTLD CM_DEAD_TILDE + +// Third row #define CM_AE_LIGATURE GR2A(KC_A) // æ #define CM_AE CM_AE_LIGATURE +#define CM_SHARP_S GR2A(KC_S) // ß +#define CM_SRPS CM_SHARP_S +#define CM_ETH GR2A(KC_D) // ð +// nothing on F +#define CM_ENG GR2A(KC_G) // ŋ +#define CM_H_SRTOKE GR2A(KC_H) // ħ +#define CM_HSTK CM_H_SRTOKE +#define CM_IJ_LIGATURE GR2A(KC_J) // ij +#define CM_IJ CM_IJ_LIGATURE +#define CM_KRA GR2A(KC_K) // ĸ +#define CM_L_FLOWN_DOT GR2A(KC_L) // ŀ +#define CM_LFLD CM_L_FLOWN_DOT #define CM_DEAD_ACUTE GR2A(KC_SCLN) // dead acute accent #define CM_DACT CM_DEAD_ACUTE +// nothing on È & À + +// Fourth row +#define CM_CENT GR2A(KC_C) // ¢ +#define CM_LEFT_DOUBLE_QUOTE GR2A(KC_V) // “ +#define CM_LDQT CM_LEFT_DOUBLE_QUOTE +#define CM_RIGHT_DOUBLE_QUOTE GR2A(KC_B) // ” +#define CM_RDQT CM_RIGHT_DOUBLE_QUOTE +#define CM_N_APOSTROPHE GR2A(KC_N) // ʼn (deprecated unicode codepoint) +#define CM_NAPO CM_N_APOSTROPHE +#define CM_MU GR2A(KC_M) // μ +// ─ TODO box drawing character? +#define CM_HYPHENATION_POINT GR2A(CM_DOT) // ‧ TODO not an interpunct ? + +// GR2A-shifted characters (non-exhaustive list) +// First row +#define CM_PLUS_MINUS LSFT(GR2A(KC_9)) // ± +#define CM_PSMS CM_PLUS_MINUS + +// Fourth row +#define CM_LEFT_QUOTE LSFT(GR2A(KC_V)) // ‘ +#define CM_LQOT CM_LEFT_QUOTE +#define CM_RIGHT_QUOTE LSFT(GR2A(KC_B)) // ’ +#define CM_RQOT CM_RIGHT_QUOTE #endif From 3a91ddb0745ae0f52007984793ea1b48abb2098c Mon Sep 17 00:00:00 2001 From: Didier Loiseau Date: Tue, 1 Mar 2016 22:59:38 +0100 Subject: [PATCH 10/23] Use CSA_ as prefix for Canadian Multilingual key aliases CM is already used for Colemak. --- keyboard/ergodox_ez/keymaps/bepo/keymap.c | 60 ++--- .../keymap_canadian_multilingual.h | 244 +++++++++--------- 2 files changed, 153 insertions(+), 151 deletions(-) diff --git a/keyboard/ergodox_ez/keymaps/bepo/keymap.c b/keyboard/ergodox_ez/keymaps/bepo/keymap.c index a3b8d9c49f..6cee216a43 100644 --- a/keyboard/ergodox_ez/keymaps/bepo/keymap.c +++ b/keyboard/ergodox_ez/keymaps/bepo/keymap.c @@ -111,22 +111,22 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [LR_CSA] = KEYMAP( // left hand - KC_DLR, CM_DQOT, CM_LGIL, CM_RGIL, KC_LPRN, KC_RPRN, KC_DELT, - KC_TAB, KC_B, CM_ECUT, KC_P, KC_O, CM_EGRV, KC_BSPC, - KC_EQL, KC_A, KC_U, KC_I, KC_E, KC_COMM, - M(M_CMSFT), CM_AGRV, KC_Y, KC_X, KC_DOT, KC_K, KC_ENT, - KC_LCTL, M(M_FNLR), KC_LGUI, KC_MPLY, ALT_T(KC_APP), + KC_DLR, CSA_DQOT, CSA_LGIL, CSA_RGIL, KC_LPRN, KC_RPRN, KC_DELT, + KC_TAB, KC_B, CSA_ECUT, KC_P, KC_O, CSA_EGRV, KC_BSPC, + KC_EQL, KC_A, KC_U, KC_I, KC_E, KC_COMM, + M(M_CMSFT), CSA_AGRV, KC_Y, KC_X, KC_DOT, KC_K, KC_ENT, + KC_LCTL, M(M_FNLR), KC_LGUI, KC_MPLY, ALT_T(KC_APP), ALT_T(KC_ESC), TG(LR_NUMR), KC_PGUP, KC_SPC, KC_LSFT, KC_PGDN, // right hand - KC_DELT, KC_AT, KC_PLUS, KC_MINS, CM_SLSH, KC_ASTR, KC_W, - KC_BSPC, CM_DCRC, KC_V, KC_D, KC_L, KC_J, KC_Z, - KC_C, KC_T, KC_S, KC_R, KC_N, KC_M, - KC_ENT, CM_APOS, KC_Q, KC_G, KC_H, KC_F, M(M_CMSFT), - MO(LR_CSA_AGR), KC_PERC, KC_HOME, CM_CCED, CTL_T(KC_END), + KC_DELT, KC_AT, KC_PLUS, KC_MINS, CSA_SLSH, KC_ASTR, KC_W, + KC_BSPC, CSA_DCRC, KC_V, KC_D, KC_L, KC_J, KC_Z, + KC_C, KC_T, KC_S, KC_R, KC_N, KC_M, + KC_ENT, CSA_APOS, KC_Q, KC_G, KC_H, KC_F, M(M_CMSFT), + MO(LR_CSA_AGR), KC_PERC, KC_HOME, CSA_CCED, CTL_T(KC_END), KC_LEFT, KC_RGHT, KC_UP, @@ -166,11 +166,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { M(M_NBSP), KC_TRNS, KC_TRNS, // right hand - KC_TRNS, M(M_6), M(M_7), M(M_8), M(M_9), M(M_0), KC_TRNS, - KC_TRNS, KC_EXLM, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, CM_QEST, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, M(M_GRV), KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, M(M_6), M(M_7), M(M_8), M(M_9), M(M_0), KC_TRNS, + KC_TRNS, KC_EXLM, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, CSA_QEST, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, M(M_GRV), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -200,22 +200,22 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [LR_CSA_AGR] = KEYMAP( // left hand - MUC(NDSH),MUC(MDSH),CM_LESS, CM_GRTR, CM_LBRC, CM_RBRC, KC_TRNS, - KC_TRNS, CM_PIPE, CM_DACT, KC_AMPR, CM_OE, CM_DGRV, KC_TRNS, - KC_NO, CM_AE, CM_UGRV, CM_DTRM, CM_EURO, CM_RQOT, - KC_TRNS, CM_BSLS, CM_LCBR, CM_RCBR, MUC(ELPS),CM_TILD, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + MUC(NDSH), MUC(MDSH), CSA_LESS, CSA_GRTR, CSA_LBRC, CSA_RBRC, KC_TRNS, + KC_TRNS, CSA_PIPE, CSA_DACT, KC_AMPR, CSA_OE, CSA_DGRV, KC_TRNS, + KC_NO, CSA_AE, CSA_UGRV, CSA_DTRM, CSA_EURO, CSA_RQOT, + KC_TRNS, CSA_BSLS, CSA_LCBR, CSA_RCBR, MUC(ELPS), CSA_TILD, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UNDS, KC_TRNS, KC_TRNS, // right hand - KC_TRNS, M(M_CRC), CM_PSMS, KC_NO, KC_NO, KC_NO, KC_NO, - KC_TRNS, KC_NO, KC_NO, CM_ETH, KC_NO, CM_IJ, KC_NO, - KC_NO, CM_THRN, CM_SRPS, KC_NO, CM_DTLD, KC_TRNS, - KC_TRNS, KC_NO, KC_NO, CM_MU, KC_NO, KC_NO, KC_NO, - KC_TRNS, KC_NO, KC_TRNS, CM_DCED, KC_TRNS, + KC_TRNS, M(M_CRC), CSA_PSMS, KC_NO, KC_NO, KC_NO, KC_NO, + KC_TRNS, KC_NO, KC_NO, CSA_ETH, KC_NO, CSA_IJ, KC_NO, + KC_NO, CSA_THRN, CSA_SRPS, KC_NO, CSA_DTLD, KC_TRNS, + KC_TRNS, KC_NO, KC_NO, CSA_MU, KC_NO, KC_NO, KC_NO, + KC_TRNS, KC_NO, KC_TRNS, CSA_DCED, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -385,13 +385,13 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) register_code(KC_1 + (id - M_1)); break; case M_DEGR: - return MACRO(DOWN(CM_ALTGR), D(SCLN), END); + return MACRO(DOWN(CSA_ALTGR), D(SCLN), END); case M_SCLN: return MACRO(D(SCLN), END); case M_GRV: - return MACRO(DOWN(CM_ALTGR), TYPE(CM_DCRC), UP(CM_ALTGR), T(SPACE), END); + return MACRO(DOWN(CSA_ALTGR), TYPE(CSA_DCRC), UP(CSA_ALTGR), T(SPACE), END); case M_NBSP: - return MACRO(DOWN(CM_ALTGR), T(SPACE), UP(CM_ALTGR), END); + return MACRO(DOWN(CSA_ALTGR), T(SPACE), UP(CSA_ALTGR), END); } } else { hold_shift(); @@ -400,7 +400,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) unregister_code(KC_1 + (id - M_1)); break; case M_DEGR: - return MACRO(UP(CM_ALTGR), D(LSFT), U(SCLN), END); + return MACRO(UP(CSA_ALTGR), D(LSFT), U(SCLN), END); case M_SCLN: return MACRO(D(LSFT), U(SCLN), END); } @@ -408,7 +408,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) break; case M_CRC: if (record->event.pressed) { - return MACRO(TYPE(CM_DCRC), T(SPACE), END); + return MACRO(TYPE(CSA_DCRC), T(SPACE), END); } break; case M_DBL0: diff --git a/quantum/keymap_extras/keymap_canadian_multilingual.h b/quantum/keymap_extras/keymap_canadian_multilingual.h index 9b13b1e4e6..b1d7b4e779 100644 --- a/quantum/keymap_extras/keymap_canadian_multilingual.h +++ b/quantum/keymap_extras/keymap_canadian_multilingual.h @@ -11,8 +11,8 @@ #define ALGR(kc) ALTGR(kc) #endif -#define CM_ALTGR KC_RALT -#define CM_ALGR CM_ALTGR +#define CSA_ALTGR KC_RALT +#define CSA_ALGR CSA_ALTGR #ifndef GR2A #define GR2A(kc) RCTL(kc) @@ -20,170 +20,172 @@ // Normal characters // First row -#define CM_SLASH KC_GRV // / -#define CM_SLSH CM_SLASH +#define CSA_SLASH KC_GRV // / +#define CSA_SLSH CSA_SLASH // Second row -#define CM_DEAD_CIRCUMFLEX KC_LBRACKET // dead ^ -#define CM_DCRC CM_DEAD_CIRCUMFLEX -#define CM_C_CEDILLA KC_RBRACKET // Ç -#define CM_CCED CM_C_CEDILLA +#define CSA_DEAD_CIRCUMFLEX KC_LBRACKET // dead ^ +#define CSA_DCRC CSA_DEAD_CIRCUMFLEX +#define CSA_C_CEDILLA KC_RBRACKET // Ç +#define CSA_CCED CSA_C_CEDILLA // Third row -#define CM_E_GRAVE KC_QUOT // è -#define CM_EGRV CM_E_GRAVE -#define CM_A_GRAVE KC_BSLASH // à -#define CM_AGRV CM_A_GRAVE +#define CSA_E_GRAVE KC_QUOT // è +#define CSA_EGRV CSA_E_GRAVE +#define CSA_A_GRAVE KC_BSLASH // à +#define CSA_AGRV CSA_A_GRAVE // Fourth row -#define CM_U_GRAVE KC_NONUS_BSLASH // ù -#define CM_UGRV CM_U_GRAVE -#define CM_E_ACUTE KC_SLSH // é -#define CM_ECUT CM_E_ACUTE +#define CSA_U_GRAVE KC_NONUS_BSLASH // ù +#define CSA_UGRV CSA_U_GRAVE +#define CSA_E_ACUTE KC_SLSH // é +#define CSA_ECUT CSA_E_ACUTE // Shifted characters // First row -#define CM_BACKSLASH LSFT(CM_SLASH) /* \ */ -#define CM_BSLS CM_BACKSLASH -#define CM_QUESTION LSFT(KC_6) // ? -#define CM_QEST CM_QUESTION +#define CSA_BACKSLASH LSFT(CSA_SLASH) /* \ */ +#define CSA_BSLS CSA_BACKSLASH +#define CSA_QUESTION LSFT(KC_6) // ? +#define CSA_QEST CSA_QUESTION // Second row -#define CM_DEAD_TREMA LSFT(CM_DEAD_CIRCUMFLEX) // dead trema/umlaut/diaresis for ä ë ï ö ü -#define CM_DTRM CM_DEAD_TREMA +#define CSA_DEAD_TREMA LSFT(CSA_DEAD_CIRCUMFLEX) // dead trema/umlaut/diaresis for ä ë ï ö ü +#define CSA_DTRM CSA_DEAD_TREMA // Third row // all same as US-QWERTY, or capitalised character of the non-shifted key // Fourth row -#define CM_APOSTROPHE LSFT(KC_COMMA) // ' -#define CM_APOS CM_APOSTROPHE -#define CM_DOUBLE_QUOTE LSFT(KC_DOT) // " -#define CM_DQOT CM_DOUBLE_QUOTE +#define CSA_APOSTROPHE LSFT(KC_COMMA) // ' +#define CSA_APOS CSA_APOSTROPHE +#define CSA_DOUBLE_QUOTE LSFT(KC_DOT) // " +#define CSA_DQOT CSA_DOUBLE_QUOTE // Alt Gr-ed characters // First row -#define CM_PIPE ALTGR(CM_SLASH) // | -#define CM_CURRENCY ALTGR(KC_4) // ¤ -#define CM_CURR CM_CURRENCY -#define CM_LEFT_CURLY_BRACE ALTGR(KC_7) // { -#define CM_LCBR CM_LEFT_CURLY_BRACE -#define CM_RIGHT_CURLY_BRACE ALTGR(KC_8) // } -#define CM_RCBR CM_RIGHT_CURLY_BRACE -#define CM_LBRACKET ALTGR(KC_9) // [ -#define CM_LBRC CM_LBRACKET -#define CM_RBRACKET ALTGR(KC_0) // ] -#define CM_RBRC CM_RBRACKET -#define CM_NEGATION ALTGR(KC_EQUAL) // ¬ -#define CM_NEGT CM_NEGATION +#define CSA_PIPE ALTGR(CSA_SLASH) // | +#define CSA_CURRENCY ALTGR(KC_4) // ¤ +#define CSA_CURR CSA_CURRENCY +#define CSA_LEFT_CURLY_BRACE ALTGR(KC_7) // { +#define CSA_LCBR CSA_LEFT_CURLY_BRACE +#define CSA_RIGHT_CURLY_BRACE ALTGR(KC_8) // } +#define CSA_RCBR CSA_RIGHT_CURLY_BRACE +#define CSA_LBRACKET ALTGR(KC_9) // [ +#define CSA_LBRC CSA_LBRACKET +#define CSA_RBRACKET ALTGR(KC_0) // ] +#define CSA_RBRC CSA_RBRACKET +#define CSA_NEGATION ALTGR(KC_EQUAL) // ¬ +#define CSA_NEGT CSA_NEGATION // Second row // euro symbol not available on Linux? (X.org) -#define CM_EURO ALTGR(KC_E) // € -#define CM_DEAD_GRAVE ALTGR(CM_DEAD_CIRCUMFLEX) -#define CM_DGRV CM_DEAD_GRAVE // dead ` -#define CM_TILDE ALTGR(CM_C_CEDILLA) // ~ -#define CM_TILD CM_TILDE +#define CSA_EURO ALTGR(KC_E) // € +#define CSA_DEAD_GRAVE ALTGR(CSA_DEAD_CIRCUMFLEX) +#define CSA_DGRV CSA_DEAD_GRAVE // dead ` +#define CSA_TILDE ALTGR(CSA_C_CEDILLA) // ~ +#define CSA_TILD CSA_TILDE // Third row -#define CM_DEGREE ALTGR(KC_SCOLON) // ° -#define CM_DEGR CM_DEGREE +#define CSA_DEGREE ALTGR(KC_SCOLON) // ° +#define CSA_DEGR CSA_DEGREE // Fourth row -#define CM_LEFT_GUILLEMET ALTGR(KC_Z) // « -#define CM_LGIL CM_LEFT_GUILLEMET -#define CM_RIGHT_GUILLEMET ALTGR(KC_X) // » -#define CM_RGIL CM_RIGHT_GUILLEMET -#define CM_LESS ALTGR(KC_COMMA) // < -#define CM_GREATER ALTGR(KC_DOT) // > -#define CM_GRTR CM_GREATER +#define CSA_LEFT_GUILLEMET ALTGR(KC_Z) // « +#define CSA_LGIL CSA_LEFT_GUILLEMET +#define CSA_RIGHT_GUILLEMET ALTGR(KC_X) // » +#define CSA_RGIL CSA_RIGHT_GUILLEMET +#define CSA_LESS ALTGR(KC_COMMA) // < +#define CSA_GREATER ALTGR(KC_DOT) // > +#define CSA_GRTR CSA_GREATER // Space bar -#define CM_NON_BREAKING_SPACE ALTGR(KC_SPACE) -#define CM_NBSP CM_NON_BREAKING_SPACE +#define CSA_NON_BREAKING_SPACE ALTGR(KC_SPACE) +#define CSA_NBSP CSA_NON_BREAKING_SPACE // GR2A-ed characters (non-exhaustive list) // First row -#define CM_SUPERSCRIPT_ONE GR2A(KC_1) // ¹ -#define CM_SUP1 CM_SUPERSCRIPT_ONE -#define CM_SUPERSCRIPT_TWO GR2A(KC_2) // ² -#define CM_SUP2 CM_SUPERSCRIPT_TWO -#define CM_SUPERSCRIPT_THREE GR2A(KC_3) // ³ -#define CM_SUP3 CM_SUPERSCRIPT_THREE -#define CM_ONE_QUARTER GR2A(KC_4) // ¼ -#define CM_1QRT CM_ONE_QUARTER -#define CM_ONE_HALF GR2A(KC_5) // ½ -#define CM_1HLF CM_ONE_HALF -#define CM_THREE_QUARTERS GR2A(KC_6) // ¾ -#define CM_3QRT CM_THREE_QUARTERS +#define CSA_SUPERSCRIPT_ONE GR2A(KC_1) // ¹ +#define CSA_SUP1 CSA_SUPERSCRIPT_ONE +#define CSA_SUPERSCRIPT_TWO GR2A(KC_2) // ² +#define CSA_SUP2 CSA_SUPERSCRIPT_TWO +#define CSA_SUPERSCRIPT_THREE GR2A(KC_3) // ³ +#define CSA_SUP3 CSA_SUPERSCRIPT_THREE +#define CSA_ONE_QUARTER GR2A(KC_4) // ¼ +#define CSA_1QRT CSA_ONE_QUARTER +#define CSA_ONE_HALF GR2A(KC_5) // ½ +#define CSA_1HLF CSA_ONE_HALF +#define CSA_THREE_QUARTERS GR2A(KC_6) // ¾ +#define CSA_3QRT CSA_THREE_QUARTERS // nothing on 7-0 and - -#define CM_DEAD_CEDILLA GR2A(KC_EQUAL) // dead ¸ -#define CM_DCED CM_DEAD_CEDILLA +#define CSA_DEAD_CEDILLA GR2A(KC_EQUAL) // dead ¸ +#define CSA_DCED CSA_DEAD_CEDILLA // Second row -#define CM_OMEGA GR2A(KC_Q) // ω -#define CM_OMEG CM_OMEGA -#define CM_L_STROKE GR2A(KC_W) // ł -#define CM_LSTK CM_L_STROKE -#define CM_OE_LIGATURE GR2A(KC_E) // œ -#define CM_OE CM_OE_LIGATURE -#define CM_PARAGRAPH GR2A(KC_R) // ¶ -#define CM_PARG CM_PARAGRAPH -#define CM_T_STROKE GR2A(KC_T) // ŧ -#define CM_LEFT_ARROW GR2A(KC_Y) // ← -#define CM_LARW CM_LEFT_ARROW -#define CM_DOWN_ARROW GR2A(KC_U) // ↓ -#define CM_DARW CM_DOWN_ARROW -#define CM_RIGHT_ARROW GR2A(KC_I) // → -#define CM_RARW CM_RIGHT_ARROW -#define CM_O_STROKE GR2A(KC_O) // ø -#define CM_OSTK CM_O_STROKE -#define CM_THORN GR2A(KC_P) // þ -#define CM_THRN CM_THORN +#define CSA_OMEGA GR2A(KC_Q) // ω +#define CSA_OMEG CSA_OMEGA +#define CSA_L_STROKE GR2A(KC_W) // ł +#define CSA_LSTK CSA_L_STROKE +#define CSA_OE_LIGATURE GR2A(KC_E) // œ +#define CSA_OE CSA_OE_LIGATURE +#define CSA_PARAGRAPH GR2A(KC_R) // ¶ +#define CSA_PARG CSA_PARAGRAPH +#define CSA_T_STROKE GR2A(KC_T) // ŧ +#define CSA_LEFT_ARROW GR2A(KC_Y) // ← +#define CSA_LARW CSA_LEFT_ARROW +#define CSA_DOWN_ARROW GR2A(KC_U) // ↓ +#define CSA_DARW CSA_DOWN_ARROW +#define CSA_RIGHT_ARROW GR2A(KC_I) // → +#define CSA_RARW CSA_RIGHT_ARROW +#define CSA_O_STROKE GR2A(KC_O) // ø +#define CSA_OSTK CSA_O_STROKE +#define CSA_THORN GR2A(KC_P) // þ +#define CSA_THRN CSA_THORN // nothing on ^ -#define CM_DEAD_TILDE GR2A(CM_C_CEDILLA) // dead ~ -#define CM_DTLD CM_DEAD_TILDE +#define CSA_DEAD_TILDE GR2A(CSA_C_CEDILLA) // dead ~ +#define CSA_DTLD CSA_DEAD_TILDE // Third row -#define CM_AE_LIGATURE GR2A(KC_A) // æ -#define CM_AE CM_AE_LIGATURE -#define CM_SHARP_S GR2A(KC_S) // ß -#define CM_SRPS CM_SHARP_S -#define CM_ETH GR2A(KC_D) // ð +#define CSA_AE_LIGATURE GR2A(KC_A) // æ +#define CSA_AE CSA_AE_LIGATURE +#define CSA_SHARP_S GR2A(KC_S) // ß +#define CSA_SRPS CSA_SHARP_S +#define CSA_ETH GR2A(KC_D) // ð // nothing on F -#define CM_ENG GR2A(KC_G) // ŋ -#define CM_H_SRTOKE GR2A(KC_H) // ħ -#define CM_HSTK CM_H_SRTOKE -#define CM_IJ_LIGATURE GR2A(KC_J) // ij -#define CM_IJ CM_IJ_LIGATURE -#define CM_KRA GR2A(KC_K) // ĸ -#define CM_L_FLOWN_DOT GR2A(KC_L) // ŀ -#define CM_LFLD CM_L_FLOWN_DOT -#define CM_DEAD_ACUTE GR2A(KC_SCLN) // dead acute accent -#define CM_DACT CM_DEAD_ACUTE +#define CSA_ENG GR2A(KC_G) // ŋ +#define CSA_H_SRTOKE GR2A(KC_H) // ħ +#define CSA_HSTK CSA_H_SRTOKE +#define CSA_IJ_LIGATURE GR2A(KC_J) // ij +#define CSA_IJ CSA_IJ_LIGATURE +#define CSA_KRA GR2A(KC_K) // ĸ +#define CSA_L_FLOWN_DOT GR2A(KC_L) // ŀ +#define CSA_LFLD CSA_L_FLOWN_DOT +#define CSA_DEAD_ACUTE GR2A(KC_SCLN) // dead acute accent +#define CSA_DACT CSA_DEAD_ACUTE // nothing on È & À // Fourth row -#define CM_CENT GR2A(KC_C) // ¢ -#define CM_LEFT_DOUBLE_QUOTE GR2A(KC_V) // “ -#define CM_LDQT CM_LEFT_DOUBLE_QUOTE -#define CM_RIGHT_DOUBLE_QUOTE GR2A(KC_B) // ” -#define CM_RDQT CM_RIGHT_DOUBLE_QUOTE -#define CM_N_APOSTROPHE GR2A(KC_N) // ʼn (deprecated unicode codepoint) -#define CM_NAPO CM_N_APOSTROPHE -#define CM_MU GR2A(KC_M) // μ -// ─ TODO box drawing character? -#define CM_HYPHENATION_POINT GR2A(CM_DOT) // ‧ TODO not an interpunct ? +#define CSA_CENT GR2A(KC_C) // ¢ +#define CSA_LEFT_DOUBLE_QUOTE GR2A(KC_V) // “ +#define CSA_LDQT CSA_LEFT_DOUBLE_QUOTE +#define CSA_RIGHT_DOUBLE_QUOTE GR2A(KC_B) // ” +#define CSA_RDQT CSA_RIGHT_DOUBLE_QUOTE +#define CSA_N_APOSTROPHE GR2A(KC_N) // ʼn (deprecated unicode codepoint) +#define CSA_NAPO CSA_N_APOSTROPHE +#define CSA_MU GR2A(KC_M) // μ +#define CSA_HORIZONTAL_BAR GR2A(KC_COMMA) // ― +#define CSA_HZBR CSA_HORIZONTAL_BAR +#define CSA_DEAD_DOT_ABOVE GR2A(KC_DOT) // dead ˙ +#define CSA_DOTA CSA_DEAD_DOT_ABOVE // GR2A-shifted characters (non-exhaustive list) // First row -#define CM_PLUS_MINUS LSFT(GR2A(KC_9)) // ± -#define CM_PSMS CM_PLUS_MINUS +#define CSA_PLUS_MINUS LSFT(GR2A(KC_9)) // ± +#define CSA_PSMS CSA_PLUS_MINUS // Fourth row -#define CM_LEFT_QUOTE LSFT(GR2A(KC_V)) // ‘ -#define CM_LQOT CM_LEFT_QUOTE -#define CM_RIGHT_QUOTE LSFT(GR2A(KC_B)) // ’ -#define CM_RQOT CM_RIGHT_QUOTE +#define CSA_LEFT_QUOTE LSFT(GR2A(KC_V)) // ‘ +#define CSA_LQOT CSA_LEFT_QUOTE +#define CSA_RIGHT_QUOTE LSFT(GR2A(KC_B)) // ’ +#define CSA_RQOT CSA_RIGHT_QUOTE #endif From b2a4434abbfe63902be668c34995587193f778dd Mon Sep 17 00:00:00 2001 From: Didier Loiseau Date: Tue, 8 Mar 2016 23:27:18 +0100 Subject: [PATCH 11/23] =?UTF-8?q?B=C3=89PO=20over=20CSA:=20Fixed=20key=20r?= =?UTF-8?q?epeat=20for=20M=5FNBSP?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- keyboard/ergodox_ez/keymaps/bepo/keymap.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/keyboard/ergodox_ez/keymaps/bepo/keymap.c b/keyboard/ergodox_ez/keymaps/bepo/keymap.c index 6cee216a43..db6c9583eb 100644 --- a/keyboard/ergodox_ez/keymaps/bepo/keymap.c +++ b/keyboard/ergodox_ez/keymaps/bepo/keymap.c @@ -2,6 +2,7 @@ #include "ergodox_ez.h" #include "debug.h" #include "action_layer.h" +#include "action_util.h" #include "led.h" #include "keymap_extras/keymap_bepo.h" #include "keymap_extras/keymap_canadian_multilingual.h" @@ -391,7 +392,9 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) case M_GRV: return MACRO(DOWN(CSA_ALTGR), TYPE(CSA_DCRC), UP(CSA_ALTGR), T(SPACE), END); case M_NBSP: - return MACRO(DOWN(CSA_ALTGR), T(SPACE), UP(CSA_ALTGR), END); + // use weak mod such that pressing another key will not be affected + add_weak_mods(MOD_BIT(CSA_ALTGR)); + return MACRO(D(SPACE), END); } } else { hold_shift(); @@ -403,6 +406,9 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) return MACRO(UP(CSA_ALTGR), D(LSFT), U(SCLN), END); case M_SCLN: return MACRO(D(LSFT), U(SCLN), END); + case M_NBSP: + del_weak_mods(MOD_BIT(CSA_ALTGR)); + return MACRO(U(SPACE), END); } } break; From aa5eb49edd993e2abe3adf814e030fcdda4a3596 Mon Sep 17 00:00:00 2001 From: Didier Loiseau Date: Wed, 2 Mar 2016 00:22:41 +0100 Subject: [PATCH 12/23] =?UTF-8?q?B=C3=89PO=20over=20CSA:=20GR2A-shifted=20?= =?UTF-8?q?characters=20in=20AltGr=20layer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - define aliases for all GR2A-shifted characters - use the available characters in BÉPO over CSA AltGr layer --- keyboard/ergodox_ez/keymaps/bepo/keymap.c | 18 ++-- .../keymap_canadian_multilingual.h | 86 ++++++++++++++++--- 2 files changed, 84 insertions(+), 20 deletions(-) diff --git a/keyboard/ergodox_ez/keymaps/bepo/keymap.c b/keyboard/ergodox_ez/keymaps/bepo/keymap.c index db6c9583eb..e339792bf3 100644 --- a/keyboard/ergodox_ez/keymaps/bepo/keymap.c +++ b/keyboard/ergodox_ez/keymaps/bepo/keymap.c @@ -181,13 +181,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * "////" indicates that the key is disabled (unsupported bépo character) * * ,--------------------------------------------------. ,--------------------------------------------------. - * | – | — | < | > | [ | ] | | | | ^ | ± | //// | //// | //// | ////// | + * | – | — | < | > | [ | ] | | | | ^ | ± | //// | ÷ | × | dead ˘ | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | | |dead '| & | œ |dead `| | | | //// | //// | ð | //// | ij | ////// | + * | | | |dead '| & | œ |dead `| | | | ¡ |dead ˇ| ð | //// | ij | ////// | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | ////// | æ | ù |dead "| € | ̛’ |------| |------| //// | þ | ß | //// |dead ~| ////// | + * | ////// | æ | ù |dead "| € | ̛’ |------| |------| © | þ | ß | ® |dead ~| dead ¯ | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | \ | { | } | … | ~ | | | | //// | //// | μ | //// | //// | | + * | | \ | { | } | … | ~ | | | | ¿ |dead °| μ | //// |dead ˛| | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * | | | | | | | | //// | |dead ¸| | * `----------------------------------' `-----------------------------------' @@ -212,11 +212,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_UNDS, KC_TRNS, KC_TRNS, // right hand - KC_TRNS, M(M_CRC), CSA_PSMS, KC_NO, KC_NO, KC_NO, KC_NO, - KC_TRNS, KC_NO, KC_NO, CSA_ETH, KC_NO, CSA_IJ, KC_NO, - KC_NO, CSA_THRN, CSA_SRPS, KC_NO, CSA_DTLD, KC_TRNS, - KC_TRNS, KC_NO, KC_NO, CSA_MU, KC_NO, KC_NO, KC_NO, - KC_TRNS, KC_NO, KC_TRNS, CSA_DCED, KC_TRNS, + KC_TRNS, M(M_CRC), CSA_PSMS, KC_NO, CSA_DVSN, CSA_TIMS, CSA_DBRV, + KC_TRNS, CSA_IXLM, CSA_DCAR, CSA_ETH, KC_NO, CSA_IJ, KC_NO, + CSA_CPRT, CSA_THRN, CSA_SRPS, CSA_RTM, CSA_DTLD, CSA_DMCR, + KC_TRNS, CSA_IQST, CSA_DRNG, CSA_MU, KC_NO, CSA_DOGO, KC_TRNS, + KC_TRNS, KC_NO, KC_TRNS, CSA_DCED, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/quantum/keymap_extras/keymap_canadian_multilingual.h b/quantum/keymap_extras/keymap_canadian_multilingual.h index b1d7b4e779..c720088e8c 100644 --- a/quantum/keymap_extras/keymap_canadian_multilingual.h +++ b/quantum/keymap_extras/keymap_canadian_multilingual.h @@ -82,8 +82,8 @@ #define CSA_EURO ALTGR(KC_E) // € #define CSA_DEAD_GRAVE ALTGR(CSA_DEAD_CIRCUMFLEX) #define CSA_DGRV CSA_DEAD_GRAVE // dead ` -#define CSA_TILDE ALTGR(CSA_C_CEDILLA) // ~ -#define CSA_TILD CSA_TILDE +#define CSA_DEAD_TILDE ALTGR(CSA_C_CEDILLA) // ~ +#define CSA_DTLD CSA_DEAD_TILDE // Third row #define CSA_DEGREE ALTGR(KC_SCOLON) // ° @@ -102,7 +102,7 @@ #define CSA_NON_BREAKING_SPACE ALTGR(KC_SPACE) #define CSA_NBSP CSA_NON_BREAKING_SPACE -// GR2A-ed characters (non-exhaustive list) +// GR2A-ed characters // First row #define CSA_SUPERSCRIPT_ONE GR2A(KC_1) // ¹ #define CSA_SUP1 CSA_SUPERSCRIPT_ONE @@ -141,8 +141,8 @@ #define CSA_THORN GR2A(KC_P) // þ #define CSA_THRN CSA_THORN // nothing on ^ -#define CSA_DEAD_TILDE GR2A(CSA_C_CEDILLA) // dead ~ -#define CSA_DTLD CSA_DEAD_TILDE +#define CSA_TILDE GR2A(CSA_C_CEDILLA) // dead ~ +#define CSA_TILD CSA_TILDE // Third row #define CSA_AE_LIGATURE GR2A(KC_A) // æ @@ -175,17 +175,81 @@ #define CSA_HORIZONTAL_BAR GR2A(KC_COMMA) // ― #define CSA_HZBR CSA_HORIZONTAL_BAR #define CSA_DEAD_DOT_ABOVE GR2A(KC_DOT) // dead ˙ -#define CSA_DOTA CSA_DEAD_DOT_ABOVE +#define CSA_DDTA CSA_DEAD_DOT_ABOVE -// GR2A-shifted characters (non-exhaustive list) +// GR2A-shifted characters (different from capitalised GR2A-ed characters) // First row -#define CSA_PLUS_MINUS LSFT(GR2A(KC_9)) // ± -#define CSA_PSMS CSA_PLUS_MINUS +#define CSA_SOFT_HYPHEN GR2A(LSFT(CSA_SLASH)) // soft-hyphen, appears as a hyphen in wrapped word +#define CSA_SHYP CSA_SOFT_HYPHEN +#define CSA_INVERTED_EXCLAIM GR2A(KC_EXCLAIM) // ¡ +#define CSA_IXLM CSA_INVERTED_EXCLAIM +// nothing on 2 +#define CSA_POUND GR2A(LSFT(KC_3)) // £ +#define CSA_GBP CSA_POUND_SIGN +// already on ALTGR(KC_E) +#define CSA_EURO_BIS GR2A(LSFT(KC_4)) // € +#define CSA_EURB CSA_EURO_BIS +#define CSA_THREE_EIGHTHS GR2A(LSFT(KC_5)) // ⅜ +#define CSA_3ON8 CSA_THREE_EIGHTHS +#define CSA_FIVE_EIGHTHS GR2A(LSFT(KC_6)) // ⅝ +#define CSA_5ON8 CSA_FIVE_EIGHTHS +#define CSA_SEVEN_EIGHTHS GR2A(LSFT(KC_7)) // ⅞ +#define CSA_7ON8 CSA_SEVEN_EIGHTHS +#define CSA_TRADEMARK GR2A(LSFT(KC_8)) // ™ +#define CSA_TM CSA_TRADEMARK +#define CSA_PLUS_MINUS GR2A(LSFT(KC_9)) // ± +#define CSA_PSMS CSA_PLUS_MINUS +// nothing on 0 +#define CSA_INVERTED_QUESTION GR2A(LSFT(KC_MINUS)) // ¿ +#define CSA_IQST CSA_INVERTED_QUESTION +#define CSA_DEAD_OGONEK GR2A(LSFT(KC_EQUAL)) // dead ˛ +#define CSA_DOGO CSA_DEAD_OGONEK + +// Second row +#define CSA_REGISTERED_TRADEMARK GR2A(LSFT(KC_R)) // ® +#define CSA_RTM CSA_REGISTERED_TRADEMARK +#define CSA_YEN GR2A(LSFT(KC_Y)) // ¥ +#define CSA_YUAN CSA_YEN +#define CSA_UP_ARROW LSFT(CSA_DOWN_ARROW) // ↑ +#define CSA_DOTLESS_I GR2A(LSFT(KC_I)) // ı +#define CSA_DLSI CSA_DOTLESS_I +#define CSA_DEAD_RING GR2A(LSFT(CSA_DCRC)) // dead ° +#define CSA_DRNG CSA_DEAD_RING +#define CSA_DEAD_MACRON GR2A(LSFT(CSA_C_CEDILLA)) // dead ¯ +#define CSA_DMCR CSA_DEAD_MACRON + +// Third row +#define CSA_SECTION GR2A(LSFT(KC_S)) // § +#define CSA_SECT CSA_SECTION +#define CSA_ORDINAL_INDICATOR_A GR2A(LSFT(KC_F)) // ª +#define CSA_ORDA CSA_ORDINAL_INDICATOR_A +#define CSA_DEAD_DOUBLE_ACUTE LSFT(CSA_DEAD_ACUTE) // ˝ +#define CSA_DDCT CSA_DEAD_DOUBLE_ACUTE +#define CSA_DEAD_CARON GR2A(LSFT(CSA_E_GRAVE)) // dead ˇ +#define CSA_DCAR CSA_DEAD_CARON +#define CSA_DEAD_BREVE GR2A(LSFT(CSA_A_GRAVE)) // dead ˘ +#define CSA_DBRV CSA_DEAD_BREVE // Fourth row -#define CSA_LEFT_QUOTE LSFT(GR2A(KC_V)) // ‘ +#define CSA_BROKEN_PIPE GR2A(LSFT(CSA_U_GRAVE)) // ¦ +#define CSA_BPIP CSA_BROKEN_PIPE +#define CSA_COPYRIGHT GR2A(LSFT(KC_C)) // © +#define CSA_CPRT CSA_COPYRIGHT +#define CSA_LEFT_QUOTE GR2A(LSFT(KC_V)) // ‘ #define CSA_LQOT CSA_LEFT_QUOTE -#define CSA_RIGHT_QUOTE LSFT(GR2A(KC_B)) // ’ +#define CSA_RIGHT_QUOTE GR2A(LSFT(KC_B)) // ’ #define CSA_RQOT CSA_RIGHT_QUOTE +#define CSA_EIGHTH_NOTE GR2A(LSFT(KC_N)) // ♪ +#define CSA_8NOT CSA_EIGHTH_NOTE +#define CSA_ORDINAL_INDICATOR_O GR2A(LSFT(KC_M)) // º +#define CSA_ORDO CSA_ORDINAL_INDICATOR_O +#define CSA_TIMES GR2A(LSFT(KC_COMMA)) // × +#define CSA_TIMS CSA_TIMES +#define CSA_OBELUS GR2A(LSFT(KC_DOT)) // ÷ +#define CSA_OBEL CSA_OBELUS +// more conventional name of the symbol +#define CSA_DIVISION_SIGN CSA_OBELUS +#define CSA_DVSN CSA_DIVISION_SIGN +// TODO GR2A(LSFT(CSA_E_ACUTE)) #endif From 6c672dfdc6f3a9e7df79462d79c34e5750a72edf Mon Sep 17 00:00:00 2001 From: Didier Loiseau Date: Tue, 8 Mar 2016 22:06:27 +0100 Subject: [PATCH 13/23] =?UTF-8?q?B=C3=89PO=20over=20CSA:=20Altgr-shifted?= =?UTF-8?q?=20layer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - all characters available directly in CSA - more explicit names for macros that switch accross CSA layers - use macros to implement the shifts next to the spaces --- keyboard/ergodox_ez/keymaps/bepo/keymap.c | 110 +++++++++++++++++----- 1 file changed, 88 insertions(+), 22 deletions(-) diff --git a/keyboard/ergodox_ez/keymaps/bepo/keymap.c b/keyboard/ergodox_ez/keymaps/bepo/keymap.c index e339792bf3..2b76fea221 100644 --- a/keyboard/ergodox_ez/keymaps/bepo/keymap.c +++ b/keyboard/ergodox_ez/keymaps/bepo/keymap.c @@ -27,8 +27,10 @@ enum macros { UC_ELPS, // … END_UC, // indicates the last unicode character macro // other macros - M_TGCM, // toggle CA-mult - M_CMSFT, // toggle shift on CA-mult + M_TGCSA, // toggle BÉPO over CSA + M_CSA_SFT, // toggle shift on CSA + M_CSA_AGR_SFT, // toggle shift on LR_CSA_AGR (goes to LR_CSA_AGR_SFT) + M_CSA_SFT_AGR, // toggle AltGr on LR_CSA_SFT (goes to LR_CSA_AGR_SFT) // macros for characters that need to be un-shifted in LR_CA_MULT_SHIFT M_1, M_2, @@ -51,14 +53,16 @@ enum macros { M_FNLR, }; +#define CSA(name) M(M_CSA_##name) // calls a CSA macro + const uint16_t unicode_chars[] = { [UC_NDSH] = L'–', [UC_MDSH] = L'—', [UC_ELPS] = L'…', }; -/* shortcut for unicod character macros */ -#define MUC(name) M(UC_##name) +/* shortcut for unicode character macros */ +#define MUC(name) M(UC_##name) // calls a unicode macro const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Basic layer @@ -115,23 +119,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_DLR, CSA_DQOT, CSA_LGIL, CSA_RGIL, KC_LPRN, KC_RPRN, KC_DELT, KC_TAB, KC_B, CSA_ECUT, KC_P, KC_O, CSA_EGRV, KC_BSPC, KC_EQL, KC_A, KC_U, KC_I, KC_E, KC_COMM, - M(M_CMSFT), CSA_AGRV, KC_Y, KC_X, KC_DOT, KC_K, KC_ENT, + CSA(SFT), CSA_AGRV, KC_Y, KC_X, KC_DOT, KC_K, KC_ENT, KC_LCTL, M(M_FNLR), KC_LGUI, KC_MPLY, ALT_T(KC_APP), ALT_T(KC_ESC), TG(LR_NUMR), KC_PGUP, - KC_SPC, KC_LSFT, KC_PGDN, + KC_SPC, CSA(SFT), KC_PGDN, // right hand KC_DELT, KC_AT, KC_PLUS, KC_MINS, CSA_SLSH, KC_ASTR, KC_W, KC_BSPC, CSA_DCRC, KC_V, KC_D, KC_L, KC_J, KC_Z, KC_C, KC_T, KC_S, KC_R, KC_N, KC_M, - KC_ENT, CSA_APOS, KC_Q, KC_G, KC_H, KC_F, M(M_CMSFT), + KC_ENT, CSA_APOS, KC_Q, KC_G, KC_H, KC_F, CSA(SFT), MO(LR_CSA_AGR), KC_PERC, KC_HOME, CSA_CCED, CTL_T(KC_END), KC_LEFT, KC_RGHT, KC_UP, - KC_DOWN, KC_RSFT, KC_SPC + KC_DOWN, CSA(SFT), KC_SPC ), /* Shifted BÉPO over Canadian Multilingual * @@ -171,7 +175,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_EXLM, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, CSA_QEST, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, M(M_GRV), KC_TRNS, KC_TRNS, KC_TRNS, + CSA(SFT_AGR), M(M_GRV), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -201,26 +205,71 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [LR_CSA_AGR] = KEYMAP( // left hand - MUC(NDSH), MUC(MDSH), CSA_LESS, CSA_GRTR, CSA_LBRC, CSA_RBRC, KC_TRNS, - KC_TRNS, CSA_PIPE, CSA_DACT, KC_AMPR, CSA_OE, CSA_DGRV, KC_TRNS, - KC_NO, CSA_AE, CSA_UGRV, CSA_DTRM, CSA_EURO, CSA_RQOT, - KC_TRNS, CSA_BSLS, CSA_LCBR, CSA_RCBR, MUC(ELPS), CSA_TILD, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + MUC(NDSH), MUC(MDSH), CSA_LESS, CSA_GRTR, CSA_LBRC, CSA_RBRC, KC_TRNS, + KC_TRNS, CSA_PIPE, CSA_DACT, KC_AMPR, CSA_OE, CSA_DGRV, KC_TRNS, + KC_NO, CSA_AE, CSA_UGRV, CSA_DTRM, CSA_EURO, CSA_RQOT, + CSA(AGR_SFT), CSA_BSLS, CSA_LCBR, CSA_RCBR, MUC(ELPS), CSA_TILD, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_UNDS, KC_TRNS, KC_TRNS, + KC_UNDS, CSA(AGR_SFT), KC_TRNS, // right hand KC_TRNS, M(M_CRC), CSA_PSMS, KC_NO, CSA_DVSN, CSA_TIMS, CSA_DBRV, KC_TRNS, CSA_IXLM, CSA_DCAR, CSA_ETH, KC_NO, CSA_IJ, KC_NO, CSA_CPRT, CSA_THRN, CSA_SRPS, CSA_RTM, CSA_DTLD, CSA_DMCR, - KC_TRNS, CSA_IQST, CSA_DRNG, CSA_MU, KC_NO, CSA_DOGO, KC_TRNS, + KC_TRNS, CSA_IQST, CSA_DRNG, CSA_MU, KC_NO, CSA_DOGO, CSA(AGR_SFT), KC_TRNS, KC_NO, KC_TRNS, CSA_DCED, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_UNDS + KC_TRNS, CSA(AGR_SFT), KC_UNDS + ), +/* AltGr-shifted BÉPO over Canadian Multilingual + * "////" indicates that the key is disabled (unsupported bépo character or unused in bépo) + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ¶ | //// | “ | ” | //// | //// | | | | //// | ¬ | ¼ | ½ | ¾ | ////// | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | ¦ | ˝ | § | Œ | ` | | | | //// | //// | Ð | //// | IJ | ////// | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | ////// | Æ | Ù |dead-˙| //// | //// |------| |------| //// | Þ | ẞ | ™ | //// | º | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | //// | ‘ | ’ | //// | //// | | | | //// | //// | //// | //// | ª | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[LR_CSA_AGR_SFT] = KEYMAP( + // left hand + CSA_PARG, KC_NO, CSA_LDQT, CSA_RDQT, KC_NO, KC_NO, KC_TRNS, + KC_TRNS, CSA_BPIP, CSA_DDCT, CSA_SECT, S(CSA_OE), M(M_GRV), KC_TRNS, + KC_NO, S(CSA_AE), S(CSA_UGRV), CSA_DDTA, KC_NO, KC_NO, + CSA(AGR_SFT), KC_NO, CSA_LQOT, CSA_RQOT, KC_NO, KC_NO, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, CSA(AGR_SFT), KC_TRNS, + + // right hand + KC_TRNS, KC_NO, CSA_NEGT, CSA_1QRT, CSA_1HLF, CSA_3QRT, KC_NO, + KC_TRNS, KC_NO, KC_NO, S(CSA_ETH), KC_NO, S(CSA_IJ), KC_NO, + KC_NO, S(CSA_THRN), S(CSA_SRPS), CSA_TM, KC_NO, CSA_ORDO, + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, CSA_ORDA, CSA(AGR_SFT), + CSA(SFT_AGR), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, CSA(AGR_SFT), KC_TRNS ), /* Numeric Layer * @@ -289,7 +338,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // MEDIA AND MOUSE [LR_FN] = KEYMAP( - M(M_TGCM), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, + M(M_TGCSA), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, RESET, KC_TRNS, KC_TRNS, KC_CALC, KC_MAIL, KC_WHOM, KC_TRNS, KC_TRNS, LSFT(KC_DELT),LCTL(KC_INS),LSFT(KC_INS), KC_MUTE, KC_VOLD, @@ -359,20 +408,37 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) send_unicode(unicode_chars[id]); } break; - case M_TGCM: + case M_TGCSA: if (record->event.pressed) { default_layer_xor(1 << LR_CSA); } break; - case M_CMSFT: + case M_CSA_SFT: + // BÉPO over CSA: toggle shift layer + layer_invert(LR_CSA_SFT); if (record->event.pressed) { - layer_on(LR_CSA_SFT); hold_shift(); } else { release_shift(); - layer_off(LR_CSA_SFT); } break; + case M_CSA_SFT_AGR: + // BÉPO over CSA: from shift layer, momentary altgr+shift layer + layer_invert(LR_CSA_AGR); + layer_invert(LR_CSA_AGR_SFT); + if (record->event.pressed) { + // shift not needed for LR_CSA_AGR_SFT + release_shift(); + } else { + // back to shift layer + hold_shift(); + } + break; + case M_CSA_AGR_SFT: + // BÉPO over CSA: from altgr layer, momentary altgr+shift layer + layer_invert(LR_CSA_SFT); + layer_invert(LR_CSA_AGR_SFT); + break; case M_1 ... M_0: case M_DEGR: case M_SCLN: From 89b647fe2b345fd26940508784482d37148ddc45 Mon Sep 17 00:00:00 2001 From: Didier Loiseau Date: Sun, 13 Mar 2016 19:02:43 +0100 Subject: [PATCH 14/23] Replace Play by temporary num layer with left Alt - move play on fn+left thumb - move prev/next besides play --- keyboard/ergodox_ez/keymaps/bepo/keymap.c | 51 ++++++++++++++--------- 1 file changed, 31 insertions(+), 20 deletions(-) diff --git a/keyboard/ergodox_ez/keymaps/bepo/keymap.c b/keyboard/ergodox_ez/keymaps/bepo/keymap.c index 2b76fea221..a37ce7f316 100644 --- a/keyboard/ergodox_ez/keymaps/bepo/keymap.c +++ b/keyboard/ergodox_ez/keymaps/bepo/keymap.c @@ -49,8 +49,9 @@ enum macros { // macros for characters that don't have a simple key combination in LR_CA_MULT_ALTGR M_CRC, // other layer macros - M_DBL0, - M_FNLR, + M_DBL0, // double 0 + M_FNLR, // fn layer + M_NMAL, // num+alt }; #define CSA(name) M(M_CSA_##name) // calls a CSA macro @@ -76,7 +77,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------|Enter | |Enter |------+------+------+------+------+--------| * | LShift | À | Y | X | . | K | | | | ' | Q | G | H | F | RShift | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * |LCtrl | fn | LGui | Play |App/Alt| |Alt Gr| % | Home | Ç |End/Ctl| + * |LCtrl | fn | LGui |numAlt|App/Alt| |Alt Gr| % | Home | Ç |End/Ctl| * `-----------------------------------' `-----------------------------------' * ,--------------. ,-------------. * |Esc/Alt| num | | Left |Right | @@ -90,11 +91,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Otherwise, it needs KC_* [LR_BASE] = KEYMAP( // layer 0 : default // left hand - BP_DLR, KC_1, KC_2, KC_3, KC_4, KC_5, KC_DELT, - KC_TAB, BP_B, BP_ECUT, BP_P, BP_O, BP_EGRV, KC_BSPC, - BP_EQL, BP_A, BP_U, BP_I, BP_E, BP_COMM, - KC_LSFT, BP_AGRV, BP_Y, BP_X, BP_DOT, BP_K, KC_ENT, - KC_LCTL, M(M_FNLR), KC_LGUI, KC_MPLY, ALT_T(KC_APP), + BP_DLR, KC_1, KC_2, KC_3, KC_4, KC_5, KC_DELT, + KC_TAB, BP_B, BP_ECUT, BP_P, BP_O, BP_EGRV, KC_BSPC, + BP_EQL, BP_A, BP_U, BP_I, BP_E, BP_COMM, + KC_LSFT, BP_AGRV, BP_Y, BP_X, BP_DOT, BP_K, KC_ENT, + KC_LCTL, M(M_FNLR), KC_LGUI, M(M_NMAL), ALT_T(KC_APP), ALT_T(KC_ESC), TG(LR_NUMR), KC_PGUP, @@ -120,7 +121,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_B, CSA_ECUT, KC_P, KC_O, CSA_EGRV, KC_BSPC, KC_EQL, KC_A, KC_U, KC_I, KC_E, KC_COMM, CSA(SFT), CSA_AGRV, KC_Y, KC_X, KC_DOT, KC_K, KC_ENT, - KC_LCTL, M(M_FNLR), KC_LGUI, KC_MPLY, ALT_T(KC_APP), + KC_LCTL, M(M_FNLR), KC_LGUI, M(M_NMAL), ALT_T(KC_APP), ALT_T(KC_ESC), TG(LR_NUMR), KC_PGUP, @@ -304,6 +305,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, + // right hand KC_TRNS, KC_F6, KC_F7, KC_TAB, KC_PSLS, KC_PAST, KC_PMNS, KC_TRNS, KC_TRNS, KC_HOME, KC_P7, KC_P8, KC_P9, KC_PPLS, @@ -331,22 +333,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-------------. ,-------------. * | | | | | | * ,------|------|------| |------+------+------. - * | | | | | Next | | | - * | Mute | |------| |------| | | - * | | | | | Prev | | | + * | | | Next | | | | | + * | Mute | play |------| |------| | | + * | | | Prev | | | | | * `--------------------' `--------------------' */ // MEDIA AND MOUSE [LR_FN] = KEYMAP( M(M_TGCSA), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, - RESET, KC_TRNS, KC_TRNS, KC_CALC, KC_MAIL, KC_WHOM, - KC_TRNS, KC_TRNS, LSFT(KC_DELT),LCTL(KC_INS),LSFT(KC_INS), KC_MUTE, KC_VOLD, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, + RESET, KC_TRNS, KC_TRNS, KC_CALC, KC_MAIL, KC_WHOM, + KC_TRNS, KC_TRNS, S(KC_DELT), LCTL(KC_INS),S(KC_INS), KC_MUTE, KC_VOLD, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, - KC_MUTE, KC_TRNS, KC_TRNS, + KC_MPRV, + KC_MUTE, KC_MPLY, KC_MNXT, + // right hand KC_INS, KC_EJCT, KC_PWR, KC_SLEP, KC_WAKE, KC_PSCR, KC_SLCK, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PAUS, @@ -355,8 +358,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_MPRV, - KC_MNXT, KC_TRNS, KC_TRNS + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS ), }; @@ -492,6 +495,14 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) layer_invert(LR_NUMR); layer_invert(LR_FN); break; + case M_NMAL: + layer_invert(LR_NUMR); + if (record->event.pressed) { + register_code(KC_LALT); + } else { + unregister_code(KC_LALT); + } + break; } return MACRO_NONE; }; From 4e25342b417b64e0830886407f3842b68198f8d1 Mon Sep 17 00:00:00 2001 From: Didier Loiseau Date: Sun, 13 Mar 2016 19:17:37 +0100 Subject: [PATCH 15/23] =?UTF-8?q?Use=20TG()=20to=20switch=20to=20B=C3=89PO?= =?UTF-8?q?=20over=20CSA,=20and=20use=20KC=5FTRNS=20in=20LR=5FCSA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Simplifies future changes to modifier and special keys + removed M_TGCSA macro --- keyboard/ergodox_ez/keymaps/bepo/keymap.c | 42 ++++++++++------------- 1 file changed, 18 insertions(+), 24 deletions(-) diff --git a/keyboard/ergodox_ez/keymaps/bepo/keymap.c b/keyboard/ergodox_ez/keymaps/bepo/keymap.c index a37ce7f316..bdb7354409 100644 --- a/keyboard/ergodox_ez/keymaps/bepo/keymap.c +++ b/keyboard/ergodox_ez/keymaps/bepo/keymap.c @@ -17,7 +17,7 @@ enum layers { LR_FN, // fn layer }; -#define IS_CA_MULT_ENABLED() (default_layer_state & (1 << LR_CSA)) +#define IS_CA_MULT_ENABLED() (layer_state & (1 << LR_CSA)) enum macros { // Characters that do not exist in CSA and must be implemented based on unicode support @@ -27,7 +27,6 @@ enum macros { UC_ELPS, // … END_UC, // indicates the last unicode character macro // other macros - M_TGCSA, // toggle BÉPO over CSA M_CSA_SFT, // toggle shift on CSA M_CSA_AGR_SFT, // toggle shift on LR_CSA_AGR (goes to LR_CSA_AGR_SFT) M_CSA_SFT_AGR, // toggle AltGr on LR_CSA_SFT (goes to LR_CSA_AGR_SFT) @@ -117,26 +116,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [LR_CSA] = KEYMAP( // left hand - KC_DLR, CSA_DQOT, CSA_LGIL, CSA_RGIL, KC_LPRN, KC_RPRN, KC_DELT, - KC_TAB, KC_B, CSA_ECUT, KC_P, KC_O, CSA_EGRV, KC_BSPC, - KC_EQL, KC_A, KC_U, KC_I, KC_E, KC_COMM, - CSA(SFT), CSA_AGRV, KC_Y, KC_X, KC_DOT, KC_K, KC_ENT, - KC_LCTL, M(M_FNLR), KC_LGUI, M(M_NMAL), ALT_T(KC_APP), + KC_DLR, CSA_DQOT, CSA_LGIL, CSA_RGIL, KC_LPRN, KC_RPRN, KC_TRNS, + KC_TRNS, KC_B, CSA_ECUT, KC_P, KC_O, CSA_EGRV, KC_TRNS, + KC_EQL, KC_A, KC_U, KC_I, KC_E, KC_COMM, + CSA(SFT), CSA_AGRV, KC_Y, KC_X, KC_DOT, KC_K, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - ALT_T(KC_ESC), TG(LR_NUMR), - KC_PGUP, - KC_SPC, CSA(SFT), KC_PGDN, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, // right hand - KC_DELT, KC_AT, KC_PLUS, KC_MINS, CSA_SLSH, KC_ASTR, KC_W, - KC_BSPC, CSA_DCRC, KC_V, KC_D, KC_L, KC_J, KC_Z, - KC_C, KC_T, KC_S, KC_R, KC_N, KC_M, - KC_ENT, CSA_APOS, KC_Q, KC_G, KC_H, KC_F, CSA(SFT), - MO(LR_CSA_AGR), KC_PERC, KC_HOME, CSA_CCED, CTL_T(KC_END), + KC_TRNS, KC_AT, KC_PLUS, KC_MINS, CSA_SLSH, KC_ASTR, KC_W, + KC_TRNS, CSA_DCRC, KC_V, KC_D, KC_L, KC_J, KC_Z, + KC_C, KC_T, KC_S, KC_R, KC_N, KC_M, + KC_TRNS, CSA_APOS, KC_Q, KC_G, KC_H, KC_F, CSA(SFT), + MO(LR_CSA_AGR), KC_PERC, KC_TRNS, CSA_CCED, KC_TRNS, - KC_LEFT, KC_RGHT, - KC_UP, - KC_DOWN, CSA(SFT), KC_SPC + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, CSA(SFT), KC_TRNS ), /* Shifted BÉPO over Canadian Multilingual * @@ -340,7 +339,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // MEDIA AND MOUSE [LR_FN] = KEYMAP( - M(M_TGCSA), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, + TG(LR_CSA), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, RESET, KC_TRNS, KC_TRNS, KC_CALC, KC_MAIL, KC_WHOM, KC_TRNS, KC_TRNS, S(KC_DELT), LCTL(KC_INS),S(KC_INS), KC_MUTE, KC_VOLD, @@ -411,11 +410,6 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) send_unicode(unicode_chars[id]); } break; - case M_TGCSA: - if (record->event.pressed) { - default_layer_xor(1 << LR_CSA); - } - break; case M_CSA_SFT: // BÉPO over CSA: toggle shift layer layer_invert(LR_CSA_SFT); From 4289ff793938bbfa2d85c0022bc765bba3eb1347 Mon Sep 17 00:00:00 2001 From: Didier Loiseau Date: Sun, 13 Mar 2016 19:38:58 +0100 Subject: [PATCH 16/23] Removed remaining ALT_T and CTL_T keys Having "true" modifiers is more reliable and practical. - moved APP in place of HOME - moved HOME in place of LSFT on left thumb - moved END in place of RSFT on right thumb (Ctrl+End with single hand!) - removed ALT_T from KC_ESC --- keyboard/ergodox_ez/keymaps/bepo/keymap.c | 32 +++++++++++------------ 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/keyboard/ergodox_ez/keymaps/bepo/keymap.c b/keyboard/ergodox_ez/keymaps/bepo/keymap.c index bdb7354409..cd7d24ee83 100644 --- a/keyboard/ergodox_ez/keymaps/bepo/keymap.c +++ b/keyboard/ergodox_ez/keymaps/bepo/keymap.c @@ -76,13 +76,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------|Enter | |Enter |------+------+------+------+------+--------| * | LShift | À | Y | X | . | K | | | | ' | Q | G | H | F | RShift | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * |LCtrl | fn | LGui |numAlt|App/Alt| |Alt Gr| % | Home | Ç |End/Ctl| - * `-----------------------------------' `-----------------------------------' + * |LCtrl | fn | LGui |numAlt| LAlt | |Alt Gr| % | App | Ç | RCtrl| + * `----------------------------------' `----------------------------------' * ,--------------. ,-------------. - * |Esc/Alt| num | | Left |Right | + * | Esc | num | | Left |Right | * ,------+-------+------| |------+------+------. * | | | PgUp | | Up | | | - * |Space |LShift |------| |------|RShift|Space | + * |Space | Home |------| |------| End |Space | * | | | PgDn | | Down | | | * `---------------------' `--------------------' */ @@ -90,26 +90,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Otherwise, it needs KC_* [LR_BASE] = KEYMAP( // layer 0 : default // left hand - BP_DLR, KC_1, KC_2, KC_3, KC_4, KC_5, KC_DELT, - KC_TAB, BP_B, BP_ECUT, BP_P, BP_O, BP_EGRV, KC_BSPC, - BP_EQL, BP_A, BP_U, BP_I, BP_E, BP_COMM, - KC_LSFT, BP_AGRV, BP_Y, BP_X, BP_DOT, BP_K, KC_ENT, - KC_LCTL, M(M_FNLR), KC_LGUI, M(M_NMAL), ALT_T(KC_APP), + BP_DLR, KC_1, KC_2, KC_3, KC_4, KC_5, KC_DELT, + KC_TAB, BP_B, BP_ECUT, BP_P, BP_O, BP_EGRV, KC_BSPC, + BP_EQL, BP_A, BP_U, BP_I, BP_E, BP_COMM, + KC_LSFT, BP_AGRV, BP_Y, BP_X, BP_DOT, BP_K, KC_ENT, + KC_LCTL, M(M_FNLR), KC_LGUI, M(M_NMAL), KC_LALT, - ALT_T(KC_ESC), TG(LR_NUMR), - KC_PGUP, - KC_SPC, KC_LSFT, KC_PGDN, + KC_ESC, TG(LR_NUMR), + KC_PGUP, + KC_SPC, KC_HOME, KC_PGDN, // right hand KC_DELT, KC_6, KC_7, KC_8, KC_9, KC_0, BP_W, KC_BSPC, BP_DCRC, BP_V, BP_D, BP_L, BP_J, BP_Z, BP_C, BP_T, BP_S, BP_R, BP_N, BP_M, KC_ENT, BP_APOS, BP_Q, BP_G, BP_H, BP_F, KC_RSFT, - BP_ALGR, BP_PERC, KC_HOME, BP_CCED, CTL_T(KC_END), + BP_ALGR, BP_PERC, KC_APP, BP_CCED, KC_RCTL, KC_LEFT, KC_RGHT, KC_UP, - KC_DOWN, KC_RSFT, KC_SPC + KC_DOWN, KC_END, KC_SPC ), /** * Same as default but for use with Canadian Multilingual on OS side @@ -131,11 +131,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, CSA_DCRC, KC_V, KC_D, KC_L, KC_J, KC_Z, KC_C, KC_T, KC_S, KC_R, KC_N, KC_M, KC_TRNS, CSA_APOS, KC_Q, KC_G, KC_H, KC_F, CSA(SFT), - MO(LR_CSA_AGR), KC_PERC, KC_TRNS, CSA_CCED, KC_TRNS, + MO(LR_CSA_AGR), KC_PERC, KC_TRNS, CSA_CCED, KC_LCTL, // RCTL has a special behaviour in CSA so use LCTL KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, CSA(SFT), KC_TRNS + KC_TRNS, KC_TRNS, KC_TRNS ), /* Shifted BÉPO over Canadian Multilingual * From 5bc69c5b0a25d12aa8d96c58b01304453d5ccbd6 Mon Sep 17 00:00:00 2001 From: Didier Loiseau Date: Wed, 6 Apr 2016 00:09:03 +0200 Subject: [PATCH 17/23] Fixed compilation issues --- keyboard/ergodox_ez/keymaps/bepo/keymap.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/keyboard/ergodox_ez/keymaps/bepo/keymap.c b/keyboard/ergodox_ez/keymaps/bepo/keymap.c index cd7d24ee83..339faf5772 100644 --- a/keyboard/ergodox_ez/keymaps/bepo/keymap.c +++ b/keyboard/ergodox_ez/keymaps/bepo/keymap.c @@ -502,12 +502,11 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) }; // Runs just one time when the keyboard initializes. -void * matrix_init_user(void) { - return NULL; +void matrix_init_user(void) { }; // Runs constantly in the background, in a loop. -void * matrix_scan_user(void) { +void matrix_scan_user(void) { ergodox_board_led_off(); ergodox_right_led_1_off(); @@ -525,5 +524,4 @@ void * matrix_scan_user(void) { if (host_keyboard_leds() & (1< Date: Wed, 6 Apr 2016 00:13:18 +0200 Subject: [PATCH 18/23] Add delay to CSA macros using dead keys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With the BÉPO over CSA on Windows, the dead keys stop working after a while, like in http://superuser.com/questions/776558/suddenly-dead-keys-dont-work I suspect this is triggered by too fast typing from macros. --- keyboard/ergodox_ez/keymaps/bepo/keymap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboard/ergodox_ez/keymaps/bepo/keymap.c b/keyboard/ergodox_ez/keymaps/bepo/keymap.c index 339faf5772..7fac3597f6 100644 --- a/keyboard/ergodox_ez/keymaps/bepo/keymap.c +++ b/keyboard/ergodox_ez/keymaps/bepo/keymap.c @@ -453,7 +453,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) case M_SCLN: return MACRO(D(SCLN), END); case M_GRV: - return MACRO(DOWN(CSA_ALTGR), TYPE(CSA_DCRC), UP(CSA_ALTGR), T(SPACE), END); + return MACRO(I(75), DOWN(CSA_ALTGR), TYPE(CSA_DCRC), UP(CSA_ALTGR), T(SPACE), END); case M_NBSP: // use weak mod such that pressing another key will not be affected add_weak_mods(MOD_BIT(CSA_ALTGR)); @@ -477,7 +477,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) break; case M_CRC: if (record->event.pressed) { - return MACRO(TYPE(CSA_DCRC), T(SPACE), END); + return MACRO(I(75), TYPE(CSA_DCRC), T(SPACE), END); } break; case M_DBL0: From db35212422f228cd9ddf68b61f47380fe1842e83 Mon Sep 17 00:00:00 2001 From: Didier Loiseau Date: Wed, 6 Apr 2016 00:13:18 +0200 Subject: [PATCH 19/23] Removed D(LSFT) is CSA macros Were causing stuck LSFT weak mods. --- keyboard/ergodox_ez/keymaps/bepo/keymap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboard/ergodox_ez/keymaps/bepo/keymap.c b/keyboard/ergodox_ez/keymaps/bepo/keymap.c index 7fac3597f6..8d77619856 100644 --- a/keyboard/ergodox_ez/keymaps/bepo/keymap.c +++ b/keyboard/ergodox_ez/keymaps/bepo/keymap.c @@ -466,9 +466,9 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) unregister_code(KC_1 + (id - M_1)); break; case M_DEGR: - return MACRO(UP(CSA_ALTGR), D(LSFT), U(SCLN), END); + return MACRO(UP(CSA_ALTGR), U(SCLN), END); case M_SCLN: - return MACRO(D(LSFT), U(SCLN), END); + return MACRO(U(SCLN), END); case M_NBSP: del_weak_mods(MOD_BIT(CSA_ALTGR)); return MACRO(U(SPACE), END); From 8d6bbf2757d7dc085b0765feda8d67b48c6c8f8b Mon Sep 17 00:00:00 2001 From: Didier Loiseau Date: Wed, 6 Apr 2016 00:19:12 +0200 Subject: [PATCH 20/23] Fix issue #221: LGUI(KC_LSFT) does not work - on mod keys, register LGUI, LSFT etc. as normal mods instead of weak mods: - they won't be cleared by layer switching - LSFT(KC_LGUI) will now have the same behavior as LGUI(KC_LSFT) --- tmk_core/common/action.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c index 2ccc0e0b94..9010896343 100644 --- a/tmk_core/common/action.c +++ b/tmk_core/common/action.c @@ -88,14 +88,24 @@ void process_action(keyrecord_t *record) action.key.mods<<4; if (event.pressed) { if (mods) { - add_weak_mods(mods); + if (IS_MOD(action.key.code)) { + // e.g. LSFT(KC_LGUI): we don't want the LSFT to be weak as it would make it useless. + // this also makes LSFT(KC_LGUI) behave exactly the same as LGUI(KC_LSFT) + add_mods(mods); + } else { + add_weak_mods(mods); + } send_keyboard_report(); } register_code(action.key.code); } else { unregister_code(action.key.code); if (mods) { - del_weak_mods(mods); + if (IS_MOD(action.key.code)) { + del_mods(mods); + } else { + del_weak_mods(mods); + } send_keyboard_report(); } } From 60a826923d5a6b0dbe416b0837608149ab82e470 Mon Sep 17 00:00:00 2001 From: Didier Loiseau Date: Thu, 8 Sep 2016 00:09:35 +0200 Subject: [PATCH 21/23] Added KC_APP on fn+BP_AGRV --- keyboard/ergodox_ez/keymaps/bepo/keymap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboard/ergodox_ez/keymaps/bepo/keymap.c b/keyboard/ergodox_ez/keymaps/bepo/keymap.c index 8d77619856..7097d641d9 100644 --- a/keyboard/ergodox_ez/keymaps/bepo/keymap.c +++ b/keyboard/ergodox_ez/keymaps/bepo/keymap.c @@ -325,7 +325,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | RESET | | | Calc | Mail |Browsr|------| |------| | | | | | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | cut | copy |paste | Mute |VolDn | | | | | | | | | + * | | App | cut | copy |paste | Mute |VolDn | | | | | | | | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * | | | | | | | | | | | | * `----------------------------------' `----------------------------------' @@ -342,7 +342,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(LR_CSA), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, RESET, KC_TRNS, KC_TRNS, KC_CALC, KC_MAIL, KC_WHOM, - KC_TRNS, KC_TRNS, S(KC_DELT), LCTL(KC_INS),S(KC_INS), KC_MUTE, KC_VOLD, + KC_TRNS, KC_APP, S(KC_DELT), LCTL(KC_INS),S(KC_INS), KC_MUTE, KC_VOLD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, From 1aeb59335f2fe67613df25308a630ca453975ac0 Mon Sep 17 00:00:00 2001 From: Didier Loiseau Date: Sun, 11 Sep 2016 02:19:55 +0200 Subject: [PATCH 22/23] Fixed compilation issues after the merge --- .../bepo => keyboards/ergodox/keymaps/bepo_csa}/keymap.c | 2 +- quantum/keymap_extras/keymap_canadian_multilingual.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename {keyboard/ergodox_ez/keymaps/bepo => keyboards/ergodox/keymaps/bepo_csa}/keymap.c (99%) diff --git a/keyboard/ergodox_ez/keymaps/bepo/keymap.c b/keyboards/ergodox/keymaps/bepo_csa/keymap.c similarity index 99% rename from keyboard/ergodox_ez/keymaps/bepo/keymap.c rename to keyboards/ergodox/keymaps/bepo_csa/keymap.c index 7097d641d9..495242adb3 100644 --- a/keyboard/ergodox_ez/keymaps/bepo/keymap.c +++ b/keyboards/ergodox/keymaps/bepo_csa/keymap.c @@ -1,5 +1,5 @@ /* TypeMatrix-2030-like keymap */ -#include "ergodox_ez.h" +#include "ergodox.h" #include "debug.h" #include "action_layer.h" #include "action_util.h" diff --git a/quantum/keymap_extras/keymap_canadian_multilingual.h b/quantum/keymap_extras/keymap_canadian_multilingual.h index c720088e8c..0bc20c7b9c 100644 --- a/quantum/keymap_extras/keymap_canadian_multilingual.h +++ b/quantum/keymap_extras/keymap_canadian_multilingual.h @@ -1,7 +1,7 @@ #ifndef KEYMAP_CANADIAN_MULTILINGUAG_H #define KEYMAP_CANADIAN_MULTILINGUAG_H -#include "keymap_common.h" +#include "keymap.h" // Alt gr #ifndef ALTGR From 21747cc3101bb535641db5a6250aa81f860ede03 Mon Sep 17 00:00:00 2001 From: Didier Loiseau Date: Sun, 11 Sep 2016 22:03:34 +0200 Subject: [PATCH 23/23] Added readme.md for bepo_csa --- keyboards/ergodox/keymaps/bepo_csa/readme.md | 162 +++++++++++++++++++ 1 file changed, 162 insertions(+) create mode 100644 keyboards/ergodox/keymaps/bepo_csa/readme.md diff --git a/keyboards/ergodox/keymaps/bepo_csa/readme.md b/keyboards/ergodox/keymaps/bepo_csa/readme.md new file mode 100644 index 0000000000..d4975b2265 --- /dev/null +++ b/keyboards/ergodox/keymaps/bepo_csa/readme.md @@ -0,0 +1,162 @@ +# BÉPO Keymap with firmware-remapping for software CSA layout + +This is a keymap intended to be used with the [BÉPO layout](http://bepo.fr), a French ergonomic layout designed by following Dvorak's principles. + +The particularity of this keymap is that it supports using the [Canadian Multilingual Standard layout](https://en.wikipedia.org/wiki/QWERTY#Canadian_Multilingual_Standard) (also known as _ACNOR keyboard_ or _CSA keyboard_, see also the [French page](https://fr.wikipedia.org/wiki/QWERTY#Clavier_canadien_multilingue_standard) which contains more details) on the OS side, by enabling the _CSA_ layer. This is especially useful for operating systems that natively provide CSA, but not BÉPO, like Windows. The CSA layout was chosen because it is probably the standard layout that provides the best character set coverage. + +This keymap is based on the [tm2030](../tm2030/) keymap, whose goal was to have a [TypeMatrix™ 2030](http://typematrix.com/2030/features.php) inspired layout for the ErgoDox EZ. + +As this keyboard is intended for French people, the rest of this page will be in French. + +# Keymap BÉPO avec support en firmware pour utilisation avec la disposition CSA en software + +Cette keymap a été conçue pour être utilisée avec la [disposition BÉPO](http://bepo.fr), la disposition francophone, ergonomique et libre basée sure les principes de Dvorak. + +La particularité de cette keymap est qu'elle supporte l'utilisation du [clavier canadien multilingue standard](https://fr.wikipedia.org/wiki/QWERTY#Clavier_canadien_multilingue_standard) (aussi appelé _clavier ACNOR_ ou _clavier CSA_) du côté du système d'exploitation, en activant la couche _CSA_. Ceci s'avère particulièrement utile pour les systèmes d'exploitations qui fournissent nativement le CSA, mais pas le BÉPO, comme Windows. Le clavier CSA a été choisi comme base car c'est probablement la disposition standard qui fournit la meilleure couverture en termes de caractères disponibles. + +Cette keymap est basée sur la keymap [tm2030](../tm2030/), dont le but est de fournir une disposition inspirée du [TypeMatrix™ 2030](http://typematrix.com/2030/features.php) pour l'ErgoDox EZ. + +## Couche de base +C'est la couche par défaut, proche du TypeMatrix, avec les différences suivantes: +- La ligne du haut (les touches `F`) et la colonne de droite sont retirées, les touches correspondantes étant déplacées ailleurs. +- Les touches situés en bas à gauche sont redisposées dans cet ordre: `Ctrl`, `fn`, `Gui`, `num+Alt`, `Alt` +- Les touches `shuffle` (`Alt+Tab`) et `desktop` ne sont pas supportés +- `W` est déplacé à la place de `=` +- `=` est déplacé sous `Tab` (au lieu d'avoir un grand `Shift`) +- `%` et `Ç` sont déplacés à la place de `Home` et `End` respectivement +- Les flèches ainsi que `PgUp`/`PgDown`/`Home`/`End` sont déplacées sur les pouces + +À noter que pour `W` et `Ç`, le but a été de ne pas les déplacer trop par rapport à la disposition BÉPO _standard_, afin de pouvoir repasser facilement sur un TypeMatrix ou un clavier traditionnel. + + +``` +,--------------------------------------------------. ,--------------------------------------------------. +| $ | " | « | » | ( | ) | Del | | Del | @ | + | - | / | * | W | +|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| +| Tab | B | É | P | O | È |Backsp| |Backsp| ^ | V | D | L | J | Z | +|--------+------+------+------+------+------|ace | |ace |------+------+------+------+------+--------| +| = | A | U | I | E | , |------| |------| C | T | S | R | N | M | +|--------+------+------+------+------+------|Enter | |Enter |------+------+------+------+------+--------| +| LShift | À | Y | X | . | K | | | | ' | Q | G | H | F | RShift | +`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + |LCtrl | fn | LGui |numAlt| LAlt | |Alt Gr| % | App | Ç | RCtrl| + `----------------------------------' `----------------------------------' + ,--------------. ,-------------. + | Esc | num | | Left |Right | + ,------+-------+------| |------+------+------. + | | | PgUp | | Up | | | + |Space | Home |------| |------| End |Space | + | | | PgDn | | Down | | | + `---------------------' `--------------------' +``` + +### Changer de couche + +- Utilisez `num` pour activer/désactiver [la couche numérique](#couche-numérique) +- Maintenez `fn` pour activer temporairement [les couches numériques et Fn](#couche-fn) +- Maintenez `numAlt` pour activer temporairement la couche numérique combinée avec `Alt` (facilite l'utilisation des raccourcis tels que `Alt`+`F4`) + +### Diodes +Les diodes de l'ErgoDox EZ (côté droit) sont utilisées de la façon suivante : + +- diode de gauche (rouge) : indique l'activation de [la couche numérique](#couche-numérique) +- diode du milieu (verte) : indique l'activation du [mode CSA](#couche-csa) +- diode de droite (bleue) : indique le verrouillage majuscules + +## Couche CSA +La couche _CSA_ est la même que la couche de base, pour une utilisation avec un clavier Canadien Multilingue configuré dans le système d'exploitation. + +Pour l'activer, appuyez sur `fn`+`$`. La [diode](#diodes) verte indique que la couche CSA est activée. + +### Limitations +Seuls les caractères présents dans le clavier CSA sont parfaitement supportés. De manière générale, il s'agit des caractères suivants : + +- toute la couche de base +- tous les caractères accessibles en `Shift` +- tous les caractères de la main gauche accessibles en `AltGr` à l'exception du `≠` +- environ la moitié des caractères de la main droite accessibles en `AltGr` et la moitié des caractères accessibles en `AltGr`+`Shift` (consultez [le fichier source](keymap.c) pour voir les caractères supportés) + +En particulier, les caractères suivants sont émulés via le support Unicode (Windows seulement): + +- le tiret cadratin (tiret long) : — +- le tiret demi-cadratin (demi tiret) : – +- les points de suspension : … + +L'implémentation actuelle ne fonctionne pas dans toutes les applications, en particulier les applications MS Office. + +Il est probable que l'utilisation de la couche CSA ne fonctionne pas correctement dans certains jeux vidéos. + +Cette fonctionnalité a été conçue et testée essentiellment pour Windows (7). + +### Détails techniques +Techniquement, la couche CSA est en réalité composée de 4 couches servant à émuler la couche de base, les appuis sur `Shift` ou `Alt` et la combinaison des deux. + +Le changement de couches se fait par des macros afin d'activer ou désactiver plusieurs couches et la touche `Shift` en même temps. + +Certains caractères sont également implémentés par des macros, notamment ceux de la couche `Shift` qui n'ont pas besoin de cette touche en CSA, comme les chiffres. + +Les caractères Unicode se basent sur une implémentation spécifique et non celle fournie dans QMK — il faudrait sans doute migrer le code. Notez la façon dont ces caractères sont déclarés tels quels dans [le code source](keymap.c) (tableau `unicode_char`). + +## Couche numérique +Couche numérique proche du TM lorsqu'on active `num`, avec les différences suivantes : + +- Le clavier numérique est déplacés de 1 vers le haut et vers la droite. +- Les flèches sont décalées de 1 vers la gauche. +- Fournit l'accès aux touches `F1` à `F12`, `caps-lock` et `num-lock`. + +La couche numérique est indiquée par la [diode](#diodes) de gauche (rouge). Caps-lock est indiqué par la diode de droite (bleue). + +La touche `numAlt` de [la couche de base](#couche-de-base) permet d'activer la couche numérique et la touche `Alt` simultanément, afin de faciliter les raccourcis claviers comme `Alt`+`F4`. + +``` +,--------------------------------------------------. ,--------------------------------------------------. +| | F1 | F2 | F3 | F4 | F5 | | | | | | Tab | / | * | - | +|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| +| | F6 | F7 | F8 | F9 | F10 | | | | | Home | 7 | 8 | 9 | + | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| | F11 | F12 | | | |------| |------| Up | End | 4 | 5 | 6 | + | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| | | | | | | | | Left | Down | Right| 1 | 2 | 3 |KpEnter | +`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + | | | | | | | | 0 | 00 | . |Etr/Ctl| + `----------------------------------' `-----------------------------------' + ,-------------. ,-------------. + | | | |n.lock|c.lock| + ,------|------|------| |------+------+------. + | | | | | | | | + | | |------| |------| | | + | | | | | | | | + `--------------------' `--------------------' +``` + +## Couche Fn +Activée simultanément avec la couche numérique lorsque l'on maintient la touche `fn`. Comme sur le TM, elle fournit l'accès aux fonctionnalités suivantes : + +- `couper`, `copier` et `coller` — attention: ne pas utiliser dans l'explorateur de fichiers. +- monter/baisser/couper le volume — seulement accessible en main gauche, contrairement au TM. +- piste précédente/suivante +- calculatrice, e-mail et page d'accueil du navigateur web +- `insert`, `power`, `sleep`, `wake`, `print screen`, `scroll-lock` et `pause` +- ~CSA: (dés)activation de [la couche CSA](#couche-csa) sur `$` +- RESET: rechargement du firmware avec Teensy-Loader (pour les développeurs) + +``` +,--------------------------------------------------. ,--------------------------------------------------. +| ~CSA | | | | | |Insert| |Insert|Eject |Power |Sleep | Wake |PrtScr|ScrollLk| +|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| +| | | | | | |VolUp | | | | | | | | Pause | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| RESET | | | Calc | Mail |Browsr|------| |------| | | | | | | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| | App | cut | copy |paste | Mute |VolDn | | | | | | | | | +`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + | | | | | | | | | | | | + `----------------------------------' `----------------------------------' + ,-------------. ,-------------. + | | | | | | + ,------|------|------| |------+------+------. + | | | Next | | | | | + | Mute | play |------| |------| | | + | | | Prev | | | | | + `--------------------' `--------------------' +``` \ No newline at end of file