Skip to content

Commit

Permalink
corrections for Reviung34 PR (#777)
Browse files Browse the repository at this point in the history
Apply updates and corrections for `Reviung34`

---------

Co-authored-by: xs5871 <60395129+xs5871@users.noreply.github.com>
  • Loading branch information
dunk2k and xs5871 authored Sep 4, 2023
1 parent c538d98 commit ff27162
Show file tree
Hide file tree
Showing 5 changed files with 83 additions and 61 deletions.
4 changes: 1 addition & 3 deletions boards/gtips/reviung34/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Reviung34



The Reviung34 is a 34 key keyboard designed by gtips, it is a slightly smaller
version of the popular Reviung 39. These "split non-split" keyboards offer a lot
of features split keyboards have in terms of comfort and ergonomics but do so in
Expand All @@ -19,10 +17,10 @@ Extensions enabled by default
- [Layers](/docs/en/layers.md) Need more keys than switches? Use layers.
- [RGB matrix](/docs/en/peg_rgb_matrix.md) Light it up


## Microcontroller support

Update this line in `kb.py` to any supported microcontroller in `kmk/quickpin/pro_micro`:

```python
from kmk.quickpin.pro_micro.boardsource_blok import pinout as pins
```
24 changes: 11 additions & 13 deletions boards/gtips/reviung34/kb.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,10 @@
from kmk.kmk_keyboard import KMKKeyboard as _KMKKeyboard
from kmk.quickpin.pro_micro.boardsource_blok import pinout as pins
from kmk.scanners import DiodeOrientation
from kmk.scanners import intify_coordinate as ic


class KMKKeyboard(_KMKKeyboard):
row_pins = (
pins[19],
pins[18],
pins[17],
pins[16]
)
row_pins = (pins[19], pins[18], pins[17], pins[16])
col_pins = (
pins[6],
pins[7],
Expand All @@ -23,15 +17,19 @@ class KMKKeyboard(_KMKKeyboard):
pins[14],
pins[13],
pins[12],
)
)
diode_orientation = DiodeOrientation.COLUMNS
i2c = board.I2C
rgb_pixel_pin = pins[0]
rgb_num_pixels = 9
led_key_pos = [0,1,2,3,8,4,5,6,7]
led_key_pos = [0, 1, 2, 3, 8, 4, 5, 6, 7]
brightness_limit = 1.0
num_pixels = 9
# flake8: noqa
# fmt: off
coord_mapping = [
0, 1, 2, 3, 4, 5, 6, 7, 8, 32
,9, 10, 11, 12, 13, 14, 15, 16, 17, 33
,18,19, 20, 21, 22, 23, 24, 25, 26, 34
,29,30,31,35]
0, 1, 2, 3, 4, 5, 6, 7, 8, 32,
9, 10, 11, 12, 13, 14, 15, 16, 17, 33,
18, 19, 20, 21, 22, 23, 24, 25, 26, 34,
29, 30, 31, 35,
]
57 changes: 34 additions & 23 deletions boards/gtips/reviung34/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,24 @@

# Adding extensions
# ledmap
rgb_ext = Rgb_matrix(ledDisplay=[[55,55,55],[55,55,55],[55,55,55],[55,55,55],[55,55,55],[55,55,55],[55,55,55],[55,55,55],[55,55,55]],split=False,rightSide=False,disable_auto_write=True)
# ledmap
layers_ext = Layers()

keyboard.modules.append(layers_ext)
keyboard.extensions.append(rgb_ext)
rgb = Rgb_matrix(
ledDisplay=[
[55, 55, 55],
[55, 55, 55],
[55, 55, 55],
[55, 55, 55],
[55, 55, 55],
[55, 55, 55],
[55, 55, 55],
[55, 55, 55],
[55, 55, 55],
],
split=False,
rightSide=False,
disable_auto_write=True,
)
keyboard.extensions.append(rgb)
keyboard.modules.append(Layers())

# Cleaner key names
_______ = KC.TRNS
Expand All @@ -24,26 +36,25 @@
RAISE = KC.MO(1)

keyboard.keymap = [
[ #QWERTY
KC.Q, KC.W, KC.E, KC.R, KC.T, KC.Y, KC.U, KC.I, KC.O, KC.P,\
KC.A, KC.S, KC.D, KC.F, KC.G, KC.H, KC.J, KC.K, KC.L, KC.SCLN,\
KC.Z, KC.X, KC.C, KC.V, KC.B, KC.N, KC.M, KC.COMM, KC.DOT, KC.SLSH,\
LOWER, KC.SPC, KC.BSPC, RAISE
[ # QWERTY
KC.Q, KC.W, KC.E, KC.R, KC.T, KC.Y, KC.U, KC.I, KC.O, KC.P,
KC.A, KC.S, KC.D, KC.F, KC.G, KC.H, KC.J, KC.K, KC.L, KC.SCLN,
KC.Z, KC.X, KC.C, KC.V, KC.B, KC.N, KC.M, KC.COMM, KC.DOT, KC.SLSH,
LOWER, KC.SPC, KC.BSPC, RAISE,
],
[ #RAISE
KC.N1, KC.N2, KC.N3, KC.N4, KC.N5, KC.N6, KC.N7, KC.N8, KC.N9, KC.N0,\
KC.TAB, KC.LEFT, KC.DOWN, KC.UP, KC.RGHT, XXXXXXX, KC.MINS, KC.EQL, KC.LBRC, KC.RBRC,\
KC.LCTL, KC.GRV, KC.LGUI, KC.LALT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC.BSLS, KC.QUOT,\
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
[ # RAISE
KC.N1, KC.N2, KC.N3, KC.N4, KC.N5, KC.N6, KC.N7, KC.N8, KC.N9, KC.N0,
KC.TAB, KC.LEFT, KC.DOWN, KC.UP, KC.RGHT, XXXXXXX, KC.MINS, KC.EQL, KC.LBRC, KC.RBRC,
KC.LCTL, KC.GRV, KC.LGUI, KC.LALT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC.BSLS, KC.QUOT,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
],
[ # LOWER
KC.EXLM, KC.AT, KC.HASH, KC.DLR, KC.PERC, KC.CIRC, KC.AMPR, KC.ASTR, KC.LPRN, KC.RPRN,
KC.ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC.UNDS, KC.PLUS, KC.LCBR, KC.RCBR,
KC.CAPS, KC.TILD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC.PIPE, KC.DQT,
XXXXXXX, XXXXXXX, KC.ENT, KC.DEL,
],
[ #LOWER
KC.EXLM, KC.AT, KC.HASH, KC.DLR, KC.PERC, KC.CIRC, KC.AMPR, KC.ASTR, KC.LPRN, KC.RPRN,\
KC.ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC.UNDS, KC.PLUS, KC.LCBR, KC.RCBR,\
KC.CAPS, KC.TILD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC.PIPE, KC.DQT,\
XXXXXXX, XXXXXXX, KC.ENT, KC.DEL
]
]

if __name__ == '__main__':
keyboard.go()

33 changes: 20 additions & 13 deletions boards/gtips/reviung39/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,26 @@

from kmk.extensions.rgb import RGB
from kmk.keys import KC
from kmk.modules.holdtap import HoldTap
from kmk.modules.layers import Layers
from kmk.modules.modtap import ModTap

keyboard = KMKKeyboard()

# Adding extensions
rgb = RGB(pixel_pin=keyboard.rgb_pixel_pin, num_pixels=keyboard.rgb_num_pixels, val_limit=100, hue_default=190, sat_default=100, val_default=5)

modtap = ModTap()
layers_ext = Layers()

keyboard.modules = [layers_ext, modtap]
rgb = RGB(
pixel_pin=keyboard.rgb_pixel_pin,
num_pixels=keyboard.rgb_num_pixels,
val_limit=100,
hue_default=190,
sat_default=100,
val_default=5,
)

holdtap = HoldTap()
keyboard.extensions = [rgb]
layers = Layers()
# ...
keyboard.modules = [layers, holdtap]

# Cleaner key names
_______ = KC.TRNS
Expand All @@ -24,24 +31,24 @@
RAISE = KC.MO(2)

keyboard.keymap = [
[ #QWERTY
[ # QWERTY
KC.ESC, KC.N1, KC.N2, KC.N3, KC.N4, KC.N5, KC.N6, KC.N7, KC.N8, KC.N9, KC.N0, KC.GRV,
KC.TAB, KC.Q, KC.W, KC.E, KC.R, KC.T, KC.Y, KC.U, KC.I, KC.O, KC.P, KC.MINS,
KC.LCTRL, 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.LBRC, KC.RBRC, KC.N, KC.M, KC.COMM, KC.DOT, KC.SLSH, KC.RSFT,
KC.LALT, KC.LGUI, LOWER, KC.SPC, KC.ENT, RAISE, KC.BSPC, KC.RGUI
KC.LALT, KC.LGUI, LOWER, KC.SPC, KC.ENT, RAISE, KC.BSPC, KC.RGUI,
],
[ #LOWER
[ # LOWER
KC.F1, KC.F2, KC.F3, KC.F4, KC.F5, KC.F6, KC.F7, KC.F8, KC.F9, KC.F10, KC.F11, KC.F12,
KC.GRV, KC.EXLM, KC.AT, KC.HASH, KC.DLR, KC.PERC, KC.CIRC, KC.AMPR, KC.ASTR, KC.LPRN, KC.RPRN, KC.TILD,
_______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, KC.UNDS, KC.PLUS, KC.LCBR, KC.RCBR, KC.PIPE,
_______, _______, _______, _______, _______, _______, _______, _______
_______, _______, _______, _______, _______, _______, _______, _______,
],
[ #RAISE
[ # RAISE
KC.GRV, KC.N1, KC.N2, KC.N3, KC.N4, KC.N5, KC.N6, KC.N7, KC.N8, KC.N9, KC.N0, _______,
KC.F1, KC.F2, KC.F3, KC.F4, KC.F5, KC.F6, XXXXXXX, KC.LEFT, KC.DOWN, KC.UP, KC.RGHT, XXXXXXX,
KC.F7, KC.F8, KC.F9, KC.F10, KC.F11, KC.F12, _______, _______, KC.PLUS, KC.MINS, KC.EQL, KC.LBRC, KC.RBRC, KC.BSLS,
_______, _______, _______, _______, _______, _______, _______, _______
_______, _______, _______, _______, _______, _______, _______, _______,
]
]

Expand Down
26 changes: 17 additions & 9 deletions boards/gtips/reviung41/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,27 @@

from kmk.extensions.rgb import RGB
from kmk.keys import KC
from kmk.modules.holdtap import HoldTap
from kmk.modules.layers import Layers
from kmk.modules.modtap import ModTap

keyboard = KMKKeyboard()

# Adding extensions
rgb = RGB(pixel_pin=keyboard.rgb_pixel_pin, num_pixels=keyboard.rgb_num_pixels, val_limit=100, hue_default=190, sat_default=100, val_default=5)
rgb = RGB(
pixel_pin=keyboard.rgb_pixel_pin,
num_pixels=keyboard.rgb_num_pixels,
val_limit=100,
hue_default=190,
sat_default=100,
val_default=5,
)

modtap = ModTap()
holdtap = HoldTap()
layers_ext = Layers()

keyboard.modules = [layers_ext, modtap]
keyboard.extensions = [rgb]
layers = Layers()
# ...
keyboard.modules = [layers, holdtap]

# Cleaner key names
_______ = KC.TRNS
Expand All @@ -35,25 +43,25 @@
RGB_VAD = KC.RGB_VAD

keyboard.keymap = [
[ #QWERTY
[ # 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, RSFT_ENT,
KC.LALT, LOWER, KC.SPC, RAISE, KC.RGUI,
],
[ #LOWER
[ # 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, RSFT_SPC,
KC.LALT, LOWER, KC.SPC, RAISE, KC.RGUI,
],
[ #RAISE
[ # 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.LALT, LOWER, KC.SPC, RAISE, KC.RGUI,
],
[ #ADJUST
[ # ADJUST
RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
Expand Down

0 comments on commit ff27162

Please sign in to comment.