sixkeyboard.h 992 B

12345678910111213141516171819202122232425262728293031323334
  1. #ifndef SIXKEYBOARD_H
  2. #define SIXKEYBOARD_H
  3. #include "quantum.h"
  4. // This macro is an example of using a non-standard row-column matrix. The
  5. // keyboard in question had 11 rows and 8 columns, but the rows were not all
  6. // horizontal, and the columns were not all vertical. For example, row 2
  7. // contained "Print Screen", "N", "M", ",", ".", "/", "Right Shift", and
  8. // "Left Alt". Column 0 contained "F6", "7", "O", "'", "Q", "D", "B",
  9. // "Left Alt", "Up Arrow", and "Down Arrow".
  10. //
  11. // The macro makes programming the keys easier and in a more straight-forward
  12. // manner because it realigns the keys into a 6x15 sensible keyboard layout
  13. // instead of the obtuse 11x8 matrix.
  14. /*
  15. * ┌───┬───┬───┐
  16. * │ A │ B │ C │
  17. * ├───┼───┼───┤
  18. * │ D │ E │ F │
  19. * └───┴───┴───┘
  20. */
  21. #define LAYOUT( \
  22. k00, k01, k02, \
  23. k10, k11, k12 \
  24. ) { \
  25. { k00, k01, k02 }, \
  26. { k10, k11, k12 } \
  27. }
  28. #endif