update docs and examples
This commit is contained in:
parent
7431192e95
commit
74fa1fb52e
@ -1,9 +1,7 @@
|
||||
import board
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.matrix import DiodeOrientation
|
||||
|
||||
# from kmk.matrix import intify_coordinate as ic
|
||||
from kmk.scanners import DiodeOrientation
|
||||
|
||||
|
||||
class KMKKeyboard(_KMKKeyboard):
|
||||
|
@ -1,7 +1,7 @@
|
||||
import board
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.matrix import DiodeOrientation
|
||||
from kmk.scanners import DiodeOrientation
|
||||
|
||||
|
||||
class KMKKeyboard(_KMKKeyboard):
|
||||
|
@ -1,7 +1,7 @@
|
||||
import board
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.matrix import DiodeOrientation
|
||||
from kmk.scanners import DiodeOrientation
|
||||
|
||||
|
||||
class KMKKeyboard(_KMKKeyboard):
|
||||
|
@ -1,7 +1,7 @@
|
||||
import board
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.matrix import DiodeOrientation
|
||||
from kmk.scanners import DiodeOrientation
|
||||
|
||||
|
||||
class KMKKeyboard(_KMKKeyboard):
|
||||
|
@ -1,7 +1,7 @@
|
||||
import board
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.matrix import DiodeOrientation
|
||||
from kmk.scanners import DiodeOrientation
|
||||
|
||||
|
||||
class KMKKeyboard(_KMKKeyboard):
|
||||
|
@ -1,7 +1,7 @@
|
||||
import board
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.matrix import DiodeOrientation
|
||||
from kmk.scanners import DiodeOrientation
|
||||
|
||||
|
||||
class KMKKeyboard(_KMKKeyboard):
|
||||
|
@ -1,7 +1,7 @@
|
||||
import board
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.matrix import DiodeOrientation
|
||||
from kmk.scanners import DiodeOrientation
|
||||
|
||||
|
||||
class KMKKeyboard(_KMKKeyboard):
|
||||
|
@ -1,8 +1,7 @@
|
||||
import board
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.matrix import DiodeOrientation
|
||||
from kmk.matrix import intify_coordinate as ic
|
||||
from kmk.scanners import DiodeOrientation
|
||||
|
||||
|
||||
class KMKKeyboard(_KMKKeyboard):
|
||||
|
@ -1,7 +1,7 @@
|
||||
import board
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.matrix import DiodeOrientation
|
||||
from kmk.scanners import DiodeOrientation
|
||||
|
||||
|
||||
class KMKKeyboard(_KMKKeyboard):
|
||||
|
@ -1,7 +1,7 @@
|
||||
import board
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.matrix import DiodeOrientation
|
||||
from kmk.scanners import DiodeOrientation
|
||||
|
||||
|
||||
class KMKKeyboard(_KMKKeyboard):
|
||||
|
@ -1,7 +1,7 @@
|
||||
import board
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.matrix import DiodeOrientation
|
||||
from kmk.scanners import DiodeOrientation
|
||||
|
||||
|
||||
class KMKKeyboard(_KMKKeyboard):
|
||||
|
@ -1,7 +1,7 @@
|
||||
import board
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.matrix import DiodeOrientation
|
||||
from kmk.scanners import DiodeOrientation
|
||||
|
||||
|
||||
class KMKKeyboard(_KMKKeyboard):
|
||||
|
@ -1,7 +1,7 @@
|
||||
import board
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.matrix import DiodeOrientation
|
||||
from kmk.scanners import DiodeOrientation
|
||||
|
||||
|
||||
class KMKKeyboard(_KMKKeyboard):
|
||||
|
@ -1,7 +1,7 @@
|
||||
import board
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.matrix import DiodeOrientation
|
||||
from kmk.scanners import DiodeOrientation
|
||||
|
||||
|
||||
class KMKKeyboard(_KMKKeyboard):
|
||||
|
@ -1,7 +1,7 @@
|
||||
import board
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.matrix import DiodeOrientation
|
||||
from kmk.scanners import DiodeOrientation
|
||||
|
||||
|
||||
class KMKKeyboard(_KMKKeyboard):
|
||||
|
@ -1,7 +1,7 @@
|
||||
import board
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.matrix import DiodeOrientation
|
||||
from kmk.scanners import DiodeOrientation
|
||||
|
||||
|
||||
class KMKKeyboard(_KMKKeyboard):
|
||||
|
@ -1,7 +1,7 @@
|
||||
import board
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.matrix import DiodeOrientation
|
||||
from kmk.scanners import DiodeOrientation
|
||||
|
||||
|
||||
class KMKKeyboard(_KMKKeyboard):
|
||||
|
@ -1,7 +1,7 @@
|
||||
import board
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.matrix import DiodeOrientation
|
||||
from kmk.scanners import DiodeOrientation
|
||||
|
||||
|
||||
class KMKKeyboard(_KMKKeyboard):
|
||||
|
@ -1,7 +1,7 @@
|
||||
import board
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.matrix import DiodeOrientation
|
||||
from kmk.scanners import DiodeOrientation
|
||||
|
||||
|
||||
class KMKKeyboard(_KMKKeyboard):
|
||||
|
@ -1,7 +1,7 @@
|
||||
import board
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.matrix import DiodeOrientation
|
||||
from kmk.scanners import DiodeOrientation
|
||||
|
||||
|
||||
class KMKKeyboard(_KMKKeyboard):
|
||||
|
@ -1,7 +1,7 @@
|
||||
import board
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.matrix import DiodeOrientation
|
||||
from kmk.scanners import DiodeOrientation
|
||||
|
||||
|
||||
class KMKKeyboard(_KMKKeyboard):
|
||||
|
@ -1,7 +1,7 @@
|
||||
import board
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.matrix import DiodeOrientation
|
||||
from kmk.scanners import DiodeOrientation
|
||||
|
||||
|
||||
class KMKKeyboard(_KMKKeyboard):
|
||||
|
@ -1,7 +1,7 @@
|
||||
import board
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.matrix import DiodeOrientation
|
||||
from kmk.scanners import DiodeOrientation
|
||||
|
||||
|
||||
class KMKKeyboard(_KMKKeyboard):
|
||||
|
@ -1,9 +1,9 @@
|
||||
import board
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.matrix import DiodeOrientation
|
||||
from kmk.matrix import intify_coordinate as ic
|
||||
from kmk.modules.layers import Layers
|
||||
from kmk.scanners import DiodeOrientation
|
||||
from kmk.scanners import intify_coordinate as ic
|
||||
|
||||
# Implements what used to be handled by KMKKeyboard.swap_indicies for this
|
||||
# board, by flipping various row3 (bottom physical row) keys so their
|
||||
|
@ -1,8 +1,8 @@
|
||||
import board
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.matrix import DiodeOrientation
|
||||
from kmk.matrix import intify_coordinate as ic
|
||||
from kmk.scanners import DiodeOrientation
|
||||
from kmk.scanners import intify_coordinate as ic
|
||||
|
||||
|
||||
class KMKKeyboard(_KMKKeyboard):
|
||||
|
@ -1,8 +1,8 @@
|
||||
import board
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.matrix import DiodeOrientation
|
||||
from kmk.matrix import intify_coordinate as ic
|
||||
from kmk.scanners import DiodeOrientation
|
||||
from kmk.scanners import intify_coordinate as ic
|
||||
|
||||
|
||||
class KMKKeyboard(_KMKKeyboard):
|
||||
|
@ -1,7 +1,7 @@
|
||||
import board
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.matrix import DiodeOrientation
|
||||
from kmk.scanners import DiodeOrientation
|
||||
|
||||
|
||||
class KMKKeyboard(_KMKKeyboard):
|
||||
|
@ -1,7 +1,7 @@
|
||||
import board
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.matrix import DiodeOrientation
|
||||
from kmk.scanners import DiodeOrientation
|
||||
|
||||
|
||||
class KMKKeyboard(_KMKKeyboard):
|
||||
|
@ -1,7 +1,7 @@
|
||||
import board
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.matrix import DiodeOrientation
|
||||
from kmk.scanners import DiodeOrientation
|
||||
|
||||
|
||||
class KMKKeyboard(_KMKKeyboard):
|
||||
|
@ -2,7 +2,7 @@ import board
|
||||
import digitalio
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.matrix import DiodeOrientation
|
||||
from kmk.scanners import DiodeOrientation
|
||||
|
||||
|
||||
class KMKKeyboard(_KMKKeyboard):
|
||||
|
@ -1,7 +1,7 @@
|
||||
import board
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.matrix import DiodeOrientation
|
||||
from kmk.scanners import DiodeOrientation
|
||||
|
||||
|
||||
class KMKKeyboard(_KMKKeyboard):
|
||||
|
@ -1,8 +1,8 @@
|
||||
import board
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.matrix import DiodeOrientation
|
||||
from kmk.matrix import intify_coordinate as ic
|
||||
from kmk.scanners import DiodeOrientation
|
||||
from kmk.scanners import intify_coordinate as ic
|
||||
|
||||
|
||||
class KMKKeyboard(_KMKKeyboard):
|
||||
|
@ -1,7 +1,7 @@
|
||||
import board
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.matrix import DiodeOrientation
|
||||
from kmk.scanners import DiodeOrientation
|
||||
|
||||
|
||||
class KMKKeyboard(_KMKKeyboard):
|
||||
|
@ -1,7 +1,7 @@
|
||||
import board
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.matrix import DiodeOrientation
|
||||
from kmk.scanners import DiodeOrientation
|
||||
|
||||
|
||||
class KMKKeyboard(_KMKKeyboard):
|
||||
|
@ -22,7 +22,7 @@ import board
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard
|
||||
from kmk.keys import KC
|
||||
from kmk.matrix import DiodeOrientation
|
||||
from kmk.scanners import DiodeOrientation
|
||||
|
||||
keyboard = KMKKeyboard()
|
||||
|
||||
|
@ -35,7 +35,7 @@ if __name__ == '__main__':
|
||||
```python
|
||||
import board
|
||||
|
||||
from kmk.matrix import DiodeOrientation
|
||||
from kmk.scanners import DiodeOrientation
|
||||
|
||||
col_pins = (board.SCK, board.MOSI, board.MISO, board.RX, board.TX, board.D4)
|
||||
row_pins = (board.D10, board.D11, board.D12, board.D13, board.D9, board.D6, board.D5, board.SCL)
|
||||
|
@ -70,7 +70,7 @@ import board
|
||||
from kmk.kmk_keyboard import KMKKeyboard
|
||||
from kmk.consts import UnicodeMode
|
||||
from kmk.keys import KC
|
||||
from kmk.matrix import DiodeOrientation
|
||||
from kmk.scanners import DiodeOrientation
|
||||
from kmk.modules.layers import Layers
|
||||
from kmk.modules.encoder import EncoderHandler
|
||||
|
||||
|
@ -35,7 +35,7 @@ import board
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard
|
||||
from kmk.keys import KC
|
||||
from kmk.matrix import DiodeOrientation
|
||||
from kmk.scanners import DiodeOrientation
|
||||
|
||||
keyboard = KMKKeyboard()
|
||||
|
||||
|
@ -5,7 +5,7 @@ Porting a board to KMK is quite simple, and follows this base format.
|
||||
import board
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.matrix import DiodeOrientation
|
||||
from kmk.scanners import DiodeOrientation
|
||||
{EXTENSIONS_IMPORT}
|
||||
|
||||
class KMKKeyboard(_KMKKeyboard):
|
||||
@ -38,7 +38,7 @@ side, the right side being offset by the number of keys on the left side, as if
|
||||
the rows were stacked.
|
||||
That would look like this
|
||||
```python
|
||||
from kmk.matrix import intify_coordinate as ic
|
||||
from kmk.scanners import intify_coordinate as ic
|
||||
|
||||
coord_mapping = []
|
||||
coord_mapping.extend(ic(0, x, 6) for x in range(6))
|
||||
|
@ -39,7 +39,7 @@ import board
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard
|
||||
from kmk.keys import KC
|
||||
from kmk.matrix import DiodeOrientation
|
||||
from kmk.scanners import DiodeOrientation
|
||||
|
||||
keyboard = KMKKeyboard()
|
||||
|
||||
|
@ -36,7 +36,7 @@ if __name__ == '__main__':
|
||||
```python
|
||||
import board
|
||||
|
||||
from kmk.matrix import DiodeOrientation
|
||||
from kmk.scanners import DiodeOrientation
|
||||
|
||||
col_pins = (board.SCK, board.MOSI, board.MISO, board.RX, board.TX, board.D4)
|
||||
row_pins = (board.D10, board.D11, board.D12, board.D13, board.D9, board.D6, board.D5, board.SCL)
|
||||
|
@ -6,7 +6,7 @@ Portar uma placa para o KMK é bastante simples, e segue o seguinte formato-base
|
||||
import board
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.matrix import DiodeOrientation
|
||||
from kmk.scanners import DiodeOrientation
|
||||
{EXTENSIONS_IMPORT}
|
||||
|
||||
class KMKKeyboard(_KMKKeyboard):
|
||||
@ -44,7 +44,7 @@ linhas, e 6 colunas para a linha inferior. Teclados repartidos são contados pel
|
||||
total, não por parte separada. Isto seria mais ou menos assim:
|
||||
|
||||
```python
|
||||
from kmk.matrix import intify_coordinate as ic
|
||||
from kmk.scanners import intify_coordinate as ic
|
||||
|
||||
coord_mapping = []
|
||||
coord_mapping.extend(ic(0, x, 6) for x in range(6))
|
||||
|
@ -7,8 +7,8 @@ import board
|
||||
from kmk.extensions.RGB import RGB, AnimationModes
|
||||
from kmk.keys import KC
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.matrix import DiodeOrientation
|
||||
from kmk.modules.layers import Layers
|
||||
from kmk.scanners import DiodeOrientation
|
||||
|
||||
keyboard = _KMKKeyboard()
|
||||
keyboard.modules.append(Layers())
|
||||
|
@ -7,8 +7,8 @@ from adafruit_mcp230xx.mcp23017 import MCP23017
|
||||
from kmk.hid import HIDModes
|
||||
from kmk.keys import KC
|
||||
from kmk.kmk_keyboard import KMKKeyboard
|
||||
from kmk.matrix import DiodeOrientation
|
||||
from kmk.modules.layers import Layers
|
||||
from kmk.scanners import DiodeOrientation
|
||||
|
||||
# DEBUG_ENABLE = True
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user