keymap updates and test Flake8 exemption.
One more time
This commit is contained in:
committed by
Kyle Brown
parent
10572d71f6
commit
5c8f33fc3e
37
boards/fingerpunch/ffkb/nice_nano/kb.py
Normal file
37
boards/fingerpunch/ffkb/nice_nano/kb.py
Normal file
@@ -0,0 +1,37 @@
|
||||
import board
|
||||
|
||||
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
|
||||
from kmk.scanners import DiodeOrientation
|
||||
|
||||
class KMKKeyboard(_KMKKeyboard):
|
||||
col_pins = (
|
||||
board.P1_06,
|
||||
board.P1_04,
|
||||
board.P0_11,
|
||||
board.P1_00,
|
||||
board.P0_24,
|
||||
board.P0_22,
|
||||
board.MOSI,
|
||||
board.MISO,
|
||||
)
|
||||
row_pins = (
|
||||
board.P0_08,
|
||||
board.P0_31,
|
||||
board.P0_29,
|
||||
board.P0_02,
|
||||
board.P1_15,
|
||||
board.SCK,
|
||||
)
|
||||
diode_orientation = DiodeOrientation.COLUMNS
|
||||
rgb_pixel_pin = board.P0_06
|
||||
rgb_num_pixels = 42
|
||||
i2c = board.I2C
|
||||
|
||||
coord_mapping = [
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 35, 28, 37, 31,
|
||||
8, 9, 10, 11, 12, 13, 33, 14, 15, 26, 36, 29, 39,
|
||||
16, 17, 18, 19, 20, 21, 22, 23, 34, 27, 30, 38,
|
||||
41, 43, 44, 45, 46, 47, 42, 40,
|
||||
]
|
||||
|
||||
encoder_pins = ((board.P0_20, board.P0_17, board.P0_09, False))
|
59
boards/fingerpunch/ffkb/nice_nano/main.py
Normal file
59
boards/fingerpunch/ffkb/nice_nano/main.py
Normal file
@@ -0,0 +1,59 @@
|
||||
import board
|
||||
|
||||
import kb
|
||||
|
||||
from kmk.keys import KC
|
||||
from kmk.modules.layers import Layers
|
||||
from kmk.modules.combos import Combos, Sequence
|
||||
|
||||
keyboard = kb.KMKKeyboard()
|
||||
|
||||
keyboard.modules = [
|
||||
Layers(),
|
||||
Combos(),
|
||||
]
|
||||
|
||||
keyboard.combos = Combos()
|
||||
|
||||
# Convenience variables for the Keymap
|
||||
_______ = KC.TRNS
|
||||
xxxxxxx = KC.NO
|
||||
|
||||
L1_TAB = KC.LT(1, KC.TAB, prefer_hold=True, tap_interrupted=False, tap_time=250)
|
||||
L2_ENT = KC.LT(2, KC.ENT, prefer_hold=True, tap_interrupted=False, tap_time=250)
|
||||
|
||||
keyboard.combos = [
|
||||
Sequence((KC.LEADER, KC.A), KC.LCTL(KC.A)), # select All
|
||||
Sequence((KC.LEADER, KC.T), KC.LCTL(KC.X)), # cuT
|
||||
Sequence((KC.LEADER, KC.C), KC.LCTL(KC.C)), # Copy
|
||||
Sequence((KC.LEADER, KC.P), KC.LCTL(KC.P)), # Copy
|
||||
Sequence((KC.LEADER, KC.U), KC.LCTL(KC.Z)), # Undo
|
||||
Sequence((KC.LEADER, KC.Y), KC.LCTL(KC.Y)), # redo
|
||||
]
|
||||
|
||||
# flake8: noqa
|
||||
keyboard.keymap = [
|
||||
[ # 0: Colemak-DH letters
|
||||
KC.ESC, KC.Q, KC.W, KC.F, KC.P, KC.B, KC.J, KC.L, KC.U, KC.Y, KC.SCLN, KC.LEADER,
|
||||
KC.LCTL, KC.A, KC.R, KC.S, KC.T, KC.G, xxxxxxx, KC.M, KC.N, KC.E, KC.I, KC.O, KC.QUOT,
|
||||
KC.LALT, KC.Z, KC.X, KC.C, KC.D, KC.V, KC.K, KC.H, KC.COMM, KC.DOT, KC.SLSH, KC.BSLS,
|
||||
xxxxxxx, KC.LGUI, KC.LSFT, KC.BSPC, L1_TAB, KC.SPACE,L2_ENT, xxxxxxx,
|
||||
],
|
||||
[ # 1: Nav & Numbers
|
||||
KC.TAB, KC.N1, KC.N2, KC.N3, KC.N4, KC.N5, KC.N6, KC.N7, KC.N8, KC.N9, KC.N0, KC.DEL,
|
||||
_______, KC.LPRN, KC.LEFT, KC.UP, KC.RIGHT,KC.RPRN, _______, xxxxxxx, KC.PLUS, KC.EQL, xxxxxxx, xxxxxxx, xxxxxxx,
|
||||
_______, KC.LBRC, KC.LCBR, KC.DOWN, KC.RCBR, KC.RBRC, xxxxxxx, KC.MINS, KC.UNDS, xxxxxxx, xxxxxxx, xxxxxxx,
|
||||
_______, _______, _______, KC.DEL, _______, _______, _______, _______,
|
||||
],
|
||||
[ # 2: F-row & Board Functions
|
||||
KC.F12, KC.F1, KC.F2, KC.F3, KC.F4, KC.F5, KC.F6, KC.F7, KC.F8, KC.F9, KC.F10, KC.F11,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______,
|
||||
],
|
||||
]
|
||||
|
||||
keyboard.debug_enabled = False
|
||||
|
||||
if __name__ == '__main__':
|
||||
keyboard.go()
|
Reference in New Issue
Block a user