From a7cef2ca0a2322448d02008337013936b1d550ec Mon Sep 17 00:00:00 2001 From: Didier Loiseau Date: Wed, 17 Feb 2016 21:45:38 +0100 Subject: Initial BÉPO over CSA with Shift layer 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 000000000..ae60ffe37 --- /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-24-g4f1b From 7840e69bfaee1d67de273c235b532d6f20c905a9 Mon Sep 17 00:00:00 2001 From: Didier Loiseau Date: Thu, 18 Feb 2016 00:47:23 +0100 Subject: BÉPO over CSA: AltGr layer 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 ae60ffe37..e30419b5b 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-24-g4f1b From 911222892ecb1c01551e0abdfbe98ed1dbf82139 Mon Sep 17 00:00:00 2001 From: Didier Loiseau Date: Fri, 26 Feb 2016 00:55:39 +0100 Subject: BÉPO over CSA: GR2A characters in AltGr layer 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 e30419b5b..9b13b1e4e 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-24-g4f1b 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 9b13b1e4e..b1d7b4e77 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-24-g4f1b From aa5eb49edd993e2abe3adf814e030fcdda4a3596 Mon Sep 17 00:00:00 2001 From: Didier Loiseau Date: Wed, 2 Mar 2016 00:22:41 +0100 Subject: BÉPO over CSA: GR2A-shifted characters in AltGr layer 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 b1d7b4e77..c720088e8 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-24-g4f1b 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 07de3ecb8..79ade4d00 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-24-g4f1b 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 e3a20f43e..fa86b6220 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-24-g4f1b 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 6216eefc9..c15b0d32f 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 f2d94d75c..98ddfd0c5 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 fa86b6220..a16bd5443 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-24-g4f1b 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 c720088e8..0bc20c7b9 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-24-g4f1b From f0021c9cb9e30d47d5a3ab5ec75e59e626c3d244 Mon Sep 17 00:00:00 2001 From: "Jonathan A. Kollasch" Date: Mon, 19 Sep 2016 14:25:44 -0500 Subject: Add more shifted Dvorak key code definitions --- quantum/keymap_extras/keymap_dvorak.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'quantum') diff --git a/quantum/keymap_extras/keymap_dvorak.h b/quantum/keymap_extras/keymap_dvorak.h index 17f205977..a0feed850 100644 --- a/quantum/keymap_extras/keymap_dvorak.h +++ b/quantum/keymap_extras/keymap_dvorak.h @@ -70,6 +70,10 @@ #define DV_LCBR LSFT(DV_LBRC) #define DV_RCBR LSFT(DV_RBRC) +#define DV_DQUO LSFT(DV_QUOT) +#define DV_LABK LSFT(DV_COMM) +#define DV_RABK LSFT(DV_DOT) + #define DV_QUES LSFT(DV_SLSH) #define DV_PLUS LSFT(DV_EQL) #define DV_PIPE LSFT(DV_BSLS) -- cgit v1.2.3-24-g4f1b From e1f131db8e59c6ed3471906d3a62457d593f51af Mon Sep 17 00:00:00 2001 From: Pavlos Vinieratos Date: Wed, 21 Sep 2016 10:11:42 +0200 Subject: restore each_tap callback --- quantum/process_keycode/process_tap_dance.c | 1 + 1 file changed, 1 insertion(+) (limited to 'quantum') diff --git a/quantum/process_keycode/process_tap_dance.c b/quantum/process_keycode/process_tap_dance.c index 79ade4d00..6ae362c4c 100644 --- a/quantum/process_keycode/process_tap_dance.c +++ b/quantum/process_keycode/process_tap_dance.c @@ -70,6 +70,7 @@ bool process_tap_dance(uint16_t keycode, keyrecord_t *record) { action->state.keycode = keycode; action->state.count++; action->state.timer = timer_read(); + process_tap_dance_action_on_each_tap (action); if (last_td && last_td != keycode) { qk_tap_dance_action_t *paction = &tap_dance_actions[last_td - QK_TAP_DANCE]; -- cgit v1.2.3-24-g4f1b From 0edc82f0300924394324e2f3c4d2f8f0008439db Mon Sep 17 00:00:00 2001 From: Pavlos Vinieratos Date: Wed, 21 Sep 2016 11:29:34 +0200 Subject: formatting --- quantum/process_keycode/process_tap_dance.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'quantum') diff --git a/quantum/process_keycode/process_tap_dance.h b/quantum/process_keycode/process_tap_dance.h index d7b857bdc..49b06e450 100644 --- a/quantum/process_keycode/process_tap_dance.h +++ b/quantum/process_keycode/process_tap_dance.h @@ -39,15 +39,15 @@ typedef struct #define ACTION_TAP_DANCE_DOUBLE(kc1, kc2) { \ .fn = { NULL, qk_tap_dance_pair_finished, qk_tap_dance_pair_reset }, \ - .user_data = (void *)&((qk_tap_dance_pair_t) { kc1, kc2 }) \ + .user_data = (void *)&((qk_tap_dance_pair_t) { kc1, kc2 }), \ } #define ACTION_TAP_DANCE_FN(user_fn) { \ - .fn = { NULL, user_fn, NULL } \ + .fn = { NULL, user_fn, NULL }, \ } -#define ACTION_TAP_DANCE_FN_ADVANCED(user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_reset) { \ - .fn = { user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_reset } \ +#define ACTION_TAP_DANCE_FN_ADVANCED(user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_dance_reset) { \ + .fn = { user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_dance_reset }, \ } extern qk_tap_dance_action_t tap_dance_actions[]; -- cgit v1.2.3-24-g4f1b From cda4b534fa4921c2d8f9884aa6a144333e7b07c4 Mon Sep 17 00:00:00 2001 From: Pavlos Vinieratos Date: Wed, 21 Sep 2016 11:29:43 +0200 Subject: add user_data field --- quantum/process_keycode/process_tap_dance.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'quantum') diff --git a/quantum/process_keycode/process_tap_dance.h b/quantum/process_keycode/process_tap_dance.h index 49b06e450..f753cbba6 100644 --- a/quantum/process_keycode/process_tap_dance.h +++ b/quantum/process_keycode/process_tap_dance.h @@ -44,10 +44,12 @@ typedef struct #define ACTION_TAP_DANCE_FN(user_fn) { \ .fn = { NULL, user_fn, NULL }, \ + .user_data = NULL, \ } #define ACTION_TAP_DANCE_FN_ADVANCED(user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_dance_reset) { \ .fn = { user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_dance_reset }, \ + .user_data = NULL, \ } extern qk_tap_dance_action_t tap_dance_actions[]; -- cgit v1.2.3-24-g4f1b From 8d99140d1b80bf497b2198138d3f481e93b0fbab Mon Sep 17 00:00:00 2001 From: Adam Gausmann Date: Thu, 29 Sep 2016 14:46:10 -0500 Subject: Missing ifdef statement --- quantum/process_keycode/process_midi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'quantum') diff --git a/quantum/process_keycode/process_midi.c b/quantum/process_keycode/process_midi.c index 8784e64f3..577dad43a 100644 --- a/quantum/process_keycode/process_midi.c +++ b/quantum/process_keycode/process_midi.c @@ -7,7 +7,9 @@ int midi_offset = 7; bool process_midi(uint16_t keycode, keyrecord_t *record) { if (keycode == MI_ON && record->event.pressed) { midi_activated = true; +#ifdef AUDIO_ENABLE music_scale_user(); +#endif return false; } @@ -63,4 +65,4 @@ bool process_midi(uint16_t keycode, keyrecord_t *record) { return false; } return true; -} \ No newline at end of file +} -- cgit v1.2.3-24-g4f1b From a3f5a4cf5839fe29dd37400d72c5e353812002f8 Mon Sep 17 00:00:00 2001 From: coderkun Date: Sun, 2 Oct 2016 10:35:09 +0200 Subject: Declare Unicode method hex_to_keycode() as “weak” MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Declare Unicode method hex_to_keycode() as “weak” to be able to override it in keymaps. --- quantum/process_keycode/process_unicode.c | 1 + 1 file changed, 1 insertion(+) (limited to 'quantum') diff --git a/quantum/process_keycode/process_unicode.c b/quantum/process_keycode/process_unicode.c index a5d7dca21..6a30afe29 100644 --- a/quantum/process_keycode/process_unicode.c +++ b/quantum/process_keycode/process_unicode.c @@ -2,6 +2,7 @@ static uint8_t input_mode; +__attribute__((weak)) uint16_t hex_to_keycode(uint8_t hex) { if (hex == 0x0) { -- cgit v1.2.3-24-g4f1b From 1048a588c750e27ff0f900cd6aaf670e034086d0 Mon Sep 17 00:00:00 2001 From: npoirey Date: Fri, 7 Oct 2016 17:15:11 +0200 Subject: Add Altgr combination for non US layouts --- quantum/keymap.h | 1 + 1 file changed, 1 insertion(+) (limited to 'quantum') diff --git a/quantum/keymap.h b/quantum/keymap.h index 98ddfd0c5..4b2192cb2 100644 --- a/quantum/keymap.h +++ b/quantum/keymap.h @@ -191,6 +191,7 @@ enum quantum_keycodes { #define HYPR(kc) (kc | QK_LCTL | QK_LSFT | QK_LALT | QK_LGUI) #define MEH(kc) (kc | QK_LCTL | QK_LSFT | QK_LALT) #define LCAG(kc) (kc | QK_LCTL | QK_LALT | QK_LGUI) +#define ALTG(kc) (kc | QK_RCTL | QK_RALT) #define MOD_HYPR 0xf #define MOD_MEH 0x7 -- cgit v1.2.3-24-g4f1b From 70f32842e5d94f14d05c1f9adcb1b1144a25a132 Mon Sep 17 00:00:00 2001 From: Wojciech Siewierski Date: Sun, 9 Oct 2016 12:52:39 +0200 Subject: Reduce the default dynamic macro buffer There have been reports of it leaving not enough free memory preventing the keyboard from working properly. --- quantum/dynamic_macro.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'quantum') diff --git a/quantum/dynamic_macro.h b/quantum/dynamic_macro.h index a3ad61bc7..e6dbc5b9c 100644 --- a/quantum/dynamic_macro.h +++ b/quantum/dynamic_macro.h @@ -8,8 +8,13 @@ /* May be overridden with a custom value. Be aware that the effective * macro length is half of this value: each keypress is recorded twice * because of the down-event and up-event. This is not a bug, it's the - * intended behavior. */ -#define DYNAMIC_MACRO_SIZE 256 + * intended behavior. + * + * Usually it should be fine to set the macro size to at least 256 but + * there have been reports of it being too much in some users' cases, + * so 128 is considered a safe default. + */ +#define DYNAMIC_MACRO_SIZE 128 #endif /* DYNAMIC_MACRO_RANGE must be set as the last element of user's -- cgit v1.2.3-24-g4f1b From 9b0e21f87f446935f29254bb623c2cfe29472b6e Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Sun, 9 Oct 2016 19:26:16 +0300 Subject: Tunable RGB light intervals --- quantum/rgblight.c | 6 ++++++ quantum/rgblight.h | 6 ++++++ 2 files changed, 12 insertions(+) (limited to 'quantum') diff --git a/quantum/rgblight.c b/quantum/rgblight.c index f82e3ec55..9eac87a20 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c @@ -42,10 +42,16 @@ const uint8_t RGBLED_BREATHING_TABLE[] PROGMEM = { 37, 35, 33, 31, 29, 27, 25, 23, 21, 20, 18, 17, 15, 14, 12, 11, 10, 9, 7, 6, 5, 5, 4, 3, 2, 2, 1, 1, 1, 0, 0, 0 }; + +__attribute__ ((weak)) const uint8_t RGBLED_BREATHING_INTERVALS[] PROGMEM = {30, 20, 10, 5}; +__attribute__ ((weak)) const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[] PROGMEM = {120, 60, 30}; +__attribute__ ((weak)) const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[] PROGMEM = {100, 50, 20}; +__attribute__ ((weak)) const uint8_t RGBLED_SNAKE_INTERVALS[] PROGMEM = {100, 50, 20}; +__attribute__ ((weak)) const uint8_t RGBLED_KNIGHT_INTERVALS[] PROGMEM = {100, 50, 20}; rgblight_config_t rgblight_config; diff --git a/quantum/rgblight.h b/quantum/rgblight.h index def26c428..17f04ffcf 100644 --- a/quantum/rgblight.h +++ b/quantum/rgblight.h @@ -40,6 +40,12 @@ #include "eeconfig.h" #include "light_ws2812.h" +extern const uint8_t RGBLED_BREATHING_INTERVALS[4] PROGMEM; +extern const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[3] PROGMEM; +extern const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[3] PROGMEM; +extern const uint8_t RGBLED_SNAKE_INTERVALS[3] PROGMEM; +extern const uint8_t RGBLED_KNIGHT_INTERVALS[3] PROGMEM; + typedef union { uint32_t raw; struct { -- cgit v1.2.3-24-g4f1b From 92a3a96849aee708753a6623b0db228023e3baf8 Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Sun, 9 Oct 2016 19:47:05 +0300 Subject: Apply the dim curve to the RGB output Just like it's supposed to be used. It now looks much better. --- quantum/rgblight.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'quantum') diff --git a/quantum/rgblight.c b/quantum/rgblight.c index f82e3ec55..b36a1fda0 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c @@ -55,13 +55,8 @@ uint8_t rgblight_inited = 0; void sethsv(uint16_t hue, uint8_t sat, uint8_t val, struct cRGB *led1) { - // Convert hue, saturation, and value (HSV/HSB) to RGB. DIM_CURVE is used only - // on value and saturation (inverted). This looks the most natural. uint8_t r = 0, g = 0, b = 0, base, color; - val = pgm_read_byte(&DIM_CURVE[val]); - sat = 255 - pgm_read_byte(&DIM_CURVE[255 - sat]); - if (sat == 0) { // Acromatic color (gray). Hue doesn't mind. r = val; g = val; @@ -103,6 +98,9 @@ void sethsv(uint16_t hue, uint8_t sat, uint8_t val, struct cRGB *led1) { break; } } + r = pgm_read_byte(&DIM_CURVE[r]); + g = pgm_read_byte(&DIM_CURVE[g]); + b = pgm_read_byte(&DIM_CURVE[b]); setrgb(r, g, b, led1); } -- cgit v1.2.3-24-g4f1b From ffae9d84c5279b463da112ee15568d536649b819 Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Sun, 9 Oct 2016 19:53:41 +0300 Subject: CIE 1931 dim curve --- quantum/rgblight.c | 47 ++++++++++++++++++++++++++++++----------------- 1 file changed, 30 insertions(+), 17 deletions(-) (limited to 'quantum') diff --git a/quantum/rgblight.c b/quantum/rgblight.c index b36a1fda0..9ddc243b2 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c @@ -6,24 +6,37 @@ #include "rgblight.h" #include "debug.h" +// Lightness curve using the CIE 1931 lightness formula +//Generated by the python script provided in http://jared.geek.nz/2013/feb/linear-led-pwm const uint8_t DIM_CURVE[] PROGMEM = { - 0, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, - 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, - 8, 8, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 11, 11, 11, - 11, 11, 12, 12, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 14, 15, - 15, 15, 16, 16, 16, 16, 17, 17, 17, 18, 18, 18, 19, 19, 19, 20, - 20, 20, 21, 21, 22, 22, 22, 23, 23, 24, 24, 25, 25, 25, 26, 26, - 27, 27, 28, 28, 29, 29, 30, 30, 31, 32, 32, 33, 33, 34, 35, 35, - 36, 36, 37, 38, 38, 39, 40, 40, 41, 42, 43, 43, 44, 45, 46, 47, - 48, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 68, 69, 70, 71, 73, 74, 75, 76, 78, 79, 81, 82, - 83, 85, 86, 88, 90, 91, 93, 94, 96, 98, 99, 101, 103, 105, 107, 109, - 110, 112, 114, 116, 118, 121, 123, 125, 127, 129, 132, 134, 136, 139, 141, 144, - 146, 149, 151, 154, 157, 159, 162, 165, 168, 171, 174, 177, 180, 183, 186, 190, - 193, 196, 200, 203, 207, 211, 214, 218, 222, 226, 230, 234, 238, 242, 248, 255 -}; + 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, + 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, + 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, + 7, 8, 8, 8, 8, 9, 9, 9, 10, 10, + 10, 10, 11, 11, 11, 12, 12, 12, 13, 13, + 13, 14, 14, 15, 15, 15, 16, 16, 17, 17, + 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, + 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, + 28, 28, 29, 29, 30, 31, 31, 32, 32, 33, + 34, 34, 35, 36, 37, 37, 38, 39, 39, 40, + 41, 42, 43, 43, 44, 45, 46, 47, 47, 48, + 49, 50, 51, 52, 53, 54, 54, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 68, 70, 71, 72, 73, 74, 75, 76, 77, 79, + 80, 81, 82, 83, 85, 86, 87, 88, 90, 91, + 92, 94, 95, 96, 98, 99, 100, 102, 103, 105, + 106, 108, 109, 110, 112, 113, 115, 116, 118, 120, + 121, 123, 124, 126, 128, 129, 131, 132, 134, 136, + 138, 139, 141, 143, 145, 146, 148, 150, 152, 154, + 155, 157, 159, 161, 163, 165, 167, 169, 171, 173, + 175, 177, 179, 181, 183, 185, 187, 189, 191, 193, + 196, 198, 200, 202, 204, 207, 209, 211, 214, 216, + 218, 220, 223, 225, 228, 230, 232, 235, 237, 240, + 242, 245, 247, 250, 252, 255, + }; + const uint8_t RGBLED_BREATHING_TABLE[] PROGMEM = { 0, 0, 0, 0, 1, 1, 1, 2, 2, 3, 4, 5, 5, 6, 7, 9, 10, 11, 12, 14, 15, 17, 18, 20, 21, 23, 25, 27, 29, 31, 33, 35, -- cgit v1.2.3-24-g4f1b From e27a754b70434de88a37c4a572e4ca5f7730ff58 Mon Sep 17 00:00:00 2001 From: Jack & Erez Date: Wed, 12 Oct 2016 22:18:27 -0400 Subject: [Jack & Erez] Simplifies and documents TO --- quantum/keymap.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'quantum') diff --git a/quantum/keymap.h b/quantum/keymap.h index 4b2192cb2..85c090972 100644 --- a/quantum/keymap.h +++ b/quantum/keymap.h @@ -296,7 +296,10 @@ enum quantum_keycodes { // ON_PRESS = 1 // ON_RELEASE = 2 // Unless you have a good reason not to do so, prefer ON_PRESS (1) as your default. -#define TO(layer, when) (layer | QK_TO | (when << 0x4)) +// In fact, we changed it to assume ON_PRESS for sanity/simplicity. If needed, you can add your own +// keycode modeled after the old version, kept below for this. +/* #define TO(layer, when) (layer | QK_TO | (when << 0x4)) */ +#define TO(layer) (layer | QK_TO | (ON_PRESS << 0x4)) // Momentary switch layer - 256 layer max #define MO(layer) (layer | QK_MOMENTARY) -- cgit v1.2.3-24-g4f1b