2018-10-06 10:32:17 +02:00
|
|
|
import sys
|
2018-10-07 07:15:55 +02:00
|
|
|
from logging import WARNING
|
2018-10-06 10:32:17 +02:00
|
|
|
|
2018-10-06 14:59:03 +02:00
|
|
|
from kmk.circuitpython.hid import HIDHelper
|
2018-10-06 10:32:17 +02:00
|
|
|
from kmk.circuitpython.matrix import MatrixScanner
|
|
|
|
from kmk.common.consts import UnicodeModes
|
|
|
|
from kmk.firmware import Firmware
|
|
|
|
|
|
|
|
|
|
|
|
def main():
|
|
|
|
from kmk_keyboard_user import cols, diode_orientation, keymap, rows
|
|
|
|
|
|
|
|
try:
|
|
|
|
from kmk_keyboard_user import unicode_mode
|
|
|
|
except Exception:
|
|
|
|
unicode_mode = UnicodeModes.NOOP
|
|
|
|
|
|
|
|
try:
|
|
|
|
firmware = Firmware(
|
|
|
|
keymap=keymap,
|
|
|
|
row_pins=rows,
|
|
|
|
col_pins=cols,
|
|
|
|
diode_orientation=diode_orientation,
|
|
|
|
unicode_mode=unicode_mode,
|
2018-10-07 07:15:55 +02:00
|
|
|
log_level=WARNING,
|
2018-10-06 10:32:17 +02:00
|
|
|
matrix_scanner=MatrixScanner,
|
2018-10-06 14:59:03 +02:00
|
|
|
hid=HIDHelper,
|
2018-10-06 10:32:17 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
firmware.go()
|
|
|
|
except Exception as e:
|
|
|
|
sys.print_exception(e)
|
|
|
|
sys.exit(1)
|