]> git.donarmstrong.com Git - qmk_firmware.git/blob - quantum/keymap_extras/keymap_canadian_multilingual.h
BÉPO over CSA: AltGr layer
[qmk_firmware.git] / quantum / keymap_extras / keymap_canadian_multilingual.h
1 #ifndef KEYMAP_CANADIAN_MULTILINGUAG_H
2 #define KEYMAP_CANADIAN_MULTILINGUAG_H
3
4 #include "keymap_common.h"
5
6 // Alt gr
7 #ifndef ALTGR
8 #define ALTGR(kc)   RALT(kc)
9 #endif
10 #ifndef ALGR
11 #define ALGR(kc)    ALTGR(kc)
12 #endif
13
14 #define CM_ALTGR    KC_RALT
15 #define CM_ALGR     CM_ALTGR
16
17 #ifndef GR2A
18 #define GR2A(kc)    RCTL(kc)
19 #endif
20
21 // Normal characters
22 // First row
23 #define CM_SLASH    KC_GRV      // /
24 #define CM_SLSH     CM_SLASH
25
26 // Second row
27 #define CM_DEAD_CIRCUMFLEX  KC_LBRACKET         // dead ^
28 #define CM_DCRC             CM_DEAD_CIRCUMFLEX
29 #define CM_C_CEDILLA        KC_RBRACKET         // Ç
30 #define CM_CCED             CM_C_CEDILLA
31
32 // Third row
33 #define CM_E_GRAVE  KC_QUOT     // è
34 #define CM_EGRV     CM_E_GRAVE
35 #define CM_A_GRAVE  KC_BSLASH   // à
36 #define CM_AGRV     CM_A_GRAVE
37
38 // Fourth row
39 #define CM_U_GRAVE  KC_NONUS_BSLASH     // ù
40 #define CM_UGRV     CM_U_GRAVE
41 #define CM_E_ACUTE  KC_SLSH             // é
42 #define CM_ECUT     CM_E_ACUTE
43
44 // Shifted characters
45 // First row
46 #define CM_BACKSLASH    LSFT(CM_SLASH)  /* \ */
47 #define CM_BSLS         CM_BACKSLASH
48 #define CM_QUESTION     LSFT(KC_6)      // ?
49 #define CM_QEST         CM_QUESTION
50
51 // Second row
52 #define CM_DEAD_TREMA   LSFT(CM_DEAD_CIRCUMFLEX)    // dead trema/umlaut/diaresis for ä ë ï ö ü
53 #define CM_DTRM         CM_DEAD_TREMA
54
55 // Third row
56 // all same as US-QWERTY, or capitalised character of the non-shifted key
57
58 // Fourth row
59 #define CM_APOSTROPHE   LSFT(KC_COMMA)  // '
60 #define CM_APOS         CM_APOSTROPHE
61 #define CM_DOUBLE_QUOTE LSFT(KC_DOT)    // "
62 #define CM_DQOT         CM_DOUBLE_QUOTE
63
64 // Alt Gr-ed characters
65 // First row
66 #define CM_PIPE                 ALTGR(CM_SLASH)         // |
67 #define CM_CURRENCY             ALTGR(KC_4)             // ¤
68 #define CM_CURR                 CM_CURRENCY
69 #define CM_LEFT_CURLY_BRACE     ALTGR(KC_7)             // {
70 #define CM_LCBR                 CM_LEFT_CURLY_BRACE
71 #define CM_RIGHT_CURLY_BRACE    ALTGR(KC_8)             // }
72 #define CM_RCBR                 CM_RIGHT_CURLY_BRACE
73 #define CM_LBRACKET             ALTGR(KC_9)             // [
74 #define CM_LBRC                 CM_LBRACKET
75 #define CM_RBRACKET             ALTGR(KC_0)             // ]
76 #define CM_RBRC                 CM_RBRACKET
77 #define CM_NEGATION             ALTGR(KC_EQUAL)         // ¬
78 #define CM_NEGT                 CM_NEGATION
79
80 // Second row
81 // euro symbol not available on Linux? (X.org)
82 #define CM_EURO         ALTGR(KC_E)                 // €
83 #define CM_DEAD_GRAVE   ALTGR(CM_DEAD_CIRCUMFLEX)
84 #define CM_DGRV         CM_DEAD_GRAVE               // dead `
85 #define CM_TILDE        ALTGR(CM_C_CEDILLA)         // ~
86 #define CM_TILD         CM_TILDE
87
88 // Third row
89 #define CM_DEGREE   ALTGR(KC_SCOLON)    // °
90 #define CM_DEGR     CM_DEGREE
91
92 // Fourth row
93 #define CM_LEFT_GUILLEMET   ALTGR(KC_Z)         // «
94 #define CM_LGIL             CM_LEFT_GUILLEMET
95 #define CM_RIGHT_GUILLEMET  ALTGR(KC_X)         // »
96 #define CM_RGIL             CM_RIGHT_GUILLEMET
97 #define CM_LESS             ALTGR(KC_COMMA)     // <
98 #define CM_GREATER          ALTGR(KC_DOT)       // >
99 #define CM_GRTR             CM_GREATER
100
101 // Space bar
102 #define CM_NON_BREAKING_SPACE   ALTGR(KC_SPACE)
103 #define CM_NBSP                 CM_NON_BREAKING_SPACE
104
105 // GR2A-ed characters (non-exhaustive list)
106 // second row
107 #define CM_OE_LIGATURE  GR2A(KC_E)      // œ
108 #define CM_OE           CM_OE_LIGATURE
109
110 // third row
111 #define CM_AE_LIGATURE  GR2A(KC_A)      // æ
112 #define CM_AE           CM_AE_LIGATURE
113 #define CM_DEAD_ACUTE   GR2A(KC_SCLN)   // dead acute accent
114 #define CM_DACT         CM_DEAD_ACUTE
115
116 #endif