From a7cef2ca0a2322448d02008337013936b1d550ec Mon Sep 17 00:00:00 2001 From: Didier Loiseau Date: Wed, 17 Feb 2016 21:45:38 +0100 Subject: =?UTF-8?q?Initial=20B=C3=89PO=20over=20CSA=20with=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 --- .../keymap_extras/keymap_canadian_multilingual.h | 105 +++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 quantum/keymap_extras/keymap_canadian_multilingual.h (limited to 'quantum') diff --git a/quantum/keymap_extras/keymap_canadian_multilingual.h b/quantum/keymap_extras/keymap_canadian_multilingual.h new file mode 100644 index 0000000000..ae60ffe37e --- /dev/null +++ b/quantum/keymap_extras/keymap_canadian_multilingual.h @@ -0,0 +1,105 @@ +#ifndef KEYMAP_CANADIAN_MULTILINGUAG_H +#define KEYMAP_CANADIAN_MULTILINGUAG_H + +#include "keymap_common.h" + +// Alt gr +#ifndef ALTGR +#define ALTGR(kc) RALT(kc) +#endif +#ifndef ALGR +#define ALGR(kc) ALTGR(kc) +#endif + +#define CM_ALTGR KC_RALT +#define CM_ALGR CM_ALTGR + +#ifndef GR2A +#define GR2A(kc) RCTL(kc) +#endif + +// Normal characters +// First row +#define CM_SLASH KC_GRV // / +#define CM_SLSH CM_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 + +// 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 + +// 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 + +// 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 + +// Second row +#define CM_DEAD_TREMA LSFT(CM_DEAD_CIRCUMFLEX) // dead trema/umlaut/diaresis for ä ë ï ö ü +#define CM_DTRM CM_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 + +// 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 + +// 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 + +// Third row +#define CM_DEGREE ALTGR(KC_SCOLON) // ° +#define CM_DEGR CM_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 + +// Space bar +#define CM_NON_BREAKING_SPACE ALTGR(KC_SPACE) +#define CM_NBSP CM_NON_BREAKING_SPACE + +#endif -- cgit v1.2.3 From 7840e69bfaee1d67de273c235b532d6f20c905a9 Mon Sep 17 00:00:00 2001 From: Didier Loiseau Date: Thu, 18 Feb 2016 00:47:23 +0100 Subject: =?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) --- quantum/keymap_extras/keymap_canadian_multilingual.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'quantum') 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 -- cgit v1.2.3 From 911222892ecb1c01551e0abdfbe98ed1dbf82139 Mon Sep 17 00:00:00 2001 From: Didier Loiseau Date: Fri, 26 Feb 2016 00:55:39 +0100 Subject: =?UTF-8?q?B=C3=89PO=20over=20CSA:=20GR2A=20characters=20in=20AltG?= =?UTF-8?q?r=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 --- .../keymap_extras/keymap_canadian_multilingual.h | 81 ++++++++++++++++++++-- 1 file changed, 77 insertions(+), 4 deletions(-) (limited to 'quantum') 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 + +// 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 +// 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 -- cgit v1.2.3 From 3a91ddb0745ae0f52007984793ea1b48abb2098c Mon Sep 17 00:00:00 2001 From: Didier Loiseau Date: Tue, 1 Mar 2016 22:59:38 +0100 Subject: Use CSA_ as prefix for Canadian Multilingual key aliases CM is already used for Colemak. --- .../keymap_extras/keymap_canadian_multilingual.h | 244 +++++++++++---------- 1 file changed, 123 insertions(+), 121 deletions(-) (limited to 'quantum') 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 -- cgit v1.2.3 From aa5eb49edd993e2abe3adf814e030fcdda4a3596 Mon Sep 17 00:00:00 2001 From: Didier Loiseau Date: Wed, 2 Mar 2016 00:22:41 +0100 Subject: =?UTF-8?q?B=C3=89PO=20over=20CSA:=20GR2A-shifted=20characters=20i?= =?UTF-8?q?n=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 --- .../keymap_extras/keymap_canadian_multilingual.h | 86 +++++++++++++++++++--- 1 file changed, 75 insertions(+), 11 deletions(-) (limited to 'quantum') 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 -- cgit v1.2.3 From c9ea236fc35d350c0ff33de0af84d3dee7d0eb95 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Wed, 31 Aug 2016 08:21:52 +0200 Subject: process_unicode: Add get_unicode_input_mode() There may be cases where one would like to know the current Unicode input mode, without having to keep track of it themselves. Add a function that does just this. Signed-off-by: Gergely Nagy --- quantum/process_keycode/process_unicode.c | 4 ++++ quantum/process_keycode/process_unicode.h | 1 + 2 files changed, 5 insertions(+) (limited to 'quantum') diff --git a/quantum/process_keycode/process_unicode.c b/quantum/process_keycode/process_unicode.c index 06c1694f2e..a5d7dca21e 100644 --- a/quantum/process_keycode/process_unicode.c +++ b/quantum/process_keycode/process_unicode.c @@ -18,6 +18,10 @@ void set_unicode_input_mode(uint8_t os_target) input_mode = os_target; } +uint8_t get_unicode_input_mode(void) { + return input_mode; +} + __attribute__((weak)) void unicode_input_start (void) { switch(input_mode) { diff --git a/quantum/process_keycode/process_unicode.h b/quantum/process_keycode/process_unicode.h index 02ce3dd7e0..27f8072ee6 100644 --- a/quantum/process_keycode/process_unicode.h +++ b/quantum/process_keycode/process_unicode.h @@ -13,6 +13,7 @@ #endif void set_unicode_input_mode(uint8_t os_target); +uint8_t get_unicode_input_mode(void); void unicode_input_start(void); void unicode_input_finish(void); void register_hex(uint16_t hex); -- cgit v1.2.3 From acda2b793f69c6e0e9b9667e9ebe8a0325eb5ecd Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Thu, 1 Sep 2016 08:32:47 +0200 Subject: tap-dance: Do not start a sequence on keyup There was an odd case, which confused the hell out of tap-dance: suppose you had a number of tap-dance keys, on a layer, and as part of the tap-dance, you turned that layer off - or had it on one-shot to begin with. In this case, the keydown event would trigger the tap-dance key, but the keyup would not. This had two funky consequences: - tap-dance did not correctly register that the dance has ended. - pressing any other tap-dance key would interrupt the previous tap-dance, and potentially input unwanted characters. To fix this, we simply do not start a tap-dance sequence on keyup, only when it is pressed. This way the previous sequence has enough time to time-out and finish properly, and we don't get confused. This fixes algernon/ergodox-layout#107. Signed-off-by: Gergely Nagy --- quantum/process_keycode/process_tap_dance.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'quantum') diff --git a/quantum/process_keycode/process_tap_dance.c b/quantum/process_keycode/process_tap_dance.c index 07de3ecb8f..79ade4d000 100644 --- a/quantum/process_keycode/process_tap_dance.c +++ b/quantum/process_keycode/process_tap_dance.c @@ -65,9 +65,9 @@ bool process_tap_dance(uint16_t keycode, keyrecord_t *record) { highest_td = idx; action = &tap_dance_actions[idx]; - action->state.keycode = keycode; action->state.pressed = record->event.pressed; if (record->event.pressed) { + action->state.keycode = keycode; action->state.count++; action->state.timer = timer_read(); @@ -77,8 +77,9 @@ bool process_tap_dance(uint16_t keycode, keyrecord_t *record) { process_tap_dance_action_on_dance_finished (paction); reset_tap_dance (&paction->state); } + + last_td = keycode; } - last_td = keycode; break; -- cgit v1.2.3 From e571d4656cd283ce8d793fe3dd2ac176b84b0bf5 Mon Sep 17 00:00:00 2001 From: IBNobody Date: Tue, 6 Sep 2016 18:02:43 -0500 Subject: Set keyboard_nkro (used by TMK) w/ MAGIC_HOST_NKRO If NKRO is enabled, also set keyboard_nkro with MAGIC_HOST_NKRO and MAGIC_UNHOST_NKRO. --- quantum/quantum.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'quantum') diff --git a/quantum/quantum.c b/quantum/quantum.c index e3a20f43e0..fa86b6220f 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -27,6 +27,10 @@ static void do_code16 (uint16_t code, void (*f) (uint8_t)) { f(KC_RGUI); } +#ifdef NKRO_ENABLE + extern bool keyboard_nkro; +#endif + void register_code16 (uint16_t code) { do_code16 (code, register_code); register_code (code); @@ -223,6 +227,11 @@ bool process_record_quantum(keyrecord_t *record) { keymap_config.swap_backslash_backspace = 1; } else if (keycode == MAGIC_HOST_NKRO) { keymap_config.nkro = 1; + +#ifdef NKRO_ENABLE + clear_keyboard(); // clear to prevent stuck keys + keyboard_nkro = keymap_config.nkro; +#endif } else if (keycode == MAGIC_SWAP_ALT_GUI) { keymap_config.swap_lalt_lgui = 1; keymap_config.swap_ralt_rgui = 1; @@ -244,6 +253,10 @@ bool process_record_quantum(keyrecord_t *record) { keymap_config.swap_backslash_backspace = 0; } else if (keycode == MAGIC_UNHOST_NKRO) { keymap_config.nkro = 0; +#ifdef NKRO_ENABLE + clear_keyboard(); // clear to prevent stuck keys + keyboard_nkro = keymap_config.nkro; +#endif } else if (keycode == MAGIC_UNSWAP_ALT_GUI) { keymap_config.swap_lalt_lgui = 0; keymap_config.swap_ralt_rgui = 0; -- cgit v1.2.3 From 558f3ec1eb325caf706efc15e2fab26121aba442 Mon Sep 17 00:00:00 2001 From: IBNobody Date: Tue, 6 Sep 2016 23:19:01 -0500 Subject: Use keyboard config for nkro (#7) * removing nkro references - wip * changed NKRO to be defined by keymap_config --- quantum/keycode_config.h | 5 ++ quantum/keymap.h | 1 + quantum/quantum.c | 124 ++++++++++++++++++++++++++--------------------- 3 files changed, 74 insertions(+), 56 deletions(-) (limited to 'quantum') diff --git a/quantum/keycode_config.h b/quantum/keycode_config.h index 6216eefc90..c15b0d32f8 100644 --- a/quantum/keycode_config.h +++ b/quantum/keycode_config.h @@ -1,6 +1,9 @@ #include "eeconfig.h" #include "keycode.h" +#ifndef KEYCODE_CONFIG_H +#define KEYCODE_CONFIG_H + uint16_t keycode_config(uint16_t keycode); /* NOTE: Not portable. Bit field order depends on implementation */ @@ -19,3 +22,5 @@ typedef union { } keymap_config_t; extern keymap_config_t keymap_config; + +#endif /* KEYCODE_CONFIG_H */ diff --git a/quantum/keymap.h b/quantum/keymap.h index f2d94d75c3..98ddfd0c53 100644 --- a/quantum/keymap.h +++ b/quantum/keymap.h @@ -111,6 +111,7 @@ enum quantum_keycodes { MAGIC_UNSWAP_BACKSLASH_BACKSPACE, MAGIC_UNHOST_NKRO, MAGIC_UNSWAP_ALT_GUI, + MAGIC_TOGGLE_NKRO, // Leader key #ifndef DISABLE_LEADER diff --git a/quantum/quantum.c b/quantum/quantum.c index fa86b6220f..a16bd5443c 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -27,10 +27,6 @@ static void do_code16 (uint16_t code, void (*f) (uint8_t)) { f(KC_RGUI); } -#ifdef NKRO_ENABLE - extern bool keyboard_nkro; -#endif - void register_code16 (uint16_t code) { do_code16 (code, register_code); register_code (code); @@ -203,7 +199,7 @@ bool process_record_quantum(keyrecord_t *record) { return false; break; #endif - case MAGIC_SWAP_CONTROL_CAPSLOCK ... MAGIC_UNSWAP_ALT_GUI: + case MAGIC_SWAP_CONTROL_CAPSLOCK ... MAGIC_TOGGLE_NKRO: if (record->event.pressed) { // MAGIC actions (BOOTMAGIC without the boot) if (!eeconfig_is_enabled()) { @@ -211,57 +207,73 @@ bool process_record_quantum(keyrecord_t *record) { } /* keymap config */ keymap_config.raw = eeconfig_read_keymap(); - if (keycode == MAGIC_SWAP_CONTROL_CAPSLOCK) { - keymap_config.swap_control_capslock = 1; - } else if (keycode == MAGIC_CAPSLOCK_TO_CONTROL) { - keymap_config.capslock_to_control = 1; - } else if (keycode == MAGIC_SWAP_LALT_LGUI) { - keymap_config.swap_lalt_lgui = 1; - } else if (keycode == MAGIC_SWAP_RALT_RGUI) { - keymap_config.swap_ralt_rgui = 1; - } else if (keycode == MAGIC_NO_GUI) { - keymap_config.no_gui = 1; - } else if (keycode == MAGIC_SWAP_GRAVE_ESC) { - keymap_config.swap_grave_esc = 1; - } else if (keycode == MAGIC_SWAP_BACKSLASH_BACKSPACE) { - keymap_config.swap_backslash_backspace = 1; - } else if (keycode == MAGIC_HOST_NKRO) { - keymap_config.nkro = 1; - -#ifdef NKRO_ENABLE - clear_keyboard(); // clear to prevent stuck keys - keyboard_nkro = keymap_config.nkro; -#endif - } else if (keycode == MAGIC_SWAP_ALT_GUI) { - keymap_config.swap_lalt_lgui = 1; - keymap_config.swap_ralt_rgui = 1; - } - /* UNs */ - else if (keycode == MAGIC_UNSWAP_CONTROL_CAPSLOCK) { - keymap_config.swap_control_capslock = 0; - } else if (keycode == MAGIC_UNCAPSLOCK_TO_CONTROL) { - keymap_config.capslock_to_control = 0; - } else if (keycode == MAGIC_UNSWAP_LALT_LGUI) { - keymap_config.swap_lalt_lgui = 0; - } else if (keycode == MAGIC_UNSWAP_RALT_RGUI) { - keymap_config.swap_ralt_rgui = 0; - } else if (keycode == MAGIC_UNNO_GUI) { - keymap_config.no_gui = 0; - } else if (keycode == MAGIC_UNSWAP_GRAVE_ESC) { - keymap_config.swap_grave_esc = 0; - } else if (keycode == MAGIC_UNSWAP_BACKSLASH_BACKSPACE) { - keymap_config.swap_backslash_backspace = 0; - } else if (keycode == MAGIC_UNHOST_NKRO) { - keymap_config.nkro = 0; -#ifdef NKRO_ENABLE - clear_keyboard(); // clear to prevent stuck keys - keyboard_nkro = keymap_config.nkro; -#endif - } else if (keycode == MAGIC_UNSWAP_ALT_GUI) { - keymap_config.swap_lalt_lgui = 0; - keymap_config.swap_ralt_rgui = 0; + switch (keycode) + { + case MAGIC_SWAP_CONTROL_CAPSLOCK: + keymap_config.swap_control_capslock = true; + break; + case MAGIC_CAPSLOCK_TO_CONTROL: + keymap_config.capslock_to_control = true; + break; + case MAGIC_SWAP_LALT_LGUI: + keymap_config.swap_lalt_lgui = true; + break; + case MAGIC_SWAP_RALT_RGUI: + keymap_config.swap_ralt_rgui = true; + break; + case MAGIC_NO_GUI: + keymap_config.no_gui = true; + break; + case MAGIC_SWAP_GRAVE_ESC: + keymap_config.swap_grave_esc = true; + break; + case MAGIC_SWAP_BACKSLASH_BACKSPACE: + keymap_config.swap_backslash_backspace = true; + break; + case MAGIC_HOST_NKRO: + keymap_config.nkro = true; + break; + case MAGIC_SWAP_ALT_GUI: + keymap_config.swap_lalt_lgui = true; + keymap_config.swap_ralt_rgui = true; + break; + case MAGIC_UNSWAP_CONTROL_CAPSLOCK: + keymap_config.swap_control_capslock = false; + break; + case MAGIC_UNCAPSLOCK_TO_CONTROL: + keymap_config.capslock_to_control = false; + break; + case MAGIC_UNSWAP_LALT_LGUI: + keymap_config.swap_lalt_lgui = false; + break; + case MAGIC_UNSWAP_RALT_RGUI: + keymap_config.swap_ralt_rgui = false; + break; + case MAGIC_UNNO_GUI: + keymap_config.no_gui = false; + break; + case MAGIC_UNSWAP_GRAVE_ESC: + keymap_config.swap_grave_esc = false; + break; + case MAGIC_UNSWAP_BACKSLASH_BACKSPACE: + keymap_config.swap_backslash_backspace = false; + break; + case MAGIC_UNHOST_NKRO: + keymap_config.nkro = false; + break; + case MAGIC_UNSWAP_ALT_GUI: + keymap_config.swap_lalt_lgui = false; + keymap_config.swap_ralt_rgui = false; + break; + case MAGIC_TOGGLE_NKRO: + keymap_config.nkro = !keymap_config.nkro; + break; + default: + break; } eeconfig_update_keymap(keymap_config.raw); + clear_keyboard(); // clear to prevent stuck keys + return false; } break; @@ -284,7 +296,7 @@ bool process_record_quantum(keyrecord_t *record) { unregister_mods(MOD_BIT(KC_LSFT)); } return false; - break; + // break; } case KC_RSPC: { @@ -306,7 +318,7 @@ bool process_record_quantum(keyrecord_t *record) { unregister_mods(MOD_BIT(KC_RSFT)); } return false; - break; + // break; } default: { shift_interrupted[0] = true; -- cgit v1.2.3 From 1aeb59335f2fe67613df25308a630ca453975ac0 Mon Sep 17 00:00:00 2001 From: Didier Loiseau Date: Sun, 11 Sep 2016 02:19:55 +0200 Subject: Fixed compilation issues after the merge --- quantum/keymap_extras/keymap_canadian_multilingual.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'quantum') 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 -- cgit v1.2.3