keymap_br_abnt2.h 3.7 KB

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