aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/ja/reference_keymap_extras.md1
-rw-r--r--docs/reference_keymap_extras.md1
-rw-r--r--quantum/keymap_extras/keymap_portuguese_osx_iso.h234
-rw-r--r--quantum/keymap_extras/sendstring_portuguese_osx_iso.h100
4 files changed, 336 insertions, 0 deletions
diff --git a/docs/ja/reference_keymap_extras.md b/docs/ja/reference_keymap_extras.md
index e8104e5f3..fb9d167ae 100644
--- a/docs/ja/reference_keymap_extras.md
+++ b/docs/ja/reference_keymap_extras.md
@@ -51,6 +51,7 @@ HID Keyboard/Keypad usage ページでは 256 未満の usage が定義されて
51| Norwegian | `keymap_norwegian.h` | 51| Norwegian | `keymap_norwegian.h` |
52| Polish | `keymap_polish.h` | 52| Polish | `keymap_polish.h` |
53| Portuguese | `keymap_portuguese.h` | 53| Portuguese | `keymap_portuguese.h` |
54| Portuguese (macOS, ISO) | `keymap_portuguese_osx_iso.h` |
54| Portuguese (Brazil) | `keymap_br_abnt2.h` | 55| Portuguese (Brazil) | `keymap_br_abnt2.h` |
55| Romanian | `keymap_romanian.h` | 56| Romanian | `keymap_romanian.h` |
56| Russian* | `keymap_russian.h` | 57| Russian* | `keymap_russian.h` |
diff --git a/docs/reference_keymap_extras.md b/docs/reference_keymap_extras.md
index 7e3d9bf27..f2abb4e59 100644
--- a/docs/reference_keymap_extras.md
+++ b/docs/reference_keymap_extras.md
@@ -46,6 +46,7 @@ To use these, simply `#include` the corresponding [header file](https://github.c
46|Norwegian |`keymap_norwegian.h` | 46|Norwegian |`keymap_norwegian.h` |
47|Polish |`keymap_polish.h` | 47|Polish |`keymap_polish.h` |
48|Portuguese |`keymap_portuguese.h` | 48|Portuguese |`keymap_portuguese.h` |
49|Portuguese (macOS, ISO) |`keymap_portuguese_osx_iso.h` |
49|Portuguese (Brazil) |`keymap_br_abnt2.h` | 50|Portuguese (Brazil) |`keymap_br_abnt2.h` |
50|Romanian |`keymap_romanian.h` | 51|Romanian |`keymap_romanian.h` |
51|Russian* |`keymap_russian.h` | 52|Russian* |`keymap_russian.h` |
diff --git a/quantum/keymap_extras/keymap_portuguese_osx_iso.h b/quantum/keymap_extras/keymap_portuguese_osx_iso.h
new file mode 100644
index 000000000..b2e52063a
--- /dev/null
+++ b/quantum/keymap_extras/keymap_portuguese_osx_iso.h
@@ -0,0 +1,234 @@
1/* Copyright 2020
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#pragma once
18
19#include "keymap.h"
20
21// clang-format off
22
23/*
24 * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐
25 * │ § │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ ' │ + │     │
26 * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤
27 * │     │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ º │ ´ │   │
28 * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐  │
29 * │      │ A │ S │ D │ F │ G │ H │ J │ K │ L │ Ç │ ~ │ \ │  │
30 * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴──┤
31 * │    │ < │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ - │        │
32 * ├────┴┬──┴─┬─┴───┼───┴───┴───┴───┴───┴───┼───┴─┬─┴──┬─────┤
33 * │     │    │     │                       │     │    │     │
34 * └─────┴────┴─────┴───────────────────────┴─────┴────┴─────┘
35 */
36// Row 1
37#define PT_SECT KC_GRV // §
38#define PT_1 KC_1 // 1
39#define PT_2 KC_2 // 2
40#define PT_3 KC_3 // 3
41#define PT_4 KC_4 // 4
42#define PT_5 KC_5 // 5
43#define PT_6 KC_6 // 6
44#define PT_7 KC_7 // 7
45#define PT_8 KC_8 // 8
46#define PT_9 KC_9 // 9
47#define PT_0 KC_0 // 0
48#define PT_QUOT KC_MINS // '
49#define PT_PLUS KC_EQL // +
50// Row 2
51#define PT_Q KC_Q // Q
52#define PT_W KC_W // W
53#define PT_E KC_E // E
54#define PT_R KC_R // R
55#define PT_T KC_T // T
56#define PT_Y KC_Y // Y
57#define PT_U KC_U // U
58#define PT_I KC_I // I
59#define PT_O KC_O // O
60#define PT_P KC_P // P
61#define PT_MORD KC_LBRC // º
62#define PT_ACUT KC_RBRC // ´ (dead)
63// Row 3
64#define PT_A KC_A // A
65#define PT_S KC_S // S
66#define PT_D KC_D // D
67#define PT_F KC_F // F
68#define PT_G KC_G // G
69#define PT_H KC_H // H
70#define PT_J KC_J // J
71#define PT_K KC_K // K
72#define PT_L KC_L // L
73#define PT_CCED KC_SCLN // Ç
74#define PT_TILD KC_QUOT // ~ (dead)
75#define PT_BSLS KC_NUHS // (backslash)
76// Row 4
77#define PT_LABK KC_NUBS // <
78#define PT_Z KC_Z // Z
79#define PT_X KC_X // X
80#define PT_C KC_C // C
81#define PT_V KC_V // V
82#define PT_B KC_B // B
83#define PT_N KC_N // N
84#define PT_M KC_M // M
85#define PT_COMM KC_COMM // ,
86#define PT_DOT KC_DOT // .
87#define PT_MINS KC_SLSH // -
88
89/* Shifted symbols
90 * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐
91 * │ ± │ ! │ " │ # │ $ │ % │ & │ / │ ( │ ) │ = │ ? │ * │     │
92 * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤
93 * │     │   │   │   │   │   │   │   │   │   │   │ ª │ ` │   │
94 * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐  │
95 * │      │   │   │   │   │   │   │   │   │   │   │ ^ │ | │  │
96 * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴──┤
97 * │    │ > │   │   │   │   │   │   │   │ ; │ : │ _ │        │
98 * ├────┴┬──┴─┬─┴───┼───┴───┴───┴───┴───┴───┼───┴─┬─┴──┬─────┤
99 * │     │    │     │                       │     │    │     │
100 * └─────┴────┴─────┴───────────────────────┴─────┴────┴─────┘
101 */
102// Row 1
103#define PT_PLMN S(PT_SECT) // ±
104#define PT_EXLM S(PT_1) // !
105#define PT_DQUO S(PT_2) // "
106#define PT_HASH S(PT_3) // #
107#define PT_DLR S(PT_4) // $
108#define PT_PERC S(PT_5) // %
109#define PT_AMPR S(PT_6) // &
110#define PT_SLSH S(PT_7) // /
111#define PT_LPRN S(PT_8) // (
112#define PT_RPRN S(PT_9) // )
113#define PT_EQL S(PT_0) // =
114#define PT_QUES S(PT_QUOT) // ?
115#define PT_ASTR S(PT_PLUS) // *
116// Row 2
117#define PT_FORD S(PT_MORD) // ª
118#define PT_GRV S(PT_ACUT) // ` (dead)
119// Row 3
120#define PT_CIRC S(PT_TILD) // ^ (dead)
121#define PT_PIPE S(PT_BSLS) // |
122// Row 4
123#define PT_RABK S(PT_LABK) // >
124#define PT_SCLN S(PT_COMM) // ;
125#define PT_COLN S(PT_DOT) // :
126#define PT_UNDS S(PT_MINS) // _
127
128/* Alted symbols
129 * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐
130 * │   │  │ @ │ € │ £ │ ‰ │ ¶ │ ÷ │ [ │ ] │ ≠ │   │   │     │
131 * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤
132 * │     │ Œ │ ∑ │ Æ │ ® │ ™ │ ¥ │ † │ ı │ Ø │ π │ ° │ ¨ │   │
133 * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐  │
134 * │      │ Å │ ß │ ∂ │ ƒ │ ˙ │ ˇ │ ¯ │ „ │ ‘ │ ¸ │ ˜ │ ‹ │  │
135 * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴──┤
136 * │    │ ≤ │ Ω │ « │ © │ √ │ ∫ │ ¬ │ µ │ “ │ … │ — │        │
137 * ├────┴┬──┴─┬─┴───┼───┴───┴───┴───┴───┴───┼───┴─┬─┴──┬─────┤
138 * │     │    │     │                       │     │    │     │
139 * └─────┴────┴─────┴───────────────────────┴─────┴────┴─────┘
140 */
141// Row 1
142#define PT_APPL A(PT_1) //  (Apple logo)
143#define PT_AT A(PT_2) // @
144#define PT_EURO A(PT_3) // €
145#define PT_PND A(PT_4) // £
146#define PT_PERM A(PT_5) // ‰
147#define PT_PILC A(PT_6) // ¶
148#define PT_DIV A(PT_7) // ÷
149#define PT_LBRC A(PT_8) // [
150#define PT_RBRC A(PT_9) // ]
151#define PT_NEQL A(PT_0) // ≠
152// Row 2
153#define PT_OE A(PT_Q) // Œ
154#define PT_NARS A(PT_W) // ∑
155#define PT_AE A(PT_E) // Æ
156#define PT_REGD A(PT_R) // ®
157#define PT_TM A(PT_T) // ™
158#define PT_YEN A(PT_Y) // ¥
159#define PT_DAGG A(PT_U) // †
160#define PT_DLSI A(PT_I) // ı
161#define PT_OSTR A(PT_O) // Ø
162#define PT_PI A(PT_P) // π
163#define PT_DEG A(PT_MORD) // °
164#define PT_DIAE A(PT_ACUT) // ¨ (dead)
165// Row 3
166#define PT_ARNG A(PT_A) // å
167#define PT_SS A(PT_S) // ß
168#define PT_PDIF A(PT_D) // ∂
169#define PT_FHK A(PT_F) // ƒ
170#define PT_DOTA A(PT_G) // ˙
171#define PT_CARN A(PT_H) // ˇ
172#define PT_MACR A(PT_J) // ¯
173#define PT_DLQU A(PT_K) // „
174#define PT_LSQU A(PT_L) // ‘
175#define PT_CEDL A(PT_CCED) // ¸
176#define PT_STIL A(PT_TILD) // ˜ (dead)
177#define PT_LSAQ A(PT_BSLS) // ‹
178// Row 4
179#define PT_LTEQ A(PT_LABK) // ≤
180#define PT_OMEG A(PT_Z) // Ω
181#define PT_LDAQ A(PT_X) // «
182#define PT_COPY A(PT_C) // ©
183#define PT_SQRT A(PT_V) // √
184#define PT_INTG A(PT_B) // ∫
185#define PT_NOT A(PT_N) // ¬
186#define PT_MICR A(PT_M) // µ
187#define PT_LDQU A(PT_COMM) // “
188#define PT_ELLP A(PT_DOT) // …
189#define PT_MDSH A(PT_MINS) // —
190
191/* Shift+Alted symbols
192 * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐
193 * │   │ ¡ │ fi │ fl │ ¢ │ ∞ │ • │ ⁄ │ { │ } │ ≈ │ ¿ │ ◊ │     │
194 * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤
195 * │     │   │   │   │   │   │   │ ‡ │ ˚ │   │ ∏ │   │ ˝ │   │
196 * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐  │
197 * │      │   │   │ ∆ │   │   │   │   │ ‚ │ ’ │ ˛ │ ˆ │ › │  │
198 * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴──┤
199 * │    │ ≥ │   │ » │   │   │   │   │   │ ” │ · │ – │        │
200 * ├────┴┬──┴─┬─┴───┼───┴───┴───┴───┴───┴───┼───┴─┬─┴──┬─────┤
201 * │     │    │     │                       │     │    │     │
202 * └─────┴────┴─────┴───────────────────────┴─────┴────┴─────┘
203 */
204// Row 1
205#define PT_IEXL S(A(PT_1)) // ¡
206#define PT_FI S(A(PT_2)) // fi
207#define PT_FL S(A(PT_3)) // fl
208#define PT_CENT S(A(PT_4)) // ¢
209#define PT_INFN S(A(PT_5)) // ∞
210#define PT_BULT S(A(PT_6)) // •
211#define PT_FRSL S(A(PT_7)) // ⁄
212#define PT_LCBR S(A(PT_8)) // {
213#define PT_RCBR S(A(PT_9)) // }
214#define PT_AEQL S(A(PT_0)) // ≈
215#define PT_IQUE S(A(PT_QUOT)) // ¿
216#define PT_LOZN S(A(PT_PLUS)) // ◊
217// Row 2
218#define PT_DDAG S(A(PT_U)) // ‡
219#define PT_RNGA S(A(PT_I)) // ˚
220#define PT_NARP S(A(PT_P)) // ∏
221#define PT_DACU S(A(PT_ACUT)) // ˝
222// Row 3
223#define PT_INCR S(A(PT_D)) // ∆
224#define PT_SLQU S(A(PT_K)) // ‚
225#define PT_RSQU S(A(PT_L)) // ’
226#define PT_OGON S(A(PT_CCED)) // ˛
227#define PT_DCIR S(A(PT_TILD)) // ˆ (dead)
228#define PT_RSAQ S(A(PT_BSLS)) // ›
229// Row 4
230#define PT_GTEQ S(A(PT_LABK)) // ≥
231#define PT_RDAQ S(A(PT_X)) // »
232#define PT_RDQU S(A(PT_COMM)) // ”
233#define PT_MDDT S(A(PT_DOT)) // ·
234#define PT_NDSH S(A(PT_MINS)) // –
diff --git a/quantum/keymap_extras/sendstring_portuguese_osx_iso.h b/quantum/keymap_extras/sendstring_portuguese_osx_iso.h
new file mode 100644
index 000000000..1799347f3
--- /dev/null
+++ b/quantum/keymap_extras/sendstring_portuguese_osx_iso.h
@@ -0,0 +1,100 @@
1/* Copyright 2020
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17// Sendstring lookup tables for Portuguese layouts
18
19#pragma once
20
21#include "keymap_portuguese_osx_iso.h"
22#include "quantum.h"
23
24// clang-format off
25
26const uint8_t ascii_to_shift_lut[16] PROGMEM = {
27 KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
28 KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
29 KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
30 KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
31
32 KCLUT_ENTRY(0, 1, 1, 1, 1, 1, 1, 0),
33 KCLUT_ENTRY(1, 1, 1, 0, 0, 0, 0, 1),
34 KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
35 KCLUT_ENTRY(0, 0, 1, 1, 0, 1, 1, 1),
36 KCLUT_ENTRY(0, 1, 1, 1, 1, 1, 1, 1),
37 KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1),
38 KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1),
39 KCLUT_ENTRY(1, 1, 1, 0, 0, 0, 1, 1),
40 KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0),
41 KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
42 KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
43 KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 0, 0)
44};
45
46const uint8_t ascii_to_altgr_lut[16] PROGMEM = {
47 KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
48 KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
49 KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
50 KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
51
52 KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
53 KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
54 KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
55 KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
56 KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0),
57 KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
58 KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
59 KCLUT_ENTRY(0, 0, 0, 1, 0, 1, 0, 0),
60 KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
61 KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
62 KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
63 KCLUT_ENTRY(0, 0, 0, 1, 0, 1, 0, 0)
64};
65
66const uint8_t ascii_to_keycode_lut[128] PROGMEM = {
67 // NUL SOH STX ETX EOT ENQ ACK BEL
68 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
69 // BS TAB LF VT FF CR SO SI
70 KC_BSPC, KC_TAB, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
71 // DLE DC1 DC2 DC3 DC4 NAK SYN ETB
72 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
73 // CAN EM SUB ESC FS GS RS US
74 XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
75
76 // ! " # $ % & '
77 KC_SPC, PT_1, PT_2, PT_3, PT_4, PT_5, PT_6, PT_QUOT,
78 // ( ) * + , - . /
79 PT_8, PT_9, PT_PLUS, PT_PLUS, PT_COMM, PT_MINS, PT_DOT, PT_7,
80 // 0 1 2 3 4 5 6 7
81 PT_0, PT_1, PT_2, PT_3, PT_4, PT_5, PT_6, PT_7,
82 // 8 9 : ; < = > ?
83 PT_8, PT_9, PT_DOT, PT_COMM, PT_LABK, PT_0, PT_LABK, PT_QUOT,
84 // @ A B C D E F G
85 PT_2, PT_A, PT_B, PT_C, PT_D, PT_E, PT_F, PT_G,
86 // H I J K L M N O
87 PT_H, PT_I, PT_J, PT_K, PT_L, PT_M, PT_N, PT_O,
88 // P Q R S T U V W
89 PT_P, PT_Q, PT_R, PT_S, PT_T, PT_U, PT_V, PT_W,
90 // X Y Z [ \ ] ^ _
91 PT_X, PT_Y, PT_Z, PT_8, PT_BSLS, PT_9, PT_TILD, PT_MINS,
92 // ` a b c d e f g
93 PT_ACUT, PT_A, PT_B, PT_C, PT_D, PT_E, PT_F, PT_G,
94 // h i j k l m n o
95 PT_H, PT_I, PT_J, PT_K, PT_L, PT_M, PT_N, PT_O,
96 // p q r s t u v w
97 PT_P, PT_Q, PT_R, PT_S, PT_T, PT_U, PT_V, PT_W,
98 // x y z { | } ~ DEL
99 PT_X, PT_Y, PT_Z, PT_8, PT_BSLS, PT_9, PT_TILD, KC_DEL
100};