keymap_bepo.h 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323
  1. /* Copyright 2016 Didier Loiseau
  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. /* Keymap macros for the French BÉPO layout - http://bepo.fr */
  17. #ifndef KEYMAP_BEPO_H
  18. #define KEYMAP_BEPO_H
  19. #include "keymap.h"
  20. // Alt gr
  21. #ifndef ALTGR
  22. #define ALTGR(kc) ALGR(kc)
  23. #endif
  24. #define BP_ALGR KC_RALT
  25. // Normal characters
  26. // First row (on usual keyboards)
  27. #define BP_DOLLAR KC_GRAVE // $
  28. #define BP_DLR BP_DOLLAR
  29. #define BP_DOUBLE_QUOTE KC_1 // "
  30. #define BP_DQOT BP_DOUBLE_QUOTE
  31. #define BP_LEFT_GUILLEMET KC_2 // «
  32. #define BP_LGIL BP_LEFT_GUILLEMET
  33. #define BP_RIGHT_GUILLEMET KC_3 // »
  34. #define BP_RGIL BP_RIGHT_GUILLEMET
  35. #define BP_LEFT_PAREN KC_4 // (
  36. #define BP_LPRN BP_LEFT_PAREN
  37. #define BP_RIGHT_PAREN KC_5 // )
  38. #define BP_RPRN BP_RIGHT_PAREN
  39. #define BP_AT KC_6 // @
  40. #define BP_PLUS KC_7 // +
  41. #define BP_MINUS KC_8 // -
  42. #define BP_MINS BP_MINUS
  43. #define BP_SLASH KC_9 // /
  44. #define BP_SLSH BP_SLASH
  45. #define BP_ASTERISK KC_0 // *
  46. #define BP_ASTR BP_ASTERISK
  47. #define BP_EQUAL KC_MINUS // =
  48. #define BP_EQL BP_EQUAL
  49. #define BP_PERCENT KC_EQUAL // %
  50. #define BP_PERC BP_PERCENT
  51. // Second row
  52. #define BP_B KC_Q
  53. #define BP_E_ACUTE KC_W // é
  54. #define BP_ECUT BP_E_ACUTE
  55. #define BP_P KC_E
  56. #define BP_O KC_R
  57. #define BP_E_GRAVE KC_T // è
  58. #define BP_EGRV BP_E_GRAVE
  59. #define BP_DEAD_CIRCUMFLEX KC_Y // dead ^
  60. #define BP_DCRC BP_DEAD_CIRCUMFLEX
  61. #define BP_V KC_U
  62. #define BP_D KC_I
  63. #define BP_L KC_O
  64. #define BP_J KC_P
  65. #define BP_Z KC_LBRACKET
  66. #define BP_W KC_RBRACKET
  67. // Third row
  68. #define BP_A KC_A
  69. #define BP_U KC_S
  70. #define BP_I KC_D
  71. #define BP_E KC_F
  72. #define BP_COMMA KC_G // ,
  73. #define BP_COMM BP_COMMA
  74. #define BP_C KC_H
  75. #define BP_T KC_J
  76. #define BP_S KC_K
  77. #define BP_R KC_L
  78. #define BP_N KC_SCOLON
  79. #define BP_M KC_QUOTE
  80. #define BP_C_CEDILLA KC_BSLASH // ç
  81. #define BP_CCED BP_C_CEDILLA
  82. // Fourth row
  83. #define BP_E_CIRCUMFLEX KC_NONUS_BSLASH // ê
  84. #define BP_ECRC BP_E_CIRCUMFLEX
  85. #define BP_A_GRAVE KC_Z // à
  86. #define BP_AGRV BP_A_GRAVE
  87. #define BP_Y KC_X
  88. #define BP_X KC_C
  89. #define BP_DOT KC_V // .
  90. #define BP_K KC_B
  91. #define BP_APOSTROPHE KC_N
  92. #define BP_APOS BP_APOSTROPHE // '
  93. #define BP_Q KC_M
  94. #define BP_G KC_COMMA
  95. #define BP_H KC_DOT
  96. #define BP_F KC_SLASH
  97. // Shifted characters
  98. // First row
  99. #define BP_HASH LSFT(BP_DOLLAR) // #
  100. #define BP_1 LSFT(KC_1)
  101. #define BP_2 LSFT(KC_2)
  102. #define BP_3 LSFT(KC_3)
  103. #define BP_4 LSFT(KC_4)
  104. #define BP_5 LSFT(KC_5)
  105. #define BP_6 LSFT(KC_6)
  106. #define BP_7 LSFT(KC_7)
  107. #define BP_8 LSFT(KC_8)
  108. #define BP_9 LSFT(KC_9)
  109. #define BP_0 LSFT(KC_0)
  110. #define BP_DEGREE LSFT(BP_EQUAL) // °
  111. #define BP_DEGR BP_DEGREE
  112. #define BP_GRAVE LSFT(BP_PERCENT) // `
  113. #define BP_GRV BP_GRAVE
  114. // Second row
  115. #define BP_EXCLAIM LSFT(BP_DEAD_CIRCUMFLEX) // !
  116. #define BP_EXLM BP_EXCLAIM
  117. // Third row
  118. #define BP_SCOLON LSFT(BP_COMMA) // ;
  119. #define BP_SCLN BP_SCOLON
  120. // Fourth row
  121. #define BP_COLON LSFT(BP_DOT) // :
  122. #define BP_COLN BP_COLON
  123. #define BP_QUESTION LSFT(BP_APOS) // ?
  124. #define BP_QEST BP_QUESTION
  125. // Space bar
  126. #define BP_NON_BREAKING_SPACE LSFT(KC_SPACE)
  127. #define BP_NBSP BP_NON_BREAKING_SPACE
  128. // AltGr-ed characters
  129. // First row
  130. #define BP_EN_DASH ALTGR(BP_DOLLAR) // –
  131. #define BP_NDSH BP_EN_DASH
  132. #define BP_EM_DASH ALTGR(KC_1) // —
  133. #define BP_MDSH BP_EM_DASH
  134. #define BP_LESS ALTGR(KC_2) // <
  135. #define BP_GREATER ALTGR(KC_3) // >
  136. #define BP_GRTR BP_GREATER
  137. #define BP_LBRACKET ALTGR(KC_4) // [
  138. #define BP_LBRC BP_LBRACKET
  139. #define BP_RBRACKET ALTGR(KC_5) // ]
  140. #define BP_RBRC BP_RBRACKET
  141. #define BP_CIRCUMFLEX ALTGR(KC_6) // ^
  142. #define BP_CIRC BP_CIRCUMFLEX
  143. #define BP_PLUS_MINUS ALTGR(KC_7) // ±
  144. #define BP_PSMS BP_PLUS_MINUS
  145. #define BP_MATH_MINUS ALTGR(KC_8) // −
  146. #define BP_MMNS BP_MATH_MINUS
  147. #define BP_OBELUS ALTGR(KC_9) // ÷
  148. #define BP_OBEL BP_OBELUS
  149. // more conventional name of the symbol
  150. #define BP_DIVISION_SIGN BP_OBELUS
  151. #define BP_DVSN BP_DIVISION_SIGN
  152. #define BP_TIMES ALTGR(KC_0) // ×
  153. #define BP_TIMS BP_TIMES
  154. #define BP_DIFFERENT ALTGR(BP_EQUAL) // ≠
  155. #define BP_DIFF BP_DIFFERENT
  156. #define BP_PERMILLE ALTGR(BP_PERCENT) // ‰
  157. #define BP_PMIL BP_PERMILLE
  158. // Second row
  159. #define BP_PIPE ALTGR(BP_B) // |
  160. #define BP_DEAD_ACUTE ALTGR(BP_E_ACUTE) // dead ´
  161. #define BP_DACT BP_DEAD_ACUTE
  162. #define BP_AMPERSAND ALTGR(BP_P) // &
  163. #define BP_AMPR BP_AMPERSAND
  164. #define BP_OE_LIGATURE ALTGR(BP_O) // œ
  165. #define BP_OE BP_OE_LIGATURE
  166. #define BP_DEAD_GRAVE ALTGR(BP_E_GRAVE) // `
  167. #define BP_DGRV BP_DEAD_GRAVE
  168. #define BP_INVERTED_EXCLAIM ALTGR(BP_DEAD_CIRCUMFLEX) // ¡
  169. #define BP_IXLM BP_INVERTED_EXCLAIM
  170. #define BP_DEAD_CARON ALTGR(BP_V) // dead ˇ
  171. #define BP_DCAR BP_DEAD_CARON
  172. #define BP_ETH ALTGR(BP_D) // ð
  173. #define BP_DEAD_SLASH ALTGR(BP_L) // dead /
  174. #define BP_DSLH BP_DEAD_SLASH
  175. #define BP_IJ_LIGATURE ALTGR(BP_J) // ij
  176. #define BP_IJ BP_IJ_LIGATURE
  177. #define BP_SCHWA ALTGR(BP_Z) // ə
  178. #define BP_SCWA BP_SCHWA
  179. #define BP_DEAD_BREVE ALTGR(BP_W) // dead ˘
  180. #define BP_DBRV BP_DEAD_BREVE
  181. // Third row
  182. #define BP_AE_LIGATURE ALTGR(BP_A) // æ
  183. #define BP_AE BP_AE_LIGATURE
  184. #define BP_U_GRAVE ALTGR(BP_U) // ù
  185. #define BP_UGRV BP_U_GRAVE
  186. #define BP_DEAD_TREMA ALTGR(BP_I) // dead ¨ (trema/umlaut/diaresis)
  187. #define BP_DTRM BP_DEAD_TREMA
  188. #define BP_EURO ALTGR(BP_E) // €
  189. #define BP_TYPOGRAPHICAL_APOSTROPHE ALTGR(BP_COMMA) // ’
  190. #define BP_TAPO BP_TYPOGRAPHICAL_APOSTROPHE
  191. #define BP_COPYRIGHT ALTGR(BP_C) // ©
  192. #define BP_CPRT BP_COPYRIGHT
  193. #define BP_THORN ALTGR(BP_T) // þ
  194. #define BP_THRN BP_THORN
  195. #define BP_SHARP_S ALTGR(BP_S) // ß
  196. #define BP_SRPS BP_SHARP_S
  197. #define BP_REGISTERED_TRADEMARK ALTGR(BP_R) // ®
  198. #define BP_RTM BP_REGISTERED_TRADEMARK
  199. #define BP_DEAD_TILDE ALTGR(BP_N) // dead ~
  200. #define BP_DTLD BP_DEAD_TILDE
  201. #define BP_DEAD_MACRON ALTGR(BP_M) // dead ¯
  202. #define BP_DMCR BP_DEAD_MACRON
  203. #define BP_DEAD_CEDILLA ALTGR(BP_C_CEDILLA) // dead ¸
  204. #define BP_DCED BP_DEAD_CEDILLA
  205. // Fourth row
  206. #define BP_NONUS_SLASH ALTGR(BP_E_CIRCUMFLEX) // / on non-us backslash key (102nd key, ê in bépo)
  207. #define BP_NUSL BP_NONUS_SLASH
  208. #define BP_BACKSLASH ALTGR(BP_A_GRAVE) /* \ */
  209. #define BP_BSLS BP_BACKSLASH
  210. #define BP_LEFT_CURLY_BRACE ALTGR(BP_Y) // {
  211. #define BP_LCBR BP_LEFT_CURLY_BRACE
  212. #define BP_RIGHT_CURLY_BRACE ALTGR(BP_X) // }
  213. #define BP_RCBR BP_RIGHT_CURLY_BRACE
  214. #define BP_ELLIPSIS ALTGR(BP_DOT) // …
  215. #define BP_ELPS BP_ELLIPSIS
  216. #define BP_TILDE ALTGR(BP_K) // ~
  217. #define BP_TILD BP_TILDE
  218. #define BP_INVERTED_QUESTION ALTGR(BP_QUESTION) // ¿
  219. #define BP_IQST BP_INVERTED_QUESTION
  220. #define BP_DEAD_RING ALTGR(BP_Q) // dead °
  221. #define BP_DRNG BP_DEAD_RING
  222. #define BP_DEAD_GREEK ALTGR(BP_G) // dead Greek key (following key will make a Greek letter)
  223. #define BP_DGRK BP_DEAD_GREEK
  224. #define BP_DAGGER ALTGR(BP_H) // †
  225. #define BP_DAGR BP_DAGGER
  226. #define BP_DEAD_OGONEK ALTGR(BP_F) // dead ˛
  227. #define BP_DOGO BP_DEAD_OGONEK
  228. // Space bar
  229. #define BP_UNDERSCORE ALTGR(KC_SPACE) // _
  230. #define BP_UNDS BP_UNDERSCORE
  231. // AltGr-Shifted characters (different from capitalised AltGr-ed characters)
  232. // First row
  233. #define BP_PARAGRAPH ALTGR(BP_HASH) // ¶
  234. #define BP_PARG BP_PARAGRAPH
  235. #define BP_LOW_DOUBLE_QUOTE ALTGR(BP_1) // „
  236. #define BP_LWQT BP_LOW_DOUBLE_QUOTE
  237. #define BP_LEFT_DOUBLE_QUOTE ALTGR(BP_2) // “
  238. #define BP_LDQT BP_LEFT_DOUBLE_QUOTE
  239. #define BP_RIGHT_DOUBLE_QUOTE ALTGR(BP_3) // ”
  240. #define BP_RDQT BP_RIGHT_DOUBLE_QUOTE
  241. #define BP_LESS_OR_EQUAL ALTGR(BP_4) // ≤
  242. #define BP_LEQL BP_LESS_OR_EQUAL
  243. #define BP_GREATER_OR_EQUAL ALTGR(BP_5) // ≥
  244. #define BP_GEQL BP_GREATER_OR_EQUAL
  245. // nothing on ALTGR(BP_6)
  246. #define BP_NEGATION ALTGR(BP_7) // ¬
  247. #define BP_NEGT BP_NEGATION
  248. #define BP_ONE_QUARTER ALTGR(BP_8) // ¼
  249. #define BP_1QRT BP_ONE_QUARTER
  250. #define BP_ONE_HALF ALTGR(BP_9) // ½
  251. #define BP_1HLF BP_ONE_HALF
  252. #define BP_THREE_QUARTERS ALTGR(BP_0) // ¾
  253. #define BP_3QRT BP_THREE_QUARTERS
  254. #define BP_MINUTES ALTGR(BP_DEGREE) // ′
  255. #define BP_MNUT BP_MINUTES
  256. #define BP_SECONDS ALTGR(BP_GRAVE) // ″
  257. #define BP_SCND BP_SECONDS
  258. // Second row
  259. #define BP_BROKEN_PIPE LSFT(BP_PIPE) // ¦
  260. #define BP_BPIP BP_BROKEN_PIPE
  261. #define BP_DEAD_DOUBLE_ACUTE LSFT(BP_DEAD_ACUTE) // ˝
  262. #define BP_DDCT BP_DEAD_DOUBLE_ACUTE
  263. #define BP_SECTION ALTGR(LSFT(BP_P)) // §
  264. #define BP_SECT BP_SECTION
  265. // LSFT(BP_DEAD_GRAVE) is actually the same character as LSFT(BP_PERCENT)
  266. #define BP_GRAVE_BIS LSFT(BP_DEAD_GRAVE) // `
  267. #define BP_GRVB BP_GRAVE_BIS
  268. // Third row
  269. #define BP_DEAD_DOT_ABOVE LSFT(BP_DEAD_TREMA) // dead ˙
  270. #define BP_DDTA BP_DEAD_DOT_ABOVE
  271. #define BP_DEAD_CURRENCY LSFT(BP_EURO) // dead ¤ (next key will generate a currency code like ¥ or £)
  272. #define BP_DCUR BP_DEAD_CURRENCY
  273. #define BP_DEAD_HORN LSFT(ALTGR(BP_COMMA)) // dead ̛
  274. #define BP_DHRN BP_DEAD_HORN
  275. #define BP_LONG_S LSFT(ALTGR(BP_C)) // ſ
  276. #define BP_LNGS BP_LONG_S
  277. #define BP_TRADEMARK LSFT(BP_REGISTERED_TRADEMARK) // ™
  278. #define BP_TM BP_TRADEMARK
  279. #define BP_ORDINAL_INDICATOR_O LSFT(ALTGR(BP_M)) // º
  280. #define BP_ORDO BP_ORDINAL_INDICATOR_O
  281. #define BP_DEAD_COMMA LSFT(BP_DEAD_CEDILLA) // dead ˛
  282. #define BP_DCOM BP_DEAD_COMMA
  283. // Fourth row
  284. #define BP_LEFT_QUOTE LSFT(ALTGR(BP_Y)) // ‘
  285. #define BP_LQOT BP_LEFT_QUOTE
  286. #define BP_RIGHT_QUOTE LSFT(ALTGR(BP_X)) // ’
  287. #define BP_RQOT BP_RIGHT_QUOTE
  288. #define BP_INTERPUNCT LSFT(ALTGR(BP_DOT)) // ·
  289. #define BP_IPCT BP_INTERPUNCT
  290. #define BP_DEAD_HOOK_ABOVE LSFT(ALTGR(BP_QUESTION)) // dead ̉
  291. #define BP_DHKA BP_DEAD_HOOK_ABOVE
  292. #define BP_DEAD_UNDERDOT LSFT(BP_DEAD_RING) // dead ̣
  293. #define BP_DUDT BP_DEAD_UNDERDOT
  294. #define BP_DOUBLE_DAGGER LSFT(BP_DAGGER) // ‡
  295. #define BP_DDGR BP_DOUBLE_DAGGER
  296. #define BP_ORDINAL_INDICATOR_A LSFT(ALTGR(BP_F)) // ª
  297. #define BP_ORDA BP_ORDINAL_INDICATOR_A
  298. // Space bar
  299. #define BP_NARROW_NON_BREAKING_SPACE ALTGR(BP_NON_BREAKING_SPACE)
  300. #define BP_NNBS BP_NARROW_NON_BREAKING_SPACE
  301. #endif