fix: everyone's linting; loosen one linter rule on user keymaps
This commit is contained in:
parent
5f4785f0ad
commit
1016dc552c
@ -1,5 +1,4 @@
|
||||
from adafruit_ble import BLERadio
|
||||
from adafruit_ble.advertising import Advertisement
|
||||
from adafruit_ble.advertising.standard import ProvideServicesAdvertisement
|
||||
from adafruit_ble.services.standard.hid import HIDService
|
||||
from kmk.hid import (
|
||||
|
@ -4,11 +4,9 @@
|
||||
import kmk.preload_imports # isort:skip # NOQA
|
||||
|
||||
import busio
|
||||
import gc
|
||||
|
||||
from kmk import led, rgb
|
||||
|
||||
from kmk.consts import KMK_RELEASE, LeaderMode, UnicodeMode
|
||||
from kmk.consts import LeaderMode, UnicodeMode
|
||||
from kmk.hid import AbstractHID, HIDModes
|
||||
from kmk.internal_state import InternalState
|
||||
from kmk.keys import KC
|
||||
@ -279,20 +277,16 @@ class KMKKeyboard:
|
||||
del self.leader_dictionary[k]
|
||||
|
||||
while True:
|
||||
state_changed = False
|
||||
|
||||
if self.split_type is not None and self.is_target:
|
||||
update = self._receive_from_initiator()
|
||||
if update is not None:
|
||||
self._handle_matrix_report(update)
|
||||
state_changed = True
|
||||
|
||||
update = self.matrix.scan_for_changes()
|
||||
|
||||
if update is not None:
|
||||
if self.is_target:
|
||||
self._handle_matrix_report(update)
|
||||
state_changed = True
|
||||
else:
|
||||
# This keyboard is a initiator, and needs to send data to target
|
||||
self._send_to_target(update)
|
||||
@ -305,8 +299,6 @@ class KMKKeyboard:
|
||||
new_timeouts_len = len(self._state.timeouts)
|
||||
|
||||
if old_timeouts_len != new_timeouts_len:
|
||||
state_changed = True
|
||||
|
||||
if self._state.hid_pending:
|
||||
self._send_hid()
|
||||
|
||||
|
@ -18,8 +18,9 @@ extend-ignore =
|
||||
C812, C813, C815,
|
||||
|
||||
per-file-ignores =
|
||||
# Allow crazy line lengths, unused variables, and multiple spaces after commas in lists (for grid alignment)
|
||||
user_keymaps/**/*.py: F401,E501,E241,E131,BLK100
|
||||
# Allow misaligned array entries, crazy line lengths, unused variables, and
|
||||
# multiple spaces after commas in lists (for grid alignment)
|
||||
user_keymaps/**/*.py: E131,F401,E501,E241,E131,BLK100
|
||||
tests/test_data/keymaps/**/*.py: F401,E501
|
||||
# Forgive me for my RAM hack sins
|
||||
kmk/preload_imports.py: I001,I003,I004,F401
|
||||
|
@ -11,32 +11,30 @@ RAISE = KC.MO(4)
|
||||
ADJUST = KC.MO(5)
|
||||
|
||||
keyboard.keymap = [
|
||||
|
||||
[ #QWERTY
|
||||
KC.TAB, KC.Q, KC.W, KC.E, KC.R, KC.T, KC.Y, KC.U, KC.I, KC.O, KC.P, KC.BSPC,\
|
||||
KC.LCTL, KC.A, KC.S, KC.D, KC.F, KC.G, KC.H, KC.J, KC.K, KC.L, KC.SCLN, KC.QUOT,\
|
||||
KC.LSFT, KC.Z, KC.X, KC.C, KC.V, KC.B, KC.N, KC.M, KC.COMM, KC.DOT, KC.SLSH, KC.RSFT,\
|
||||
KC.LGUI, LOWER, KC.SPC, KC.ENT, RAISE, KC.RALT,
|
||||
],
|
||||
[ #LOWER
|
||||
KC.ESC, KC.N1, KC.N2, KC.N3, KC.N4, KC.N5, KC.N6, KC.N7, KC.N8, KC.N9, KC.N0, KC.BSPC,\
|
||||
KC.LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC.LEFT, KC.DOWN, KC.UP,KC.RIGHT, XXXXXXX, XXXXXXX,\
|
||||
KC.LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\
|
||||
KC.LGUI, LOWER, KC.SPC, KC.ENT, RAISE, KC.RALT,
|
||||
],
|
||||
[ #RAISE
|
||||
KC.ESC, KC.EXLM, KC.AT, KC.HASH, KC.DLR, KC.PERC, KC.CIRC, KC.AMPR, KC.ASTR, KC.LPRN, KC.RPRN, KC.BSPC,\
|
||||
KC.LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC.MINS, KC.EQL, KC.LCBR, KC.RCBR, KC.PIPE, KC.GRV,\
|
||||
KC.LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC.UNDS, KC.PLUS, KC.LBRC, KC.RBRC, KC.BSLS, KC.TILD,\
|
||||
KC.LGUI, LOWER, KC.SPC, KC.ENT, RAISE, KC.RALT,
|
||||
],
|
||||
[ #ADJUST
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\
|
||||
KC.LGUI, LOWER, KC.SPC, KC.ENT, RAISE, KC.RALT,
|
||||
]
|
||||
|
||||
[ #QWERTY
|
||||
KC.TAB, KC.Q, KC.W, KC.E, KC.R, KC.T, KC.Y, KC.U, KC.I, KC.O, KC.P, KC.BSPC,\
|
||||
KC.LCTL, KC.A, KC.S, KC.D, KC.F, KC.G, KC.H, KC.J, KC.K, KC.L, KC.SCLN, KC.QUOT,\
|
||||
KC.LSFT, KC.Z, KC.X, KC.C, KC.V, KC.B, KC.N, KC.M, KC.COMM, KC.DOT, KC.SLSH, KC.RSFT,\
|
||||
KC.LGUI, LOWER, KC.SPC, KC.ENT, RAISE, KC.RALT,
|
||||
],
|
||||
[ #LOWER
|
||||
KC.ESC, KC.N1, KC.N2, KC.N3, KC.N4, KC.N5, KC.N6, KC.N7, KC.N8, KC.N9, KC.N0, KC.BSPC,\
|
||||
KC.LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC.LEFT, KC.DOWN, KC.UP, KC.RIGHT, XXXXXXX, XXXXXXX,\
|
||||
KC.LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\
|
||||
KC.LGUI, LOWER, KC.SPC, KC.ENT, RAISE, KC.RALT,
|
||||
],
|
||||
[ #RAISE
|
||||
KC.ESC, KC.EXLM, KC.AT, KC.HASH, KC.DLR, KC.PERC, KC.CIRC, KC.AMPR, KC.ASTR, KC.LPRN, KC.RPRN, KC.BSPC,\
|
||||
KC.LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC.MINS, KC.EQL, KC.LCBR, KC.RCBR, KC.PIPE, KC.GRV,\
|
||||
KC.LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC.UNDS, KC.PLUS, KC.LBRC, KC.RBRC, KC.BSLS, KC.TILD,\
|
||||
KC.LGUI, LOWER, KC.SPC, KC.ENT, RAISE, KC.RALT,
|
||||
],
|
||||
[ #ADJUST
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\
|
||||
KC.LGUI, LOWER, KC.SPC, KC.ENT, RAISE, KC.RALT,
|
||||
]
|
||||
]
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
@ -1,9 +1,9 @@
|
||||
from kmk.boards.nice_nano.crkbd import KMKKeyboard
|
||||
from kmk.keys import KC
|
||||
from kmk.hid import HIDModes
|
||||
|
||||
import gc
|
||||
|
||||
from kmk.boards.nice_nano.crkbd import KMKKeyboard
|
||||
from kmk.hid import HIDModes
|
||||
from kmk.keys import KC
|
||||
|
||||
keyboard = KMKKeyboard()
|
||||
|
||||
_______ = KC.TRNS
|
||||
@ -33,112 +33,118 @@ keyboard.rgb_config['animation_speed'] = 1
|
||||
|
||||
|
||||
keyboard.keymap = [
|
||||
# DVORAK
|
||||
# ,-----------------------------------------. ,-----------------------------------------.
|
||||
# | Esc | ' | , | . | P | Y | | F | G | C | R | L | BKSP |
|
||||
# |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
# | Tab | A | O | E | U | I | | D | H | T | N | S | ENT |
|
||||
# |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
# | Shft | ; | Q | J | K | X |-------. ,-------| B | M | W | V | Z | / |
|
||||
# `-----------------------------------------/ / \ \-----------------------------------------'
|
||||
# | LALT | LGUI | /LT1_SP / \LT2_SP\ | Ctl | Up |
|
||||
# | | |/ / \ \ | | |
|
||||
# `---------------------' '------''-------------'
|
||||
#
|
||||
[ #DVORAK
|
||||
# DVORAK
|
||||
# ,-----------------------------------------. ,-----------------------------------------.
|
||||
# | Esc | ' | , | . | P | Y | | F | G | C | R | L | BKSP |
|
||||
# |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
# | Tab | A | O | E | U | I | | D | H | T | N | S | ENT |
|
||||
# |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
# | Shft | ; | Q | J | K | X |-------. ,-------| B | M | W | V | Z | / |
|
||||
# `-----------------------------------------/ / \ \-----------------------------------------'
|
||||
# | LALT | LGUI | /LT1_SP / \LT2_SP\ | Ctl | Up |
|
||||
# | | |/ / \ \ | | |
|
||||
# `---------------------' '------''-------------'
|
||||
#
|
||||
[
|
||||
# DVORAK
|
||||
KC.GESC, KC.QUOT, KC.COMM, KC.DOT, KC.P, KC.Y, KC.F, KC.G, KC.C, KC.R, KC.L, KC.BSPC, \
|
||||
TAB_SB, KC.A, KC.O, KC.E, KC.U, KC.I, KC.D, KC.H, KC.T, KC.N, KC.S, KC.ENT, \
|
||||
KC.LSFT, KC.SCLN, KC.Q, KC.J, KC.K, KC.X, KC.B, KC.M, KC.W, KC.V, KC.Z, KC.SLSH, \
|
||||
KC.LALT, SUPER_L, LT1_SP, LT2_SP, KC.LCTL, KC.LEAD,
|
||||
],
|
||||
|
||||
# GAMING
|
||||
# ,-----------------------------------------. ,-----------------------------------------.
|
||||
# | Tab | ' | , | . | P | Y | | F | G | C | R | L | BKSP |
|
||||
# |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
# | Ctl | A | O | E | U | I | | D | H | T | N | S | ENT |
|
||||
# |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
# | Shft | ; | Q | J | K | X |-------. ,-------| B | M | W | V | Z | / |
|
||||
# `-----------------------------------------/ / \ \-----------------------------------------'
|
||||
# | LALT | LGUI | / Space / \LT2_SP\ | Ctl | Up |
|
||||
# | | |/ / \ \ | | |
|
||||
# `---------------------' '------''-------------'
|
||||
#
|
||||
[ #GAMING
|
||||
# GAMING
|
||||
# ,-----------------------------------------. ,-----------------------------------------.
|
||||
# | Tab | ' | , | . | P | Y | | F | G | C | R | L | BKSP |
|
||||
# |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
# | Ctl | A | O | E | U | I | | D | H | T | N | S | ENT |
|
||||
# |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
# | Shft | ; | Q | J | K | X |-------. ,-------| B | M | W | V | Z | / |
|
||||
# `-----------------------------------------/ / \ \-----------------------------------------'
|
||||
# | LALT | LGUI | / Space / \LT2_SP\ | Ctl | Up |
|
||||
# | | |/ / \ \ | | |
|
||||
# `---------------------' '------''-------------'
|
||||
#
|
||||
[
|
||||
# GAMING
|
||||
KC.ESC, KC.QUOT, KC.COMM, KC.DOT, KC.P, KC.Y, KC.F, KC.G, KC.C, KC.R, KC.L, KC.BSPC, \
|
||||
KC.LCTL, KC.A, KC.O, KC.E, KC.U, KC.I, KC.D, KC.H, KC.T, KC.N, KC.S, KC.ENT, \
|
||||
KC.LSFT, KC.SCLN, KC.Q, KC.J, KC.K, KC.X, KC.B, KC.M, KC.W, KC.V, KC.Z, KC.SLSH, \
|
||||
KC.LALT, KC.SPC, KC.SPC, LT2_SP, KC.LCTL, KC.UP,
|
||||
],
|
||||
# RAISE1
|
||||
# ,-----------------------------------------. ,-----------------------------------------.
|
||||
# |Reprog| | | | | | | | | 7 | 8 | 9 | |
|
||||
# |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
# | | | | | | | | | | 4 | 5 | 6 | \ |
|
||||
# |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
# | | | | | | |-------. ,-------| | | 1 | 2 | 3 | - |
|
||||
# `-----------------------------------------/ / \ \-----------------------------------------'
|
||||
# | LALT | LGUI | /LT1_SP / \LT2_SP\ | = | 0 |
|
||||
# | | |/ / \ \ | | |
|
||||
# `---------------------' '------''-------------'
|
||||
#
|
||||
[#RAISE1
|
||||
# RAISE1
|
||||
# ,-----------------------------------------. ,-----------------------------------------.
|
||||
# |Reprog| | | | | | | | | 7 | 8 | 9 | |
|
||||
# |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
# | | | | | | | | | | 4 | 5 | 6 | \ |
|
||||
# |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
# | | | | | | |-------. ,-------| | | 1 | 2 | 3 | - |
|
||||
# `-----------------------------------------/ / \ \-----------------------------------------'
|
||||
# | LALT | LGUI | /LT1_SP / \LT2_SP\ | = | 0 |
|
||||
# | | |/ / \ \ | | |
|
||||
# `---------------------' '------''-------------'
|
||||
#
|
||||
[
|
||||
# RAISE1
|
||||
_______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, KC.N7, KC.N8, KC.N9, KC.DEL, \
|
||||
_______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, KC.N4, KC.N5, KC.N6, KC.BSLS, \
|
||||
_______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, KC.N1, KC.N2, KC.N3, KC.MINS, \
|
||||
_______, _______, _______, _______, KC.EQL, KC.N0,
|
||||
],
|
||||
# RAISE2
|
||||
# ,-----------------------------------------. ,-----------------------------------------.
|
||||
# | | F9 | F10 | F11 | F12 | | | | | | | | SIns |
|
||||
# |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
# | | F5 | F6 | F7 | F8 | | | | Left | Down | Up |Right | |
|
||||
# |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
# | | F1 | F2 | F3 | F4 | |-------. ,-------| | | | | | \ |
|
||||
# `-----------------------------------------/ / \ \-----------------------------------------'
|
||||
# | LALT | LGUI | /LT1_SP / \LT2_SP\ |Dvorak|Gaming|
|
||||
# | | |/ / \ \ | | |
|
||||
# `---------------------' '------''-------------'
|
||||
#
|
||||
# RAISE2
|
||||
# ,-----------------------------------------. ,-----------------------------------------.
|
||||
# | | F9 | F10 | F11 | F12 | | | | | | | | SIns |
|
||||
# |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
# | | F5 | F6 | F7 | F8 | | | | Left | Down | Up |Right | |
|
||||
# |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
# | | F1 | F2 | F3 | F4 | |-------. ,-------| | | | | | \ |
|
||||
# `-----------------------------------------/ / \ \-----------------------------------------'
|
||||
# | LALT | LGUI | /LT1_SP / \LT2_SP\ |Dvorak|Gaming|
|
||||
# | | |/ / \ \ | | |
|
||||
# `---------------------' '------''-------------'
|
||||
#
|
||||
|
||||
[#RAISE2
|
||||
[
|
||||
# RAISE2
|
||||
_______, KC.F9, KC.F10, KC.F11, KC.F12, _______, _______, _______, _______, KC.LBRC, KC.RBRC, KC.LSHIFT(KC.INS), \
|
||||
_______, KC.F5, KC.F6, KC.F7, KC.F8, _______, KC.HOME, KC.LEFT, KC.DOWN, KC.UP, KC.RGHT, KC.END, \
|
||||
_______, KC.F1, KC.F2, KC.F3, KC.F4, _______, _______, _______, _______, _______, _______, KC.BSLS, \
|
||||
_______, _______, _______, _______, KC.DF(0), KC.DF(1),
|
||||
],
|
||||
# GUI
|
||||
# ,-----------------------------------------. ,-----------------------------------------.
|
||||
# | | 1 | 2 | 3 | 4 | 5 | | | | | | | |
|
||||
# |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
# | | 6 | 7 | 8 | 9 | 0 | | | | | | | |
|
||||
# |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
# | | | | | | |-------. ,-------| | | | | | |
|
||||
# `-----------------------------------------/ / \ \-----------------------------------------'
|
||||
# | LALT | LGUI | /LT1_SP / \LT2_SP\ | | |
|
||||
# | | |/ / \ \ | | |
|
||||
# `---------------------' '------''-------------'
|
||||
# GUI
|
||||
# ,-----------------------------------------. ,-----------------------------------------.
|
||||
# | | 1 | 2 | 3 | 4 | 5 | | | | | | | |
|
||||
# |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
# | | 6 | 7 | 8 | 9 | 0 | | | | | | | |
|
||||
# |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
# | | | | | | |-------. ,-------| | | | | | |
|
||||
# `-----------------------------------------/ / \ \-----------------------------------------'
|
||||
# | LALT | LGUI | /LT1_SP / \LT2_SP\ | | |
|
||||
# | | |/ / \ \ | | |
|
||||
# `---------------------' '------''-------------'
|
||||
|
||||
[#GUI\
|
||||
[
|
||||
# GUI
|
||||
_______, KC.N1, KC.N2, KC.N3, KC.N4, KC.N5, _______, _______, _______, _______, _______, _______, \
|
||||
_______, KC.N6, KC.N7, KC.N8, KC.N9, KC.N0, _______, _______, _______, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
|
||||
_______, _______, _______, _______, _______, _______ \
|
||||
],
|
||||
# SYMBOLS
|
||||
# ,-----------------------------------------. ,-----------------------------------------.
|
||||
# | | ! | @ | # | $ | % | | ^ | & | * | ( | ) | Del |
|
||||
# |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
# | | | | | | | | | | | [ | ] | |
|
||||
# |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
# | | | | | | |-------. ,-------| | | | | | |
|
||||
# `-----------------------------------------/ / \ \-----------------------------------------'
|
||||
# | LALT | LGUI | /LT1_SP / \LT2_SP\ | | |
|
||||
# | | |/ / \ \ | | |
|
||||
# `---------------------' '------''-------------'
|
||||
#
|
||||
[#SYMBOLS
|
||||
# SYMBOLS
|
||||
# ,-----------------------------------------. ,-----------------------------------------.
|
||||
# | | ! | @ | # | $ | % | | ^ | & | * | ( | ) | Del |
|
||||
# |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
# | | | | | | | | | | | [ | ] | |
|
||||
# |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
# | | | | | | |-------. ,-------| | | | | | |
|
||||
# `-----------------------------------------/ / \ \-----------------------------------------'
|
||||
# | LALT | LGUI | /LT1_SP / \LT2_SP\ | | |
|
||||
# | | |/ / \ \ | | |
|
||||
# `---------------------' '------''-------------'
|
||||
#
|
||||
[
|
||||
# SYMBOLS
|
||||
KC.LEAD, KC.EXLM, KC.AT, KC.HASH, KC.DLR, KC.PERC, KC.CIRC, KC.AMPR, KC.ASTR, KC.LPRN, KC.RPRN, KC.DEL, \
|
||||
_______, KC.RGB_HUI, KC.RGB_HUD, KC.RGB_VAI, KC.RGB_VAD, _______, _______, _______, _______, KC.LBRC, KC.RBRC, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
|
Loading…
Reference in New Issue
Block a user