keymap_br_abnt2.h 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /* Copyright 2017 Potiguar Faga
  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. #pragma once
  17. #include "keymap_common.h"
  18. /* Scan codes for the Brazilian ABNT2 keyboard layout */
  19. #define BR_CCDL KC_SCLN // Ç same scancode as ;: on US layout
  20. #define BR_SCLN KC_SLSH // ;: same scancode as /? on US layout
  21. #define BR_QUOT KC_GRV // '" same scancode as `~ on US layout
  22. #define BR_TILD KC_QUOT // ~^ dead keys, same scancode as '" on US layout
  23. #define BR_ACUT KC_LBRC // ´` dead keys, same scancode as [{ on US layout
  24. #define BR_LBRC KC_RBRC // [{ same scancode as ]} on US layout
  25. #define BR_RBRC KC_BSLS // ]} same scancode as \| on US layout
  26. #define BR_BSLS KC_NUBS // \| uses the non-US hash scancode (#~, sometimes §±)
  27. #define BR_SLSH KC_INT1 // /? uses the INTL1 scancode
  28. #define BR_COLN LSFT(BR_SCLN) // shifted :
  29. #define BR_DQT LSFT(BR_QUOT) // shifted "
  30. #define BR_CIRC LSFT(BR_TILD) // shifted ^ (dead key)
  31. #define BR_GRAV LSFT(BR_ACUT) // shifted ` (dead key)
  32. #define BR_LCBR LSFT(BR_LBRC) // shifted {
  33. #define BR_RCBR LSFT(BR_RBRC) // shifted }
  34. #define BR_PIPE LSFT(BR_BSLS) // shifted |
  35. #define BR_QUES LSFT(BR_SLSH) // shifted ?
  36. #define BR_TRMA LSFT(KC_6) // shifted ¨ (dead key - trema accent)
  37. // On the ABNT2 the keypad comma and the keypad dot scancodes are switched
  38. // (presumably because in Brazil comma is used as the decimal separator)
  39. #define BR_KPDT KC_KP_COMMA // keypad .
  40. #define BR_KPCM KC_KP_DOT // keypad ,
  41. #define BR_1UP LALT(KC_1) // 1 superscript ¹ alt+1
  42. #define BR_2UP LALT(KC_2) // 2 superscript ² alt+2
  43. #define BR_3UP LALT(KC_3) // 3 superscript ³ alt+3
  44. #define BR_PND LALT(KC_4) // Pound sign £ alt+4
  45. #define BR_CENT LALT(KC_5) // Cent sign ¢ alt+5
  46. #define BR_NOT LALT(KC_6) // Not sign ¬ alt+6
  47. #define BR_SECT LALT(KC_EQL) // Section sign § alt+=
  48. #define BR_FORD LALT(BR_LBRC) // Feminine Ordinal Sign ª alt+[
  49. #define BR_MORD LALT(BR_RBRC) // Masculine Ordinal Sign º alt+]
  50. #define BR_DGRE LALT(BR_SLSH) // Degree sign ° alt+/
  51. #define BR_EURO LALT(KC_E) // Euro sign € alt+e
  52. #define BR_NDTD LALT(BR_TILD) // Non-dead key tilde ~ alt+~
  53. #define BR_NDAC LALT(BR_ACUT) // Non-dead key acute accent ´ alt+´
  54. #define BR_NDGV LALT(BR_QUOT) // Non-dead key grave accent ` alt+'
  55. #define BR_NDCR LALT(BR_CIRC) // Non-dead key circumflex accent ^ alt+^ (alt+shift+~)
  56. #define BR_NDTR LALT(BR_TRMA) // Non-dead key trema accent ¨ alt+¨ (alt+shift+6)
  57. // For 101-key keyboard layouts, the ABNT2 layout allows
  58. // the slash and question mark to be typed using alt+q and alt+w.
  59. // The shortcuts are provided here for completeness' sake,
  60. // but it's recommended to use BR_SLSH and BR_QUES instead
  61. #define BR_ASLS LALT(KC_Q)
  62. #define BR_AQST LALT(KC_W)