Resolves #121: Use flattened keymaps, which can visually represent the logical layout, rather than the physical wiring
This commit is contained in:
		@@ -3,6 +3,7 @@ import board
 | 
			
		||||
from kmk.consts import DiodeOrientation
 | 
			
		||||
from kmk.mcus.circuitpython_samd51 import Firmware as _Firmware
 | 
			
		||||
from kmk.pins import Pin as P
 | 
			
		||||
from kmk.util import intify_coordinate as ic
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class Firmware(_Firmware):
 | 
			
		||||
@@ -17,3 +18,24 @@ class Firmware(_Firmware):
 | 
			
		||||
    split_offsets = (6, 6, 6, 6, 6)
 | 
			
		||||
    split_type = "UART"
 | 
			
		||||
    uart_pin = board.SCL
 | 
			
		||||
 | 
			
		||||
    coord_mapping = []
 | 
			
		||||
    coord_mapping.extend(ic(0, x) for x in range(12))
 | 
			
		||||
    coord_mapping.extend(ic(1, x) for x in range(12))
 | 
			
		||||
    coord_mapping.extend(ic(2, x) for x in range(12))
 | 
			
		||||
 | 
			
		||||
    # Buckle up friends, the bottom row of this keyboard is wild, and making
 | 
			
		||||
    # our layouts match, visually, what the keyboard looks like, requires some
 | 
			
		||||
    # surgery on the bottom two rows of coords
 | 
			
		||||
 | 
			
		||||
    # Row index 3 is actually perfectly sane and we _could_ expose it
 | 
			
		||||
    # just like the above three rows, however, visually speaking, the
 | 
			
		||||
    # top-right thumb cluster button (when looking at the left-half PCB)
 | 
			
		||||
    # is more inline with R3, so we'll jam that key (and its mirror) in here
 | 
			
		||||
    coord_mapping.extend(ic(3, x) for x in range(6))
 | 
			
		||||
    coord_mapping.append(ic(4, 2))
 | 
			
		||||
    coord_mapping.append(ic(4, 9))
 | 
			
		||||
    coord_mapping.extend(ic(3, x) for x in range(6, 12))  # Now, the rest of R3
 | 
			
		||||
 | 
			
		||||
    # And now, to handle R4, which at this point is down to just six keys
 | 
			
		||||
    coord_mapping.extend(ic(4, x) for x in range(3, 9))
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,27 @@
 | 
			
		||||
from kmk.consts import DiodeOrientation
 | 
			
		||||
from kmk.mcus.circuitpython_samd51 import Firmware as _Firmware
 | 
			
		||||
from kmk.pins import Pin as P
 | 
			
		||||
from kmk.util import intify_coordinate as ic
 | 
			
		||||
 | 
			
		||||
# Implements what used to be handled by Firmware.swap_indicies for this
 | 
			
		||||
# board, by flipping various row3 (bottom physical row) keys so their
 | 
			
		||||
# coord_mapping matches what the user pressed (even if the wiring
 | 
			
		||||
# underneath is sending different coordinates)
 | 
			
		||||
_r3_swap_conversions = {
 | 
			
		||||
    3: 9,
 | 
			
		||||
    4: 10,
 | 
			
		||||
    5: 11,
 | 
			
		||||
    9: 3,
 | 
			
		||||
    10: 4,
 | 
			
		||||
    11: 5,
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def r3_swap(col):
 | 
			
		||||
    try:
 | 
			
		||||
        return _r3_swap_conversions[col]
 | 
			
		||||
    except KeyError:
 | 
			
		||||
        return col
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class Firmware(_Firmware):
 | 
			
		||||
@@ -11,8 +32,8 @@ class Firmware(_Firmware):
 | 
			
		||||
    rollover_cols_every_rows = 4
 | 
			
		||||
    diode_orientation = DiodeOrientation.COLUMNS
 | 
			
		||||
 | 
			
		||||
    swap_indicies = {
 | 
			
		||||
        (3, 3): (3, 9),
 | 
			
		||||
        (3, 4): (3, 10),
 | 
			
		||||
        (3, 5): (3, 11),
 | 
			
		||||
    }
 | 
			
		||||
    coord_mapping = []
 | 
			
		||||
    coord_mapping.extend(ic(0, x) for x in range(12))
 | 
			
		||||
    coord_mapping.extend(ic(1, x) for x in range(12))
 | 
			
		||||
    coord_mapping.extend(ic(2, x) for x in range(12))
 | 
			
		||||
    coord_mapping.extend(ic(3, r3_swap(x)) for x in range(12))
 | 
			
		||||
 
 | 
			
		||||
@@ -48,11 +48,14 @@ import kmk.internal_state  # isort:skip
 | 
			
		||||
 | 
			
		||||
# Thanks for sticking around. Now let's do real work, starting below
 | 
			
		||||
 | 
			
		||||
from kmk.util import intify_coordinate as ic
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class Firmware:
 | 
			
		||||
    debug_enabled = False
 | 
			
		||||
 | 
			
		||||
    keymap = None
 | 
			
		||||
    coord_mapping = None
 | 
			
		||||
 | 
			
		||||
    row_pins = None
 | 
			
		||||
    col_pins = None
 | 
			
		||||
@@ -78,6 +81,22 @@ class Firmware:
 | 
			
		||||
    uart_pin = None
 | 
			
		||||
 | 
			
		||||
    def __init__(self):
 | 
			
		||||
        # Attempt to sanely guess a coord_mapping if one is not provided
 | 
			
		||||
 | 
			
		||||
        if not self.coord_mapping:
 | 
			
		||||
            self.coord_mapping = []
 | 
			
		||||
 | 
			
		||||
            rows_to_calc = len(self.row_pins)
 | 
			
		||||
            cols_to_calc = len(self.col_pins)
 | 
			
		||||
 | 
			
		||||
            if self.split_offsets:
 | 
			
		||||
                rows_to_calc *= 2
 | 
			
		||||
                cols_to_calc *= 2
 | 
			
		||||
 | 
			
		||||
            for ridx in range(rows_to_calc):
 | 
			
		||||
                for cidx in range(cols_to_calc):
 | 
			
		||||
                    self.coord_mapping.append(ic(ridx, cidx))
 | 
			
		||||
 | 
			
		||||
        self._state = InternalState(self)
 | 
			
		||||
 | 
			
		||||
    def _send_hid(self):
 | 
			
		||||
@@ -179,7 +198,6 @@ class Firmware:
 | 
			
		||||
            rows=self.row_pins,
 | 
			
		||||
            diode_orientation=self.diode_orientation,
 | 
			
		||||
            rollover_cols_every_rows=getattr(self, 'rollover_cols_every_rows', None),
 | 
			
		||||
            swap_indicies=getattr(self, 'swap_indicies', None),
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
        # Compile string leader sequences
 | 
			
		||||
 
 | 
			
		||||
@@ -47,10 +47,26 @@ class InternalState:
 | 
			
		||||
        return ret
 | 
			
		||||
 | 
			
		||||
    def _find_key_in_map(self, row, col):
 | 
			
		||||
        ic = intify_coordinate(row, col)
 | 
			
		||||
 | 
			
		||||
        try:
 | 
			
		||||
            idx = self.config.coord_mapping.index(ic)
 | 
			
		||||
        except ValueError:
 | 
			
		||||
            if self.config.debug_enabled:
 | 
			
		||||
                print(
 | 
			
		||||
                    'No coord_mapping index for value {}, row={} col={}'.format(
 | 
			
		||||
                        ic,
 | 
			
		||||
                        row,
 | 
			
		||||
                        col,
 | 
			
		||||
                    ),
 | 
			
		||||
                )
 | 
			
		||||
 | 
			
		||||
            return None
 | 
			
		||||
 | 
			
		||||
        # Later-added layers have priority. Sift through the layers
 | 
			
		||||
        # in reverse order until we find a valid keycode object
 | 
			
		||||
        for layer in self.reversed_active_layers:
 | 
			
		||||
            layer_key = self.config.keymap[layer][row][col]
 | 
			
		||||
            layer_key = self.config.keymap[layer][idx]
 | 
			
		||||
 | 
			
		||||
            if not layer_key or layer_key == KC.TRNS:
 | 
			
		||||
                continue
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,6 @@
 | 
			
		||||
import digitalio
 | 
			
		||||
 | 
			
		||||
from kmk.consts import DiodeOrientation
 | 
			
		||||
from kmk.util import intify_coordinate
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class MatrixScanner:
 | 
			
		||||
@@ -9,7 +8,6 @@ class MatrixScanner:
 | 
			
		||||
        self, cols, rows,
 | 
			
		||||
        diode_orientation=DiodeOrientation.COLUMNS,
 | 
			
		||||
        rollover_cols_every_rows=None,
 | 
			
		||||
        swap_indicies=None,
 | 
			
		||||
    ):
 | 
			
		||||
        # A pin cannot be both a row and column, detect this by combining the
 | 
			
		||||
        # two tuples into a set and validating that the length did not drop
 | 
			
		||||
@@ -45,12 +43,6 @@ class MatrixScanner:
 | 
			
		||||
        for pin in self.inputs:
 | 
			
		||||
            pin.switch_to_input(pull=digitalio.Pull.DOWN)
 | 
			
		||||
 | 
			
		||||
        self.swap_indicies = {}
 | 
			
		||||
        if swap_indicies is not None:
 | 
			
		||||
            for k, v in swap_indicies.items():
 | 
			
		||||
                self.swap_indicies[intify_coordinate(*k)] = v
 | 
			
		||||
                self.swap_indicies[intify_coordinate(*v)] = k
 | 
			
		||||
 | 
			
		||||
        self.rollover_cols_every_rows = rollover_cols_every_rows
 | 
			
		||||
        if self.rollover_cols_every_rows is None:
 | 
			
		||||
            self.rollover_cols_every_rows = self.len_rows
 | 
			
		||||
@@ -100,12 +92,6 @@ class MatrixScanner:
 | 
			
		||||
                        self.report[0] = oidx
 | 
			
		||||
                        self.report[1] = iidx
 | 
			
		||||
 | 
			
		||||
                    swap_src = intify_coordinate(self.report[0], self.report[1])
 | 
			
		||||
                    if swap_src in self.swap_indicies:
 | 
			
		||||
                        tgt_row, tgt_col = self.swap_indicies[swap_src]
 | 
			
		||||
                        self.report[0] = tgt_row
 | 
			
		||||
                        self.report[1] = tgt_col
 | 
			
		||||
 | 
			
		||||
                    self.report[2] = new_val
 | 
			
		||||
                    self.state[ba_idx] = new_val
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -4,7 +4,7 @@ max_line_length = 99
 | 
			
		||||
ignore = X100, E262
 | 
			
		||||
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
 | 
			
		||||
	user_keymaps/**/*.py: F401,E501,E241,E131
 | 
			
		||||
	tests/test_data/keymaps/**/*.py: F401,E501
 | 
			
		||||
# Forgive me for my RAM hack sins
 | 
			
		||||
	kmk/firmware.py: I001,I003,I004,F401
 | 
			
		||||
 
 | 
			
		||||
@@ -50,38 +50,38 @@ WPM = send_string("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed
 | 
			
		||||
keyboard.keymap = [
 | 
			
		||||
    [
 | 
			
		||||
        # Default
 | 
			
		||||
        [KC.GESC, KC.QUOTE, KC.COMMA, KC.DOT, KC.P, KC.Y, KC.F, KC.G, KC.C, KC.R, KC.L, KC.BKSP],
 | 
			
		||||
        [KC.TAB, 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.LCTRL, KC.LGUI, KC.LALT, KC.LEAD, KC.MO(2), KC.LT(3, KC.SPC), KC.LT(3, KC.SPC), KC.MO(4), KC.LEFT, KC.DOWN, KC.UP, KC.RIGHT],
 | 
			
		||||
        KC.GESC, KC.QUOTE, KC.COMMA, KC.DOT, KC.P, KC.Y, KC.F, KC.G, KC.C, KC.R, KC.L, KC.BKSP,
 | 
			
		||||
        KC.TAB, 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.LCTRL, KC.LGUI, KC.LALT, KC.LEAD, KC.MO(2), KC.LT(3, KC.SPC), KC.LT(3, KC.SPC), KC.MO(4), KC.LEFT, KC.DOWN, KC.UP, KC.RIGHT,
 | 
			
		||||
    ],
 | 
			
		||||
    [
 | 
			
		||||
        # Gaming
 | 
			
		||||
        [KC.TAB, KC.QUOT, KC.COMM, KC.DOT, KC.P, KC.Y, KC.F, KC.G, KC.C, KC.R, KC.L, KC.BKSP],
 | 
			
		||||
        [KC.ESC, 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.LCTRL, KC.LGUI, KC.LALT, KC.F1, KC.F2, KC.SPC, KC.SPC, KC.MO(4), KC.LEFT, KC.DOWN, KC.UP, KC.RIGHT],
 | 
			
		||||
        KC.TAB, KC.QUOT, KC.COMM, KC.DOT, KC.P, KC.Y, KC.F, KC.G, KC.C, KC.R, KC.L, KC.BKSP,
 | 
			
		||||
        KC.ESC, 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.LCTRL, KC.LGUI, KC.LALT, KC.F1, KC.F2, KC.SPC, KC.SPC, KC.MO(4), KC.LEFT, KC.DOWN, KC.UP, KC.RIGHT,
 | 
			
		||||
    ],
 | 
			
		||||
    [
 | 
			
		||||
        # Raise1
 | 
			
		||||
        [KC.TILD, KC.EXLM, KC.AT, KC.HASH, KC.DLR, KC.PERC, KC.CIRC, KC.AMPR, KC.ASTR, KC.LPRN, KC.RPRN, KC.DEL],
 | 
			
		||||
        [KC.TRNS, KC.NO, KC.NO, KC.NO, KC.NO, KC.NO, KC.NO, KC.NO, KC.NO, KC.LBRC, KC.RBRC, KC.BSLS],
 | 
			
		||||
        [KC.TRNS, KC.NO, KC.NO, KC.NO, KC.NO, KC.NO, KC.NO, KC.NO, KC.INS, KC.PGDN, KC.PGUP, KC.MINS],
 | 
			
		||||
        [KC.RESET, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.NO, KC.NO, KC.EQL, KC.HOME, KC.VOLD, KC.VOLU, KC.END],
 | 
			
		||||
        KC.TILD, KC.EXLM, KC.AT, KC.HASH, KC.DLR, KC.PERC, KC.CIRC, KC.AMPR, KC.ASTR, KC.LPRN, KC.RPRN, KC.DEL,
 | 
			
		||||
        KC.TRNS, KC.NO, KC.NO, KC.NO, KC.NO, KC.NO, KC.NO, KC.NO, KC.NO, KC.LBRC, KC.RBRC, KC.BSLS,
 | 
			
		||||
        KC.TRNS, KC.NO, KC.NO, KC.NO, KC.NO, KC.NO, KC.NO, KC.NO, KC.INS, KC.PGDN, KC.PGUP, KC.MINS,
 | 
			
		||||
        KC.RESET, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.NO, KC.NO, KC.EQL, KC.HOME, KC.VOLD, KC.VOLU, KC.END,
 | 
			
		||||
    ],
 | 
			
		||||
    [
 | 
			
		||||
        # Raise2
 | 
			
		||||
        [KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.N7, KC.N8, KC.N9, KC.BKSP],
 | 
			
		||||
        [KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.N4, KC.N5, KC.N6, KC.NO],
 | 
			
		||||
        [KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.N1, KC.N2, KC.N3, KC.NO],
 | 
			
		||||
        [KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.N0, KC.N0, KC.PDOT, KC.ENT],
 | 
			
		||||
        KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.N7, KC.N8, KC.N9, KC.BKSP,
 | 
			
		||||
        KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.N4, KC.N5, KC.N6, KC.NO,
 | 
			
		||||
        KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.N1, KC.N2, KC.N3, KC.NO,
 | 
			
		||||
        KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.N0, KC.N0, KC.PDOT, KC.ENT,
 | 
			
		||||
    ],
 | 
			
		||||
    [
 | 
			
		||||
        # Raise3
 | 
			
		||||
        [WPM, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.F10, KC.F11, KC.F12, KC.LSHIFT(KC.INS)],
 | 
			
		||||
        [KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.F7, KC.F8, KC.F9, KC.NO],
 | 
			
		||||
        [KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.F4, KC.F5, KC.F6, KC.NO],
 | 
			
		||||
        [KC.DF(0), KC.DF(1), KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.F1, KC.F2, KC.F3, KC.NO],
 | 
			
		||||
        WPM, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.F10, KC.F11, KC.F12, KC.LSHIFT(KC.INS),
 | 
			
		||||
        KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.F7, KC.F8, KC.F9, KC.NO,
 | 
			
		||||
        KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.F4, KC.F5, KC.F6, KC.NO,
 | 
			
		||||
        KC.DF(0), KC.DF(1), KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.F1, KC.F2, KC.F3, KC.NO,
 | 
			
		||||
    ],
 | 
			
		||||
]
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -55,38 +55,38 @@ keyboard.leader_dictionary = {
 | 
			
		||||
keyboard.keymap = [
 | 
			
		||||
    [
 | 
			
		||||
        # Default
 | 
			
		||||
        [KC.GESC, KC.QUOTE, KC.COMMA, KC.DOT, KC.P, KC.Y, KC.F, KC.G, KC.C, KC.R, KC.L, KC.BKSP],
 | 
			
		||||
        [KC.TAB, 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.LCTRL, KC.LGUI, KC.LALT, KC.LEAD, KC.MO(2), KC.LT(3, KC.SPC), KC.LT(3, KC.SPC), KC.MO(4), KC.LEFT, KC.DOWN, KC.UP, KC.RIGHT],
 | 
			
		||||
        KC.GESC, KC.QUOTE, KC.COMMA, KC.DOT, KC.P, KC.Y, KC.F, KC.G, KC.C, KC.R, KC.L, KC.BKSP,
 | 
			
		||||
        KC.TAB, 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.LCTRL, KC.LGUI, KC.LALT, KC.LEAD, KC.MO(2), KC.LT(3, KC.SPC), KC.LT(3, KC.SPC), KC.MO(4), KC.LEFT, KC.DOWN, KC.UP, KC.RIGHT,
 | 
			
		||||
    ],
 | 
			
		||||
    [
 | 
			
		||||
        # Gaming
 | 
			
		||||
        [KC.TAB, KC.QUOT, KC.COMM, KC.DOT, KC.P, KC.Y, KC.F, KC.G, KC.C, KC.R, KC.L, KC.BKSP],
 | 
			
		||||
        [KC.ESC, 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.LCTRL, KC.LGUI, KC.LALT, KC.F1, KC.F2, KC.SPC, KC.SPC, KC.MO(4), KC.LEFT, KC.DOWN, KC.UP, KC.RIGHT],
 | 
			
		||||
        KC.TAB, KC.QUOT, KC.COMM, KC.DOT, KC.P, KC.Y, KC.F, KC.G, KC.C, KC.R, KC.L, KC.BKSP,
 | 
			
		||||
        KC.ESC, 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.LCTRL, KC.LGUI, KC.LALT, KC.F1, KC.F2, KC.SPC, KC.SPC, KC.MO(4), KC.LEFT, KC.DOWN, KC.UP, KC.RIGHT,
 | 
			
		||||
    ],
 | 
			
		||||
    [
 | 
			
		||||
        # Raise1
 | 
			
		||||
        [KC.TILD, KC.EXLM, KC.AT, KC.HASH, KC.DLR, KC.PERC, KC.CIRC, KC.AMPR, KC.ASTR, KC.LPRN, KC.RPRN, KC.DEL],
 | 
			
		||||
        [KC.TRNS, KC.NO, KC.NO, KC.NO, KC.NO, KC.NO, KC.NO, KC.NO, KC.NO, KC.LBRC, KC.RBRC, KC.BSLS],
 | 
			
		||||
        [KC.TRNS, KC.NO, KC.NO, KC.NO, KC.NO, KC.NO, KC.NO, KC.NO, KC.INS, KC.PGDN, KC.PGUP, KC.MINS],
 | 
			
		||||
        [KC.RESET, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.NO, KC.NO, KC.EQL, KC.HOME, KC.VOLD, KC.VOLU, KC.END],
 | 
			
		||||
        KC.TILD, KC.EXLM, KC.AT, KC.HASH, KC.DLR, KC.PERC, KC.CIRC, KC.AMPR, KC.ASTR, KC.LPRN, KC.RPRN, KC.DEL,
 | 
			
		||||
        KC.TRNS, KC.NO, KC.NO, KC.NO, KC.NO, KC.NO, KC.NO, KC.NO, KC.NO, KC.LBRC, KC.RBRC, KC.BSLS,
 | 
			
		||||
        KC.TRNS, KC.NO, KC.NO, KC.NO, KC.NO, KC.NO, KC.NO, KC.NO, KC.INS, KC.PGDN, KC.PGUP, KC.MINS,
 | 
			
		||||
        KC.RESET, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.NO, KC.NO, KC.EQL, KC.HOME, KC.VOLD, KC.VOLU, KC.END,
 | 
			
		||||
    ],
 | 
			
		||||
    [
 | 
			
		||||
        # Raise2
 | 
			
		||||
        [KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.N7, KC.N8, KC.N9, KC.BKSP],
 | 
			
		||||
        [KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.N4, KC.N5, KC.N6, KC.NO],
 | 
			
		||||
        [KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.N1, KC.N2, KC.N3, KC.NO],
 | 
			
		||||
        [KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.N0, KC.N0, KC.PDOT, KC.ENT],
 | 
			
		||||
        KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.N7, KC.N8, KC.N9, KC.BKSP,
 | 
			
		||||
        KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.N4, KC.N5, KC.N6, KC.NO,
 | 
			
		||||
        KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.N1, KC.N2, KC.N3, KC.NO,
 | 
			
		||||
        KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.N0, KC.N0, KC.PDOT, KC.ENT,
 | 
			
		||||
    ],
 | 
			
		||||
    [
 | 
			
		||||
        # Raise3
 | 
			
		||||
        [KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.F10, KC.F11, KC.F12, KC.LSHIFT(KC.INS)],
 | 
			
		||||
        [KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.F7, KC.F8, KC.F9, KC.NO],
 | 
			
		||||
        [KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.F4, KC.F5, KC.F6, KC.NO],
 | 
			
		||||
        [KC.DF(0), KC.DF(1), KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.F1, KC.F2, KC.F3, KC.NO],
 | 
			
		||||
        KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.F10, KC.F11, KC.F12, KC.LSHIFT(KC.INS),
 | 
			
		||||
        KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.F7, KC.F8, KC.F9, KC.NO,
 | 
			
		||||
        KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.F4, KC.F5, KC.F6, KC.NO,
 | 
			
		||||
        KC.DF(0), KC.DF(1), KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.TRNS, KC.F1, KC.F2, KC.F3, KC.NO,
 | 
			
		||||
    ],
 | 
			
		||||
]
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -70,28 +70,27 @@ HELLA_TD = KC.TD(
 | 
			
		||||
    KC.TG(1),
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
keyboard.keymap = [
 | 
			
		||||
    [
 | 
			
		||||
        [KC.GESC, KC.N1,   KC.N2,    KC.N3,   KC.N4,   KC.N5,   KC.N6,   KC.N7,   KC.N8,   KC.N9,    KC.N0,   KC.BSPC],
 | 
			
		||||
        [KC.TAB,  KC.QUOT, KC.COMM,  KC.DOT,  KC.P,    KC.Y,    KC.F,    KC.G,    KC.C,    KC.R,     KC.L,    KC.SLSH],
 | 
			
		||||
        [KC.LGUI, KC.A,    KC.O,     KC.E,    KC.U,    KC.I,    KC.D,    KC.H,    KC.T,    KC.N,     KC.S,    KC.ENTER],
 | 
			
		||||
        [KC.LCTL, KC.SCLN, KC.Q,     KC.J,    KC.K,    KC.X,    KC.B,    KC.M,    KC.W,    KC.V,     KC.Z,    KC.LALT],
 | 
			
		||||
        [xxxxxxx, xxxxxxx, KC.MO(2), KC.LEFT, KC.RGHT, KC.LSFT, KC.SPC,  KC.UP,   KC.DOWN, KC.MO(1), xxxxxxx, xxxxxxx],
 | 
			
		||||
        KC.GESC, KC.N1,   KC.N2,   KC.N3,  KC.N4, KC.N5,                     KC.N6, KC.N7, KC.N8, KC.N9, KC.N0, KC.BSPC,
 | 
			
		||||
        KC.TAB,  KC.QUOT, KC.COMM, KC.DOT, KC.P,  KC.Y,                      KC.F,  KC.G,  KC.C,  KC.R,  KC.L,  KC.SLSH,
 | 
			
		||||
        KC.LGUI, KC.A,    KC.O,    KC.E,   KC.U,  KC.I,                      KC.D,  KC.H,  KC.T,  KC.N,  KC.S,  KC.ENTER,
 | 
			
		||||
        KC.LCTL, KC.SCLN, KC.Q,    KC.J,   KC.K,  KC.X,  KC.MO(2), KC.MO(1), KC.B,  KC.M,  KC.W,  KC.V,  KC.Z,  KC.LALT,
 | 
			
		||||
                                    KC.LEFT, KC.RGHT,    KC.LSFT,  KC.SPC,     KC.UP, KC.DOWN,
 | 
			
		||||
    ],
 | 
			
		||||
    [
 | 
			
		||||
        [_______, xxxxxxx, xxxxxxx,  xxxxxxx, xxxxxxx, xxxxxxx, KC.F10,  KC.F11,  KC.F12,  xxxxxxx,  xxxxxxx, _______],
 | 
			
		||||
        [xxxxxxx, xxxxxxx, xxxxxxx,  xxxxxxx, xxxxxxx, xxxxxxx, KC.F7,   KC.F8,   KC.F9,   xxxxxxx,  xxxxxxx, KC.EQUAL],
 | 
			
		||||
        [xxxxxxx, xxxxxxx, xxxxxxx,  xxxxxxx, xxxxxxx, KC.INS,  KC.F4,   KC.F5,   KC.F6,   xxxxxxx,  xxxxxxx, xxxxxxx],
 | 
			
		||||
        [xxxxxxx, xxxxxxx, xxxxxxx,  xxxxxxx, xxxxxxx, xxxxxxx, KC.F1,   KC.F2,   KC.F3,   xxxxxxx,  xxxxxxx, _______],
 | 
			
		||||
        [xxxxxxx, xxxxxxx, KC.LEAD,  KC.HOME, KC.END,  _______, xxxxxxx, KC.PGUP, KC.PGDN, _______,  xxxxxxx, xxxxxxx],
 | 
			
		||||
        _______, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx,                   KC.F10, KC.F11, KC.F12, xxxxxxx, xxxxxxx, _______,
 | 
			
		||||
        xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx,                   KC.F7,  KC.F8,  KC.F9,  xxxxxxx, xxxxxxx, KC.EQUAL,
 | 
			
		||||
        xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, KC.INS,                    KC.F4,  KC.F5,  KC.F6,  xxxxxxx, xxxxxxx, xxxxxxx,
 | 
			
		||||
        xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, KC.LEAD, _______, KC.F1,  KC.F2,  KC.F3,  xxxxxxx, xxxxxxx, _______,
 | 
			
		||||
                                      KC.HOME, KC.END,        _______, xxxxxxx,    KC.PGUP, KC.PGDN,
 | 
			
		||||
    ],
 | 
			
		||||
    [
 | 
			
		||||
        [KC.MUTE, xxxxxxx, xxxxxxx,  xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, KC.LBRC,  KC.RBRC, KC.DEL],
 | 
			
		||||
        [xxxxxxx, xxxxxxx, xxxxxxx,  xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx,  xxxxxxx, KC.BSLS],
 | 
			
		||||
        [KC.RGUI, xxxxxxx, xxxxxxx,  xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx,  xxxxxxx, KC.MINS],
 | 
			
		||||
        [xxxxxxx, xxxxxxx, xxxxxxx,  xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx,  xxxxxxx, KC.RALT],
 | 
			
		||||
        [xxxxxxx, xxxxxxx, _______,  KC.HOME, KC.END,  _______, KC.VOLD, KC.PGUP, KC.PGDN, KC.VOLU,  xxxxxxx, xxxxxxx],
 | 
			
		||||
        KC.MUTE, xxxxxxx, xxxxxxx,  xxxxxxx, xxxxxxx, xxxxxxx,                   xxxxxxx, xxxxxxx, xxxxxxx, KC.LBRC,  KC.RBRC, KC.DEL,
 | 
			
		||||
        xxxxxxx, xxxxxxx, xxxxxxx,  xxxxxxx, xxxxxxx, xxxxxxx,                   xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx,  xxxxxxx, KC.BSLS,
 | 
			
		||||
        KC.RGUI, xxxxxxx, xxxxxxx,  xxxxxxx, xxxxxxx, xxxxxxx,                   xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx,  xxxxxxx, KC.MINS,
 | 
			
		||||
        xxxxxxx, xxxxxxx, xxxxxxx,  xxxxxxx, xxxxxxx, xxxxxxx, _______, KC.VOLU, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx,  xxxxxxx, KC.RALT,
 | 
			
		||||
                                      KC.HOME, KC.END,         _______, KC.VOLD,    KC.PGUP, KC.PGDN,
 | 
			
		||||
    ],
 | 
			
		||||
]
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -102,31 +102,31 @@ BORING_ALT = KC.LALT.clone()
 | 
			
		||||
 | 
			
		||||
keyboard.keymap = [
 | 
			
		||||
    [
 | 
			
		||||
        [KC.GESC, KC.QUOT, KC.COMM,            KC.DOT,   KC.P,     KC.Y,    KC.F,    KC.G,     KC.C,    KC.R,    KC.L,  KC.BSPC],
 | 
			
		||||
        [KC.TAB,  KC.A,    KC.O,               KC.E,     KC.U,     KC.I,    KC.D,    KC.H,     KC.T,    KC.N,    KC.S,  KC.ENT],
 | 
			
		||||
        [KC.LGUI, KC.SCLN, KC.Q,               KC.J,     KC.K,     KC.X,    KC.B,    KC.M,     KC.W,    KC.V,    KC.Z,  KC.LALT],
 | 
			
		||||
        [KC.LCTL, KC.LEAD, KC.LSHIFT(KC.LGUI), KC.MO(2), KC.MO(3), KC.LSFT, KC.SPC,  KC.MO(1), KC.LEFT, KC.DOWN, KC.UP, KC.RGHT],
 | 
			
		||||
        KC.GESC, KC.QUOT, KC.COMM,            KC.DOT,   KC.P,     KC.Y,    KC.F,    KC.G,     KC.C,    KC.R,    KC.L,  KC.BSPC,
 | 
			
		||||
        KC.TAB,  KC.A,    KC.O,               KC.E,     KC.U,     KC.I,    KC.D,    KC.H,     KC.T,    KC.N,    KC.S,  KC.ENT,
 | 
			
		||||
        KC.LGUI, KC.SCLN, KC.Q,               KC.J,     KC.K,     KC.X,    KC.B,    KC.M,     KC.W,    KC.V,    KC.Z,  KC.LALT,
 | 
			
		||||
        KC.LCTL, KC.LEAD, KC.LSHIFT(KC.LGUI), KC.MO(2), KC.MO(3), KC.LSFT, KC.SPC,  KC.MO(1), KC.LEFT, KC.DOWN, KC.UP, KC.RGHT,
 | 
			
		||||
    ],
 | 
			
		||||
 | 
			
		||||
    [
 | 
			
		||||
        [KC.GESC, xxxxxxx, xxxxxxx, KC.F10, KC.F11, KC.F12, xxxxxxx, KC.PSLS, KC.N7, KC.N8,  KC.N9,   KC.BSPC],
 | 
			
		||||
        [KC.TAB,  xxxxxxx, xxxxxxx, KC.F7,  KC.F8,  KC.F9,  xxxxxxx, KC.PAST, KC.N4, KC.N5,  KC.N6,   _______],
 | 
			
		||||
        [KC.LGUI, xxxxxxx, xxxxxxx, KC.F4,  KC.F5,  KC.F6,  xxxxxxx, KC.PMNS, KC.N1, KC.N2,  KC.N3,   _______],
 | 
			
		||||
        [KC.LCTL, xxxxxxx, _______, KC.F1,  KC.F2,  KC.F3,  KC.SPC,  _______, KC.N0, KC.DOT, xxxxxxx, KC.EQL],
 | 
			
		||||
        KC.GESC, xxxxxxx, xxxxxxx, KC.F10, KC.F11, KC.F12, xxxxxxx, KC.PSLS, KC.N7, KC.N8,  KC.N9,   KC.BSPC,
 | 
			
		||||
        KC.TAB,  xxxxxxx, xxxxxxx, KC.F7,  KC.F8,  KC.F9,  xxxxxxx, KC.PAST, KC.N4, KC.N5,  KC.N6,   _______,
 | 
			
		||||
        KC.LGUI, xxxxxxx, xxxxxxx, KC.F4,  KC.F5,  KC.F6,  xxxxxxx, KC.PMNS, KC.N1, KC.N2,  KC.N3,   _______,
 | 
			
		||||
        KC.LCTL, xxxxxxx, _______, KC.F1,  KC.F2,  KC.F3,  KC.SPC,  _______, KC.N0, KC.DOT, xxxxxxx, KC.EQL,
 | 
			
		||||
    ],
 | 
			
		||||
 | 
			
		||||
    [
 | 
			
		||||
        [KC.GESC, SHREK_IS_LOVE, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, KC.BSLS, KC.LBRC, KC.RBRC, KC.DEL],
 | 
			
		||||
        [KC.TAB,  xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, KC.MINS],
 | 
			
		||||
        [KC.LGUI, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, KC.LBRC, xxxxxxx, xxxxxxx, KC.INS],
 | 
			
		||||
        [KC.LCTL, xxxxxxx, _______, _______, xxxxxxx, _______, xxxxxxx, xxxxxxx, KC.HOME, KC.PGDN, KC.PGUP, KC.END],
 | 
			
		||||
        KC.GESC, SHREK_IS_LOVE, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, KC.BSLS, KC.LBRC, KC.RBRC, KC.DEL,
 | 
			
		||||
        KC.TAB,  xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, KC.MINS,
 | 
			
		||||
        KC.LGUI, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, KC.LBRC, xxxxxxx, xxxxxxx, KC.INS,
 | 
			
		||||
        KC.LCTL, xxxxxxx, _______, _______, xxxxxxx, _______, xxxxxxx, xxxxxxx, KC.HOME, KC.PGDN, KC.PGUP, KC.END,
 | 
			
		||||
    ],
 | 
			
		||||
 | 
			
		||||
    [
 | 
			
		||||
        [KC.GRV,  KC.EXLM, KC.AT,    KC.HASH, KC.DLR,  KC.PERC, KC.CIRC, KC.AMPR, KC.ASTR, KC.LPRN, KC.RPRN, KC.SLSH],
 | 
			
		||||
        [KC.TAB,  xxxxxxx, xxxxxxx,  xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, KC.MINS],
 | 
			
		||||
        [KC.LGUI, xxxxxxx, xxxxxxx,  xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, BORING_ALT],
 | 
			
		||||
        [KC.LCTL, KC.DBG,  HELLA_TD, xxxxxxx, _______, _______, xxxxxxx, xxxxxxx, KC.MUTE, KC.VOLD, KC.VOLU, xxxxxxx],
 | 
			
		||||
        KC.GRV,  KC.EXLM, KC.AT,    KC.HASH, KC.DLR,  KC.PERC, KC.CIRC, KC.AMPR, KC.ASTR, KC.LPRN, KC.RPRN, KC.SLSH,
 | 
			
		||||
        KC.TAB,  xxxxxxx, xxxxxxx,  xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, KC.MINS,
 | 
			
		||||
        KC.LGUI, xxxxxxx, xxxxxxx,  xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, BORING_ALT,
 | 
			
		||||
        KC.LCTL, KC.DBG,  HELLA_TD, xxxxxxx, _______, _______, xxxxxxx, xxxxxxx, KC.MUTE, KC.VOLD, KC.VOLU, xxxxxxx,
 | 
			
		||||
    ],
 | 
			
		||||
]
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user