keybrd library is an open source library for creating custom-keyboard firmware.
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
Dieses Repo ist archiviert. Du kannst Dateien sehen und es klonen, kannst aber nicht pushen oder Issues/Pull-Requests öffnen.

tutorial_7ab_mapping_layout_to_matix.md 3.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. keybrd Tutorial 7ab - mapping layout to matrix
  2. ============================================
  3. After reading this tutorial you will be able to map a keyboard layout to a keyboard matrix.
  4. Keyboard mapping nomenclature
  5. -----------------------------
  6. **[Keyboard layout](http://en.wikipedia.org/wiki/Keyboard_layout)** - is the placement of keys. Key caps are often labeled to show a keyboard's layout.
  7. **[Matrix](http://pcbheaven.com/wikipages/How_Key_Matrices_Works/)** - is a collection of switches electrically connected into rows and columns.
  8. **[Transpose](https://en.wikipedia.org/wiki/Transpose)** - is the mapping of layout rows to matrix columns. Used when diodes are oriented with anodes towards the matrix rows.
  9. When to use mapping
  10. -------------------
  11. In most of the other keybrd tutorial examples:
  12. * layout and matrix are congruent
  13. * active-low keyboard diodes are oriented with cathodes towards the matrix rows
  14. (or active-high keyboard diodes are oriented with anodes towards the matrix rows)
  15. There is no standard way keyboards are manufactured. Some variations are:
  16. * irregular matrix
  17. * active-low keyboard diodes are oriented with anodes towards the matrix rows
  18. * active-high keyboard diodes are oriented with cathodes towards the matrix rows
  19. * I/O expander pins connect to matrix out of order
  20. Any of these variations can use a mapping to align a layout with the matrix.
  21. Mapping a layout to a matrix
  22. ----------------------------
  23. Modify the basic breadboard keyboard by flipping diodes, so that anodes are towards matrix rows (blue bus).
  24. The [keybrd_7a_mapping_single-layer.ino](keybrd_7a_mapping_single-layer/keybrd_7a_mapping_single-layer.ino) sketch will run on the keyboard.
  25. Annotations in the sketch explain how mapping from LAYOUT to MATRIX works.
  26. The [keybrd_7b_mapping_multi-layer.ino](keybrd_7b_mapping_multi-layer/keybrd_7b_mapping_multi-layer.ino) sketch will run on the same keyboard.
  27. Exercise
  28. --------
  29. 1) Make a keyboard with an irregular matrix.
  30. * Modify the basic breadboard keyboard by crossing the columns.
  31. * Modify the keybrd_2_single-layer.ino sketch by mapping the layout to the irregular matrix.
  32. ![crossed columns](keybrd_7_mapping_layout_to_matix/crossed_columns.jpg "crossed columns")
  33. <br>
  34. <a rel="license" href="https://creativecommons.org/licenses/by/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://licensebuttons.net/l/by/4.0/88x31.png" /></a><br /><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">keybrd tutorial</span> by <a xmlns:cc="https://creativecommons.org/ns" href="https://github.com/wolfv6/keybrd" property="cc:attributionName" rel="cc:attributionURL">Wolfram Volpi</a> is licensed under a <a rel="license" href="https://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>.<br />Permissions beyond the scope of this license may be available at <a xmlns:cc="https://creativecommons.org/ns" href="https://github.com/wolfv6/keybrd/issues/new" rel="cc:morePermissions">https://github.com/wolfv6/keybrd/issues/new</a>.