port all boards to new intify_coordinate signature.

This commit is contained in:
xs5871
2022-02-04 21:21:46 +00:00
committed by Kyle Brown
parent 6840330f50
commit dc4fc646aa
12 changed files with 109 additions and 51 deletions

View File

@@ -55,7 +55,18 @@ from kmk.matrix import intify_coordinate as ic
coord_mapping.extend(ic(6, x, 6) for x in range(6))
# And now, to handle R3, which at this point is down to just six keys
coord_mapping.extend(ic(3, x, 6) for x in range(3, 6))
coord_mapping.extend(ic(7, x, 6) for x in range(6, 9))
coord_mapping.extend(ic(7, x, 6) for x in range(0, 3))
```
`intify_coordinate` é a maneira tradicional de gerar posições-chave.
Aqui está uma versão equivalente, talvez visualmente mais explicativa:
```python
coord_mapping = [
0, 1, 2, 3, 4, 5, 24, 25, 26, 27, 28, 29,
6, 7, 8, 9, 10, 11, 30, 31, 32, 33, 34, 35,
12, 13, 14, 15, 16, 17, 36, 37, 38, 39, 40, 41,
21, 22, 23, 42, 43, 44,
]
```
## Keymaps