Esempio n. 1
0
from kmk.keys import KC
from kmk.matrix import DiodeOrientation
from kmk.modules.layers import Layers
from kmk.keys import KC, make_key
envkb = KMKKeyboard()

envkb.col_pins = (board.GP18, board.GP19, board.GP20, board.GP21)
envkb.row_pins = (board.GP4, board.GP11, board.GP15)
envkb.diode_orientation = DiodeOrientation.COLUMNS

rollover_cols_every_rows = 4
envkb.diode_orientation = DiodeOrientation.COLUMNS
envkb.debug_enabled = False

layers = Layers()
envkb.modules = [layers]

nokey = KC.NO
envkb.keymap = [
    [
        KC.F13,
        KC.F14,
        KC.F15,
        KC.F16,
        KC.F17,
        KC.F18,
        KC.F19,
        KC.F20,
        KC.F21,
        KC.F22,
        KC.F23,
Esempio n. 2
0
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

# DEBUG_ENABLE = True

i2c = busio.I2C(scl=board.SCL, sda=board.SDA, frequency=100000)
mcp = MCP23017(i2c, address=0x20)
keyboard = KMKKeyboard()
layer_ext = Layers
keyboard.modules = [layer_ext]

_______ = KC.TRNS
XXXXXXX = KC.NO

FN = KC.MO(1)

keyboard.debug_enabled = True

keyboard.col_pins = (mcp.get_pin(8), mcp.get_pin(9), mcp.get_pin(10),
                     mcp.get_pin(11), mcp.get_pin(12), mcp.get_pin(13),
                     mcp.get_pin(14), mcp.get_pin(15), mcp.get_pin(4),
                     mcp.get_pin(5), mcp.get_pin(6), mcp.get_pin(7),
                     mcp.get_pin(3), mcp.get_pin(2), mcp.get_pin(1))
keyboard.row_pins = (board.D7, board.D6, board.D5, board.D3, board.D2)
keyboard.diode_orientation = DiodeOrientation.COLUMNS