keybrd library is an open source library for creating custom-keyboard firmware.
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
Este repositório está arquivado. Você pode visualizar os arquivos e realizar clone, mas não poderá realizar push nem abrir issues e pull requests.

tutorial_7ab_mapping_layout_to_matix.md 3.0KB

keybrd Tutorial 7ab - mapping layout to matrix

After reading this tutorial you will be able to map a keyboard layout to a keyboard matrix.

Keyboard mapping nomenclature

Keyboard layout - is the placement of keys. Key caps are often labeled to show a keyboard’s layout.

Matrix - is a collection of switches electrically connected into rows and columns.

Transpose - is the mapping of layout rows to matrix columns. Used when diodes are oriented with anodes towards the matrix rows.

When to use mapping

In most of the other keybrd tutorial examples:

  • layout and matrix are congruent
  • active-low keyboard diodes are oriented with cathodes towards the matrix rows (or active-high keyboard diodes are oriented with anodes towards the matrix rows)

There is no standard way keyboards are manufactured. Some variations are:

  • irregular matrix
  • active-low keyboard diodes are oriented with anodes towards the matrix rows
  • active-high keyboard diodes are oriented with cathodes towards the matrix rows
  • I/O expander pins connect to matrix out of order

Any of these variations can use a mapping to align a layout with the matrix.

Mapping a layout to a matrix

Modify the basic breadboard keyboard by flipping diodes, so that anodes are towards matrix rows (blue bus). The keybrd_7a_mapping_single-layer.ino sketch will run on the keyboard. Annotations in the sketch explain how mapping from LAYOUT to MATRIX works.

The keybrd_7b_mapping_multi-layer.ino sketch will run on the same keyboard.

Exercise

1) Make a keyboard with an irregular matrix.

  • Modify the basic breadboard keyboard by crossing the columns.
  • Modify the keybrd_2_single-layer.ino sketch by mapping the layout to the irregular matrix.

crossed columns


Creative Commons License
keybrd tutorial by Wolfram Volpi is licensed under a Creative Commons Attribution 4.0 International License.
Permissions beyond the scope of this license may be available at https://github.com/wolfv6/keybrd/issues/new.