Add Canadian French input locale (#21456)

Co-authored-by: Ryan <fauxpark@gmail.com>
This commit is contained in:
Nebuleon 2024-01-09 06:11:59 -05:00 committed by GitHub
parent 744ac91f5e
commit e67d2c2f6f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 650 additions and 0 deletions

File diff suppressed because it is too large Load Diff

View File

@ -36,6 +36,7 @@ These headers are located in [`quantum/keymap_extras/`](https://github.com/qmk/q
|French (AFNOR) |`keymap_french_afnor.h` |`sendstring_french_afnor.h` |
|French (BÉPO) |`keymap_bepo.h` |`sendstring_bepo.h` |
|French (Belgium) |`keymap_belgian.h` |`sendstring_belgian.h` |
|French (Canada) |`keymap_canadian_french.h` |`sendstring_canadian_french.h` |
|French (Switzerland) |`keymap_swiss_fr.h` |`sendstring_swiss_fr.h` |
|French (macOS, ISO) |`keymap_french_mac_iso.h` |`sendstring_french_mac_iso.h` |
|German |`keymap_german.h` |`sendstring_german.h` |

View File

@ -0,0 +1,122 @@
// Copyright 2023 QMK
// SPDX-License-Identifier: GPL-2.0-or-later
/*******************************************************************************
88888888888 888 d8b .d888 d8b 888 d8b
888 888 Y8P d88P" Y8P 888 Y8P
888 888 888 888
888 88888b. 888 .d8888b 888888 888 888 .d88b. 888 .d8888b
888 888 "88b 888 88K 888 888 888 d8P Y8b 888 88K
888 888 888 888 "Y8888b. 888 888 888 88888888 888 "Y8888b.
888 888 888 888 X88 888 888 888 Y8b. 888 X88
888 888 888 888 88888P' 888 888 888 "Y8888 888 88888P'
888 888
888 888
888 888
.d88b. .d88b. 88888b. .d88b. 888d888 8888b. 888888 .d88b. .d88888
d88P"88b d8P Y8b 888 "88b d8P Y8b 888P" "88b 888 d8P Y8b d88" 888
888 888 88888888 888 888 88888888 888 .d888888 888 88888888 888 888
Y88b 888 Y8b. 888 888 Y8b. 888 888 888 Y88b. Y8b. Y88b 888
"Y88888 "Y8888 888 888 "Y8888 888 "Y888888 "Y888 "Y8888 "Y88888
888
Y8b d88P
"Y88P"
*******************************************************************************/
#pragma once
#include "keycodes.h"
// clang-format off
// Aliases
#define FR_HASH KC_GRV // #
#define FR_1 KC_1 // 1
#define FR_2 KC_2 // 2
#define FR_3 KC_3 // 3
#define FR_4 KC_4 // 4
#define FR_5 KC_5 // 5
#define FR_6 KC_6 // 6
#define FR_7 KC_7 // 7
#define FR_8 KC_8 // 8
#define FR_9 KC_9 // 9
#define FR_0 KC_0 // 0
#define FR_MINS KC_MINS // -
#define FR_EQL KC_EQL // =
#define FR_Q KC_Q // Q
#define FR_W KC_W // W
#define FR_E KC_E // E
#define FR_R KC_R // R
#define FR_T KC_T // T
#define FR_Y KC_Y // Y
#define FR_U KC_U // U
#define FR_I KC_I // I
#define FR_O KC_O // O
#define FR_P KC_P // P
#define FR_DCIR KC_LBRC // ^ (dead)
#define FR_CEDL KC_RBRC // ¸ (dead)
#define FR_A KC_A // A
#define FR_S KC_S // S
#define FR_D KC_D // D
#define FR_F KC_F // F
#define FR_G KC_G // G
#define FR_H KC_H // H
#define FR_J KC_J // J
#define FR_K KC_K // K
#define FR_L KC_L // L
#define FR_SCLN KC_SCLN // ;
#define FR_DGRV KC_QUOT // ` (dead)
#define FR_LABK KC_NUHS // <
#define FR_LDAQ KC_NUBS // «
#define FR_Z KC_Z // Z
#define FR_X KC_X // X
#define FR_C KC_C // C
#define FR_V KC_V // V
#define FR_B KC_B // B
#define FR_N KC_N // N
#define FR_M KC_M // M
#define FR_COMM KC_COMM // ,
#define FR_DOT KC_DOT // .
#define FR_EACU KC_SLSH // É
#define FR_PIPE S(FR_HASH) // |
#define FR_EXLM S(FR_1) // !
#define FR_DQUO S(FR_2) // "
#define FR_SLSH S(FR_3) // /
#define FR_DLR S(FR_4) // $
#define FR_PERC S(FR_5) // %
#define FR_QUES S(FR_6) // ?
#define FR_AMPR S(FR_7) // &
#define FR_ASTR S(FR_8) // *
#define FR_LPRN S(FR_9) // (
#define FR_RPRN S(FR_0) // )
#define FR_UNDS S(FR_MINS) // _
#define FR_PLUS S(FR_EQL) // +
#define FR_DIAE S(FR_CEDL) // ¨ (dead)
#define FR_COLN S(FR_SCLN) // :
#define FR_RABK S(FR_LABK) // >
#define FR_RDAQ S(FR_LDAQ) // »
#define FR_QUOT S(FR_COMM) // '
#define FR_BSLS ALGR(FR_HASH) // (backslash)
#define FR_PLMN ALGR(FR_1) // ±
#define FR_AT ALGR(FR_2) // @
#define FR_PND ALGR(FR_3) // £
#define FR_CENT ALGR(FR_4) // ¢
#define FR_CURR ALGR(FR_5) // ¤
#define FR_NOT ALGR(FR_6) // ¬
#define FR_BRKP ALGR(FR_7) // ¦
#define FR_SUP2 ALGR(FR_8) // ²
#define FR_SUP3 ALGR(FR_9) // ³
#define FR_QRTR ALGR(FR_0) // ¼
#define FR_HALF ALGR(FR_MINS) // ½
#define FR_TQTR ALGR(FR_EQL) // ¾
#define FR_SECT ALGR(FR_O) // §
#define FR_PARA ALGR(FR_P) // ¶
#define FR_LBRC ALGR(FR_DCIR) // [
#define FR_RBRC ALGR(FR_CEDL) // ]
#define FR_TILD ALGR(FR_SCLN) // ~
#define FR_LCBR ALGR(FR_DGRV) // {
#define FR_RCBR ALGR(FR_LABK) // }
#define FR_DEG ALGR(FR_LDAQ) // °
#define FR_MICR ALGR(FR_M) // µ
#define FR_MACR ALGR(FR_COMM) // ¯
#define FR_SHYP ALGR(FR_DOT) // ­ (soft hyphen)
#define FR_ACUT ALGR(FR_EACU) // ´ (dead)

View File

@ -0,0 +1,120 @@
/* Copyright 2023 Nebuleon
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
// Sendstring lookup tables for Canadian French layouts
#pragma once
#include "keymap_canadian_french.h"
#include "send_string.h"
// clang-format off
const uint8_t ascii_to_shift_lut[16] PROGMEM = {
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
KCLUT_ENTRY(0, 1, 1, 0, 1, 1, 1, 1),
KCLUT_ENTRY(1, 1, 1, 1, 0, 0, 0, 1),
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
KCLUT_ENTRY(0, 0, 1, 0, 0, 0, 1, 1),
KCLUT_ENTRY(0, 1, 1, 1, 1, 1, 1, 1),
KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1),
KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1),
KCLUT_ENTRY(1, 1, 1, 0, 0, 0, 0, 1),
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
KCLUT_ENTRY(0, 0, 0, 0, 1, 0, 0, 0)
};
const uint8_t ascii_to_altgr_lut[16] PROGMEM = {
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0),
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 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, XXXXXXX,
// DLE DC1 DC2 DC3 DC4 NAK SYN ETB
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
// CAN EM SUB ESC FS GS RS US
XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
// ! " # $ % & '
KC_SPC, FR_1, FR_2, FR_HASH, FR_4, FR_5, FR_7, FR_COMM,
// ( ) * + , - . /
FR_9, FR_0, FR_8, FR_EQL, FR_COMM, FR_MINS, FR_DOT, FR_3,
// 0 1 2 3 4 5 6 7
FR_0, FR_1, FR_2, FR_3, FR_4, FR_5, FR_6, FR_7,
// 8 9 : ; < = > ?
FR_8, FR_9, FR_SCLN, FR_SCLN, FR_LABK, FR_EQL, FR_LABK, FR_6,
// @ A B C D E F G
FR_2, FR_A, FR_B, FR_C, FR_D, FR_E, FR_F, FR_G,
// H I J K L M N O
FR_H, FR_I, FR_J, FR_K, FR_L, FR_M, FR_N, FR_O,
// P Q R S T U V W
FR_P, FR_Q, FR_R, FR_S, FR_T, FR_U, FR_V, FR_W,
// X Y Z [ \ ] ^ _
FR_X, FR_Y, FR_Z, FR_DCIR, FR_HASH, FR_CEDL, FR_DCIR, FR_MINS,
// ` a b c d e f g
FR_DGRV, FR_A, FR_B, FR_C, FR_D, FR_E, FR_F, FR_G,
// h i j k l m n o
FR_H, FR_I, FR_J, FR_K, FR_L, FR_M, FR_N, FR_O,
// p q r s t u v w
FR_P, FR_Q, FR_R, FR_S, FR_T, FR_U, FR_V, FR_W,
// x y z { | } ~ DEL
FR_X, FR_Y, FR_Z, FR_DGRV, FR_HASH, FR_LABK, FR_SCLN, KC_DEL
};