Add Pico87 board
This commit is contained in:
parent
47601b730a
commit
6d255a24f5
43
boards/Pico87/kb.py
Normal file
43
boards/Pico87/kb.py
Normal file
@ -0,0 +1,43 @@
|
||||
import board
|
||||
|
||||
from kmk.extensions.LED import LED
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.scanners import DiodeOrientation
|
||||
|
||||
|
||||
class KMKKeyboard(_KMKKeyboard):
|
||||
col_pins = (
|
||||
board.GP0,
|
||||
board.GP1,
|
||||
board.GP2,
|
||||
board.GP3,
|
||||
board.GP4,
|
||||
board.GP5,
|
||||
board.GP6,
|
||||
board.GP7,
|
||||
board.GP8,
|
||||
board.GP9,
|
||||
board.GP10,
|
||||
board.GP11,
|
||||
board.GP12,
|
||||
board.GP13,
|
||||
board.GP14,
|
||||
board.GP15,
|
||||
board.GP16,
|
||||
board.GP17,
|
||||
)
|
||||
|
||||
row_pins = (
|
||||
board.GP18,
|
||||
board.GP19,
|
||||
board.GP20,
|
||||
board.GP21,
|
||||
board.GP22,
|
||||
board.GP26,
|
||||
)
|
||||
|
||||
diode_orientation = DiodeOrientation.COLUMNS
|
||||
|
||||
leds = LED(led_pin=[board.GP27, board.GP28])
|
||||
_KMKKeyboard.extensions.append(leds)
|
||||
|
56
boards/Pico87/main.py
Normal file
56
boards/Pico87/main.py
Normal file
@ -0,0 +1,56 @@
|
||||
import board
|
||||
|
||||
from kb import KMKKeyboard
|
||||
|
||||
# Removed until https://github.com/KMKfw/kmk_firmware/pull/553 patches
|
||||
# from kmk.extensions.lock_status import LockStatus
|
||||
from kmk.extensions.stringy_keymaps import StringyKeymaps
|
||||
from kmk.keys import KC
|
||||
from kmk.modules.layers import Layers
|
||||
|
||||
Pico87 = KMKKeyboard()
|
||||
|
||||
Pico87.modules.append(Layers())
|
||||
|
||||
# Removed until https://github.com/KMKfw/kmk_firmware/pull/553 patches
|
||||
# def toggle_lock_leds(self):
|
||||
# if self.get_caps_lock():
|
||||
# Pico87.leds.set_brightness(50, leds=[0])
|
||||
# else:
|
||||
# Pico87.leds.set_brightness(0, leds=[0])
|
||||
|
||||
# if self.get_scroll_lock():
|
||||
# Pico87.leds.set_brightness(50, leds=[1])
|
||||
# else:
|
||||
# Pico87.leds.set_brightness(0, leds=[1])
|
||||
|
||||
|
||||
# locks = LockStatus(toggle_lock_leds)
|
||||
# Pico87.extensions.append(locks)
|
||||
Pico87.extensions.append(StringyKeymaps())
|
||||
|
||||
MOLYR = KC.MO(1)
|
||||
|
||||
# Make this for better looking formatting...
|
||||
______ = 'NO'
|
||||
|
||||
Pico87.keymap = [[
|
||||
# Layer 0 QWERTY
|
||||
'ESC', ______, 'F1', 'F2', 'F3', 'F4', ______, 'F5', 'F6', 'F7', 'F8', 'F9', 'F10', 'F11', 'F12', 'PSCR', 'SLCK', 'PAUS',
|
||||
'GRV', 'N1', 'N2', 'N3', 'N4', 'N5', 'N6', 'N7', 'N8', 'N9', 'N0', 'MINS', 'EQL', ______, 'BSPC', 'INS', 'HOME', 'PGUP',
|
||||
'TAB', ______, 'Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P', 'LBRC', 'RBRC', 'BSLS', 'DEL', 'END', 'PGDN',
|
||||
'CAPS', ______, 'A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L', 'SCLN', 'QUOT', 'ENT', ______, ______, ______, ______,
|
||||
______, 'LSFT', 'Z', 'X', 'C', 'V', 'B', 'N', 'M', 'COMM', 'DOT', 'SLSH', ______, 'RSFT', ______, ______, 'UP', ______,
|
||||
'LCTL', 'LGUI', ______, 'LALT', ______, ______, 'SPC', ______, ______, ______, 'RALT', 'RGUI', ______, MOLYR, 'RCTL', 'LEFT', 'DOWN', 'RGHT',
|
||||
], [
|
||||
# Layer 1
|
||||
'ESC', ______, 'F1', 'F2', 'F3', 'F4', ______, 'F5', 'F6', 'F7', 'F8', 'F9', 'F10', 'F11', 'F12', 'PSCR', 'SLCK', 'PAUS',
|
||||
'GRV', 'N1', 'N2', 'N3', 'N4', 'N5', 'N6', 'N7', 'N8', 'N9', 'N0', 'MINS', 'EQL', ______, 'BSPC', 'INS', 'HOME', 'PGUP',
|
||||
'TAB', ______, 'Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P', 'LBRC', 'RBRC', 'BSLS', 'DEL', 'END', 'PGDN',
|
||||
'CAPS', ______, 'A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L', 'SCLN', 'QUOT', 'ENT', ______, ______, ______, ______,
|
||||
______, 'LSFT', 'Z', 'X', 'C', 'V', 'B', 'N', 'M', 'COMM', 'DOT', 'SLSH', ______, 'RSFT', ______, ______, 'UP', ______,
|
||||
'LCTL', 'LGUI', ______, 'LALT', ______, ______, 'SPC', ______, ______, ______, 'RALT', 'RGUI', ______, MOLYR, 'RCTL', 'LEFT', 'DOWN', 'RGHT',
|
||||
]]
|
||||
|
||||
if __name__ == '__main__':
|
||||
Pico87.go()
|
Loading…
Reference in New Issue
Block a user