You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

253 lines
13 KiB

  1. /* Copyright 2020 Guillaume Gérard
  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. /* French AZERTY - AFNOR NF Z71-300
  17. *
  18. * A standard for the French keyboard
  19. *
  20. * The project was launched at the end of 2015 on the proposal of the General
  21. * Delegation for the French language and the languages of France (Ministry
  22. * of Culture), starting from the observation that the current "azerty"
  23. * keyboards constrain the writing of French, languages regional and European
  24. * languages with Latin alphabet.
  25. *
  26. * For the first time, a standard (NF Z71-300) defines the placement of
  27. * characters on the French keyboard. It offers two layouts, one of which
  28. * closely follows the QWERTY keyboard used by most people who write in French.
  29. *
  30. * However, it is in many ways superior to the old keyboard:
  31. *
  32. * - it contains all the characters required to enter text in French (for example É, œ and ")
  33. * - it is designed to be more ergonomic and allow faster typing
  34. * - it includes almost 60 additional characters for entering foreign languages, technical content, etc
  35. * - however, the characters remain easy to locate thanks to intuitive groupings
  36. *
  37. * Source: https://norme-azerty.fr
  38. */
  39. #pragma once
  40. #include "keymap.h"
  41. // clang-format off
  42. /*
  43. *
  44. * @ à é è ê ( ) « » ' ^
  45. *
  46. * A Z E R T Y U I O P - +
  47. *
  48. * Q S D F G H J K L M / *
  49. *
  50. * < W X C V B N . , : ;
  51. *
  52. *
  53. *
  54. */
  55. // Row 1
  56. #define FR_AT KC_GRV // @
  57. #define FR_AGRV KC_1 // à
  58. #define FR_EACU KC_2 // é
  59. #define FR_EGRV KC_3 // è
  60. #define FR_ECIR KC_4 // ê
  61. #define FR_LPRN KC_5 // (
  62. #define FR_RPRN KC_6 // )
  63. #define FR_LSQU KC_7 // ‘
  64. #define FR_RSQU KC_8 // ’
  65. #define FR_LDAQ KC_9 // «
  66. #define FR_RDAQ KC_0 // »
  67. #define FR_QUOT KC_MINS // '
  68. #define FR_DCIR KC_EQL // ^ (dead)
  69. // Row 2
  70. #define FR_A KC_Q // A
  71. #define FR_Z KC_W // Z
  72. #define FR_E KC_E // E
  73. #define FR_R KC_R // R
  74. #define FR_T KC_T // T
  75. #define FR_Y KC_Y // Y
  76. #define FR_U KC_U // U
  77. #define FR_I KC_I // I
  78. #define FR_O KC_O // O
  79. #define FR_P KC_P // P
  80. #define FR_MINS KC_LBRC // -
  81. #define FR_PLUS KC_RBRC // +
  82. // Row 3
  83. #define FR_Q KC_A // Q
  84. #define FR_S KC_S // S
  85. #define FR_D KC_D // D
  86. #define FR_F KC_F // F
  87. #define FR_G KC_G // G
  88. #define FR_H KC_H // H
  89. #define FR_J KC_J // J
  90. #define FR_K KC_K // K
  91. #define FR_L KC_L // L
  92. #define FR_M KC_SCLN // M
  93. #define FR_SLSH KC_QUOT // /
  94. #define FR_ASTR KC_NUHS // *
  95. // Row 4
  96. #define FR_LABK KC_NUBS // <
  97. #define FR_W KC_Z // W
  98. #define FR_X KC_X // X
  99. #define FR_C KC_C // C
  100. #define FR_V KC_V // V
  101. #define FR_B KC_B // B
  102. #define FR_N KC_N // N
  103. #define FR_DOT KC_M // .
  104. #define FR_COMM KC_COMM // ,
  105. #define FR_COLN KC_DOT // :
  106. #define FR_SCLN KC_SLSH // ;
  107. /* Shifted symbols
  108. *
  109. * # 1 2 3 4 5 6 7 8 9 0 " │ ¨ │ │
  110. *
  111. * ±
  112. *
  113. * \ ½
  114. *
  115. * > ? ! =
  116. *
  117. *
  118. *
  119. */
  120. // Row 1
  121. #define FR_HASH S(FR_AT) // #
  122. #define FR_1 S(FR_AGRV) // 1
  123. #define FR_2 S(FR_EACU) // 2
  124. #define FR_3 S(FR_EGRV) // 3
  125. #define FR_4 S(FR_ECIR) // 4
  126. #define FR_5 S(FR_LPRN) // 5
  127. #define FR_6 S(FR_RPRN) // 6
  128. #define FR_7 S(FR_LSQU) // 7
  129. #define FR_8 S(FR_RSQU) // 8
  130. #define FR_9 S(FR_LDAQ) // 9
  131. #define FR_0 S(FR_RDAQ) // 0
  132. #define FR_DQUO S(FR_QUOT) // "
  133. #define FR_DIAE S(FR_DCIR) // ¨ (dead)
  134. // Row 2
  135. #define FR_NDSH S(FR_MINS) // –
  136. #define FR_PLMN S(FR_PLUS) // ±
  137. // Row 3
  138. #define FR_BSLS S(FR_SLSH) // (backslash)
  139. #define FR_HALF S(FR_ASTR) // ½
  140. // Row 4
  141. #define FR_RABK S(FR_LABK) // >
  142. #define FR_QUES S(FR_DOT) // ?
  143. #define FR_EXLM S(FR_COMM) // !
  144. #define FR_ELLP S(FR_COLN) // …
  145. #define FR_EQL S(FR_SCLN) // =
  146. /* AltGr symbols
  147. *
  148. * ˘ § ´ ` & [ ] ¯ _ ° ˇ
  149. *
  150. * æ £ ® { } ù ˙ œ %
  151. *
  152. * θ ß $ ¤ µ Eu | ÷ ×
  153. *
  154. * ʒ © ç ¸ ~ ¿ ¡ ·
  155. *
  156. *
  157. *
  158. */
  159. // Row 1
  160. #define FR_BREV ALGR(FR_AT) // ˘ (dead)
  161. #define FR_SECT ALGR(FR_AGRV) // §
  162. #define FR_ACUT ALGR(FR_EACU) // ´ (dead)
  163. #define FR_GRV ALGR(FR_EGRV) // ` (dead)
  164. #define FR_AMPR ALGR(FR_ECIR) // &
  165. #define FR_LBRC ALGR(FR_LPRN) // [
  166. #define FR_RBRC ALGR(FR_RPRN) // ]
  167. #define FR_MACR ALGR(FR_LSQU) // ¯ (dead)
  168. #define FR_UNDS ALGR(FR_RSQU) // _
  169. #define FR_LDQU ALGR(FR_LDAQ) // “
  170. #define FR_RDQU ALGR(FR_RDAQ) // ”
  171. #define FR_DEG ALGR(FR_QUOT) // °
  172. #define FR_CARN ALGR(FR_DCIR) // ˇ (dead)
  173. // Row 2
  174. #define FR_AE ALGR(FR_A) // æ
  175. #define FR_PND ALGR(FR_Z) // £
  176. #define FR_EURO ALGR(FR_E) // €
  177. #define FR_REGD ALGR(FR_R) // ®
  178. #define FR_LCBR ALGR(FR_T) // {
  179. #define FR_RCBR ALGR(FR_Y) // }
  180. #define FR_UGRV ALGR(FR_U) // ù
  181. #define FR_DOTA ALGR(FR_I) // ˙ (dead)
  182. #define FR_OE ALGR(FR_O) // œ
  183. #define FR_PERC ALGR(FR_P) // %
  184. #define FR_MMNS ALGR(FR_MINS) // −
  185. #define FR_DAGG ALGR(FR_PLUS) // †
  186. // Row 3
  187. #define FR_THET ALGR(FR_Q) // θ
  188. #define FR_SS ALGR(FR_S) // ß
  189. #define FR_DLR ALGR(FR_D) // $
  190. #define FR_CURR ALGR(FR_F) // ¤ (dead monetary key)
  191. #define FR_DGRK ALGR(FR_G) // µ (dead Greek key)
  192. #define FR_EU ALGR(FR_H) // Eu (dead European symbol key)
  193. #define FR_DSLS ALGR(FR_K) // ∕ (dead)
  194. #define FR_PIPE ALGR(FR_L) // |
  195. #define FR_INFN ALGR(FR_M) // ∞
  196. #define FR_DIV ALGR(FR_SLSH) // ÷
  197. #define FR_MUL ALGR(FR_ASTR) // ×
  198. // Row 4
  199. #define FR_LEQL ALGR(FR_LABK) // ≤
  200. #define FR_EZH ALGR(FR_W) // ʒ
  201. #define FR_COPY ALGR(FR_X) // ©
  202. #define FR_CCED ALGR(FR_C) // ç
  203. #define FR_CEDL ALGR(FR_V) // ¸ (dead)
  204. #define FR_DMNS ALGR(FR_B) // − (dead)
  205. #define FR_DTIL ALGR(FR_N) // ~ (dead)
  206. #define FR_IQUE ALGR(FR_DOT) // ¿
  207. #define FR_IEXL ALGR(FR_COMM) // ¡
  208. #define FR_MDDT ALGR(FR_COLN) // ·
  209. #define FR_AEQL ALGR(FR_SCLN) // ≃
  210. /* Shift+AltGr symbols
  211. *
  212. * ̑ ˝ ̏ ˚
  213. *
  214. * ̣
  215. *
  216. * ˍ ¼
  217. *
  218. * ˛ ̦
  219. *
  220. *
  221. *
  222. */
  223. // Row 1
  224. #define FR_IBRV S(ALGR(FR_AT)) // ̑ (dead)
  225. #define FR_DACU S(ALGR(FR_LPRN)) // ˝ (dead)
  226. #define FR_DGRV S(ALGR(FR_RPRN)) // ̏ (dead)
  227. #define FR_MDSH S(ALGR(FR_RSQU)) // —
  228. #define FR_LSAQ S(ALGR(FR_LDAQ)) // ‹
  229. #define FR_RSAQ S(ALGR(FR_RDAQ)) // ›
  230. #define FR_RNGA S(ALGR(FR_QUOT)) // ˚ (dead)
  231. // Row 2
  232. #define FR_TM S(ALGR(FR_T)) // ™
  233. #define FR_DOTB S(ALGR(FR_I)) // ̣ (dead)
  234. #define FR_PERM S(ALGR(FR_P)) // ‰
  235. #define FR_NBHY S(ALGR(FR_MINS)) // ‑ (non-breaking hyphen)
  236. #define FR_DDAG S(ALGR(FR_PLUS)) // ‡
  237. // Row 3
  238. #define FR_MACB S(ALGR(FR_H)) // ˍ (dead)
  239. #define FR_SQRT S(ALGR(FR_SLSH)) // √
  240. #define FR_QRTR S(ALGR(FR_ASTR)) // ¼
  241. // Row 4
  242. #define FR_GEQL S(ALGR(FR_LABK)) // ≥
  243. #define FR_OGON S(ALGR(FR_V)) // ˛ (dead)
  244. #define FR_DCMM S(ALGR(FR_COMM)) // ̦ (dead)
  245. #define FR_NEQL S(ALGR(FR_SCLN)) // ≠