Skip to content

Commit

Permalink
add layout and studio unlock
Browse files Browse the repository at this point in the history
  • Loading branch information
alinelena committed Oct 15, 2024
1 parent aaddf45 commit 428bf89
Show file tree
Hide file tree
Showing 31 changed files with 487 additions and 7 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@

zmk firmware for mlego

- mlego m66 5x13 rev4
![m66](https://mlego.elena.re/pics/m66/mlego_m66_rev4-lcd.webp)
![m66](https://mlego.elena.re/pics/m66/mlego_m66_rev4-sharp.webp)
![M66 .. ](./mlego_m66_rev4_uk.svg)
- features rp2040(pro micro footprint) or nice!nano and compatible bt
- [x] matrix
- [x] encoder
- [x] mipi sharp screen (nice!view like various sizes)
- [ ] eink, 2.13inch we act.
- [ ] led indicators
- [x] unicode
- [ ] rgb per key...


- mlego m65 5x13 rev4
![M65 stm32f401](https://i.imgur.com/P1SRKwC.jpg)
- features stm32f401
Expand Down
7 changes: 7 additions & 0 deletions build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,25 @@ include:
shield: settings_reset
- board: nice_nano_v2
shield: mlego_m66_rev4
snippet: studio-rpc-usb-uart
- board: nice_nano_v2
shield: mlego_m66_rev4 ls013b7dh05
snippet: studio-rpc-usb-uart
- board: nice_nano_v2
shield: mlego_m66_rev4 ls013b7dh03s
snippet: studio-rpc-usb-uart
- board: nice_nano_v2
shield: mlego_m66_rev4 ls011b7dh03
snippet: studio-rpc-usb-uart
- board: nice_nano_v2
shield: mlego_m66_rev4 weact_eink_213
snippet: studio-rpc-usb-uart
- board: nice_nano_v2
shield: mlego_m66_rev4 weact_eink_154
snippet: studio-rpc-usb-uart
- board: rpi_pico
shield: mlego_m66_rev4_rp2040
snippet: studio-rpc-usb-uart
- board: nice_nano_v2
shield: settings_reset
- board: rpi_pico
Expand Down
12 changes: 12 additions & 0 deletions config/boards/shields/mlego_m66_rev4/italian.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/* Italian diacritics */

ZMK_UNICODE_PAIR(it_a , N0, N0, E, N0 , N0, N0, C, N0) // à/À
ZMK_UNICODE_PAIR(it_eg , N0, N0, E, N8 , N0, N0, C, N8) // è/È
ZMK_UNICODE_PAIR(it_ea , N0, N0, E, N9 , N0, N0, C, N9) // é/É
ZMK_UNICODE_PAIR(it_ig , N0, N0, E, C , N0, N0, C, C) // ì/Ì
ZMK_UNICODE_PAIR(it_ia , N0, N0, E, C , N0, N0, C, C) // í/Í
ZMK_UNICODE_PAIR(it_ic , N0, N0, E, E , N0, N0, C, E ) // î/Î
ZMK_UNICODE_PAIR(it_og , N0, N0, F, N2 , N0, N0, D, N2) // ò/Ò
ZMK_UNICODE_PAIR(it_oa , N0, N0, F, N3 , N0, N0, D, N3) // ò/Ò
ZMK_UNICODE_PAIR(it_ug , N0, N0, F, N9 , N0, N0, D, N9) // ù/Ù
ZMK_UNICODE_PAIR(it_ua , N0, N0, F, N9 , N0, N0, D, N9) // ú/Ú
4 changes: 4 additions & 0 deletions config/boards/shields/mlego_m66_rev4/mlego_m66_rev4.conf
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,7 @@ CONFIG_ZMK_USB_LOGGING=n

CONFIG_ZMK_SLEEP=y
# useful but broken at the moment
CONFIG_ZMK_STUDIO=y
#
#CONFIG_PM_DEVICE=y
#CONFIG_PM_DEVICE_RUNTIME=y
2 changes: 1 addition & 1 deletion config/boards/shields/mlego_m66_rev4/mlego_m66_rev4.keymap
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
&trans &ro_ai &kp F14 &kp F15 &kp F16 &ro_t &kp F18 &kp F19 &ro_i &kp F21 &kp F22 &kp F23 &kp F24
&trans &ro_a &ro_s &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &kp F20 &trans &my_xXr &my_cCr &my_vVr &my_bBr &my_nNr &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &studio_unlock &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
>;
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
};
Expand Down
106 changes: 100 additions & 6 deletions config/boards/shields/mlego_m66_rev4/mlego_m66_rev4.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,107 @@
*/

#include <dt-bindings/zmk/matrix_transform.h>
#include <physical_layouts.dtsi>

/ {
model = "mlego m66, rev4";

//compatible = "nice-nano-v2";

m66_layout: m66_layout {
compatible = "zmk,physical-layout";
display-name = "m66 default layout";
kscan = <&kscan_m66>;
transform = <&m66>;
keys // w h x y rot rx ry
= <&key_physical_attrs 100 100 0 0 0 0 0>
, <&key_physical_attrs 100 100 100 0 0 0 0>
, <&key_physical_attrs 100 100 200 0 0 0 0>
, <&key_physical_attrs 100 100 300 0 0 0 0>
, <&key_physical_attrs 100 100 400 0 0 0 0>
, <&key_physical_attrs 100 100 500 0 0 0 0>
, <&key_physical_attrs 100 100 600 0 0 0 0>
, <&key_physical_attrs 100 100 700 0 0 0 0>
, <&key_physical_attrs 100 100 800 0 0 0 0>
, <&key_physical_attrs 100 100 900 0 0 0 0>
, <&key_physical_attrs 100 100 1000 0 0 0 0>
, <&key_physical_attrs 100 100 1100 0 0 0 0>
, <&key_physical_attrs 100 100 1200 0 0 0 0>
, <&key_physical_attrs 100 100 0 0 0 0 0>
, <&key_physical_attrs 100 100 0 100 0 0 0>
, <&key_physical_attrs 100 100 100 100 0 0 0>
, <&key_physical_attrs 100 100 200 100 0 0 0>
, <&key_physical_attrs 100 100 300 100 0 0 0>
, <&key_physical_attrs 100 100 400 100 0 0 0>
, <&key_physical_attrs 100 100 500 100 0 0 0>
, <&key_physical_attrs 100 100 600 100 0 0 0>
, <&key_physical_attrs 100 100 700 100 0 0 0>
, <&key_physical_attrs 100 100 800 100 0 0 0>
, <&key_physical_attrs 100 100 900 100 0 0 0>
, <&key_physical_attrs 100 100 1000 100 0 0 0>
, <&key_physical_attrs 100 100 1100 100 0 0 0>
, <&key_physical_attrs 100 100 1200 100 0 0 0>
, <&key_physical_attrs 100 100 0 200 0 0 0>
, <&key_physical_attrs 100 100 100 200 0 0 0>
, <&key_physical_attrs 100 100 200 200 0 0 0>
, <&key_physical_attrs 100 100 300 200 0 0 0>
, <&key_physical_attrs 100 100 400 200 0 0 0>
, <&key_physical_attrs 100 100 500 200 0 0 0>
, <&key_physical_attrs 100 100 600 200 0 0 0>
, <&key_physical_attrs 100 100 700 200 0 0 0>
, <&key_physical_attrs 100 100 800 200 0 0 0>
, <&key_physical_attrs 100 100 900 200 0 0 0>
, <&key_physical_attrs 100 100 1000 200 0 0 0>
, <&key_physical_attrs 100 100 1100 200 0 0 0>
, <&key_physical_attrs 100 100 1200 200 0 0 0>
, <&key_physical_attrs 100 100 0 300 0 0 0>
, <&key_physical_attrs 100 100 100 300 0 0 0>
, <&key_physical_attrs 100 100 200 300 0 0 0>
, <&key_physical_attrs 100 100 300 300 0 0 0>
, <&key_physical_attrs 100 100 400 300 0 0 0>
, <&key_physical_attrs 100 100 500 300 0 0 0>
, <&key_physical_attrs 100 100 600 300 0 0 0>
, <&key_physical_attrs 100 100 700 300 0 0 0>
, <&key_physical_attrs 100 100 800 300 0 0 0>
, <&key_physical_attrs 100 100 900 300 0 0 0>
, <&key_physical_attrs 100 100 1000 300 0 0 0>
, <&key_physical_attrs 100 100 1100 300 0 0 0>
, <&key_physical_attrs 100 100 1200 300 0 0 0>
, <&key_physical_attrs 100 100 0 400 0 0 0>
, <&key_physical_attrs 100 100 100 400 0 0 0>
, <&key_physical_attrs 100 100 200 400 0 0 0>
, <&key_physical_attrs 100 100 300 400 0 0 0>
, <&key_physical_attrs 100 100 400 400 0 0 0>
, <&key_physical_attrs 100 100 500 400 0 0 0>
, <&key_physical_attrs 100 100 600 400 0 0 0>
, <&key_physical_attrs 100 100 700 400 0 0 0>
, <&key_physical_attrs 100 100 800 400 0 0 0>
, <&key_physical_attrs 100 100 900 400 0 0 0>
, <&key_physical_attrs 100 100 1000 400 0 0 0>
, <&key_physical_attrs 100 100 1100 400 0 0 0>
, <&key_physical_attrs 100 100 1200 400 0 0 0>
;
};

m66_position_map {
compatible = "zmk,physical-layout-position-map";
complete;
m66_layout_posmap: m66_layout {
physical-layout = <&m66_layout>;
positions
= < 0 1 2 3 4 5 6 7 8 9 10 11 12 13>
, <14 15 16 17 18 19 20 21 22 23 24 25 26>
, <27 28 29 30 31 32 33 34 35 36 37 38 39>
, <40 41 42 43 44 45 46 47 48 49 50 51 52>
, <53 54 55 56 57 58 59 60 61 62 63 64 65>
;
};
};

chosen {
zmk,kscan = &kscan;
zmk,matrix_transform = &m66;
/*
zmk,kscan = &kscan_m66;
*/
zephyr,console = &cdc_acm_uart;
};

Expand All @@ -21,9 +113,11 @@
columns = <14>;
rows = <5>;
/*
┌────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┐
│ 0A │ 0B │ 0C │ 0D │ 0E │ 0F │ 0G │ 0H │ 0I │ 0J │ 0K │ 0L │ 0M │ 0N │
├────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┘
┌────┐
│ 0N │
├────┼────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┐
│ 0A │ 0B │ 0C │ 0D │ 0E │ 0F │ 0G │ 0H │ 0I │ 0J │ 0K │ 0L │ 0M │
├────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┤
│ 1A │ 1B │ 1C │ 1D │ 1E │ 1F │ 1G │ 1H │ 1I │ 1J │ 1K │ 1L │ 1M │
├────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┼────┤
│ 2A │ 2B │ 2C │ 2D │ 2E │ 2F │ 2G │ 2H │ 2I │ 2J │ 2K │ 2L │ 2M │
Expand All @@ -42,7 +136,7 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9
RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,12)
>;
};
kscan: kscan {
kscan_m66: kscan_m66 {
compatible = "zmk,kscan-gpio-matrix";
diode-direction = "col2row";
wakeup-source;
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added firmware/mlego5x13_rev4-blackpill_f401ce-zmk.uf2
Binary file not shown.
Binary file added firmware/mlego5x13_rev5-rpi_pico-zmk.uf2
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added firmware/mlego_m66_rev4-nice_nano_v2-zmk.uf2
Binary file not shown.
Binary file added firmware/mlego_m66_rev4.uf2
Binary file not shown.
Binary file not shown.
Binary file added firmware/mlego_m66_rev4_rp2040.uf2
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added firmware/onekey pro_micro-nice_nano_v2-zmk.uf2
Binary file not shown.
Binary file added firmware/onekey rp2040-rpi_pico-zmk.uf2
Binary file not shown.
Binary file added firmware/onekey seed-seeeduino_xiao_ble-zmk.uf2
Binary file not shown.
Binary file added firmware/settings_reset-nice_nano_v2-zmk.uf2
Binary file not shown.
Binary file added firmware/settings_reset-rpi_pico-zmk.uf2
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit 428bf89

Please sign in to comment.