keymap_bepo.h 14 KB

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