Skip to content

Commit 5d9da33

Browse files
authored
Merge pull request #21 from kanru/build-zmk-studio
Build with zmk studio
2 parents 73cc0cd + da45238 commit 5d9da33

File tree

8 files changed

+148
-18
lines changed

8 files changed

+148
-18
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/.cache/
12
/.vscode/
23
/.west/
34
/build/

CHANGELOG.md

Lines changed: 51 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,62 @@
22

33
All notable changes to this project will be documented in this file.
44

5-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6-
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
5+
## [1.1.0] - 2025-03-07
76

8-
## [Unreleased]
7+
### 🚀 Features
98

10-
### Added
9+
- Update to Zephyr 3.5
10+
- Enable ZMK Studio support
1111

12-
- WHKB Pro2 Rev A support.
12+
### 🐛 Bug Fixes
1313

14-
### Changed
14+
- Reintroduce power off after each scan
1515

16-
- Upgraded to Zephyr 3.2 and latest ZMK.
17-
- New project layout based on Zephyr recommendations.
16+
### 🚜 Refactor
1817

19-
## 1.0.0 - 2022-05-13
18+
- Rework polling system and expose warm_up time tunable
2019

21-
Initial release.
20+
### 📚 Documentation
2221

23-
[unreleased]: https://github.com/kanru/hhkb-zmk/compare/039f708e5301819adebd99227f8592b7cd955ebe...HEAD
22+
- Add hhkb_nicenano_v2_Schematics
23+
24+
### ⚙️ Miscellaneous Tasks
25+
26+
- Update gitignore
27+
28+
## [1.0.0] - 2023-11-12
29+
30+
### 🚀 Features
31+
32+
- Config a button to sense wake up signal
33+
- New project layout and new boards support
34+
35+
### 🐛 Bug Fixes
36+
37+
- Build with zephyr 3.0 update
38+
- More conservative timing
39+
- New zephyr import path
40+
- New zephyr import path
41+
42+
### 💼 Other
43+
44+
- Fix typo in github workflow
45+
- Update zmk image to 3.0
46+
- Zephyr 3.2 update
47+
- Remove direct drivers dependency for zephyr 3.2 update
48+
- Rename module to hhkb_drivers and add back drivers dependency for zephyr 3.2 update
49+
- Add zmk drivers to extra modules list
50+
51+
### 🚜 Refactor
52+
53+
- Extract wake sensor to a driver
54+
- Simplify code by using static GPIO_DT_SPEC_INST_GET
55+
56+
### 📚 Documentation
57+
58+
- Add README.md
59+
- Add LICENSE
60+
- Format README
61+
- Add some images
62+
63+
<!-- generated by git-cliff -->

build.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,9 @@
1515
include:
1616
- board: whkb_pro2
1717
shield: hhkb_pro2
18+
snippet: studio-rpc-usb-uart
19+
cmake-args: -DCONFIG_ZMK_STUDIO=y
1820
- board: nice_nano_v2
1921
shield: hhkb_pro2 custom_pro2
22+
snippet: studio-rpc-usb-uart
23+
cmake-args: -DCONFIG_ZMK_STUDIO=y

config/boards/arm/whkb_pro2/whkb_pro2.dts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
status = "okay";
5959
};
6060

61-
&usbd {
61+
zephyr_udc0: &usbd {
6262
status = "okay";
6363
cdc_acm_uart: cdc_acm_uart {
6464
compatible = "zephyr,cdc-acm-uart";
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
if SHIELD_CUSTOM_PRO2
22

33
config ZMK_KEYBOARD_NAME
4-
default "Custom HHKB Pro2"
4+
default "HHKB Pro2"
55

6-
endif
6+
endif
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
#include <physical_layouts.dtsi>
2+
3+
/ {
4+
hhkb_pro2_layout: hhkb_pro2_layout {
5+
compatible = "zmk,physical-layout";
6+
display-name = "HHKB";
7+
8+
keys // w h x y rot rx ry
9+
= <&key_physical_attrs 100 100 0 0 0 0 0>
10+
, <&key_physical_attrs 100 100 100 0 0 0 0>
11+
, <&key_physical_attrs 100 100 200 0 0 0 0>
12+
, <&key_physical_attrs 100 100 300 0 0 0 0>
13+
, <&key_physical_attrs 100 100 400 0 0 0 0>
14+
, <&key_physical_attrs 100 100 500 0 0 0 0>
15+
, <&key_physical_attrs 100 100 600 0 0 0 0>
16+
, <&key_physical_attrs 100 100 700 0 0 0 0>
17+
, <&key_physical_attrs 100 100 800 0 0 0 0>
18+
, <&key_physical_attrs 100 100 900 0 0 0 0>
19+
, <&key_physical_attrs 100 100 1000 0 0 0 0>
20+
, <&key_physical_attrs 100 100 1100 0 0 0 0>
21+
, <&key_physical_attrs 100 100 1200 0 0 0 0>
22+
, <&key_physical_attrs 100 100 1300 0 0 0 0>
23+
, <&key_physical_attrs 100 100 1400 0 0 0 0>
24+
, <&key_physical_attrs 150 100 0 100 0 0 0>
25+
, <&key_physical_attrs 100 100 150 100 0 0 0>
26+
, <&key_physical_attrs 100 100 250 100 0 0 0>
27+
, <&key_physical_attrs 100 100 350 100 0 0 0>
28+
, <&key_physical_attrs 100 100 450 100 0 0 0>
29+
, <&key_physical_attrs 100 100 550 100 0 0 0>
30+
, <&key_physical_attrs 100 100 650 100 0 0 0>
31+
, <&key_physical_attrs 100 100 750 100 0 0 0>
32+
, <&key_physical_attrs 100 100 850 100 0 0 0>
33+
, <&key_physical_attrs 100 100 950 100 0 0 0>
34+
, <&key_physical_attrs 100 100 1050 100 0 0 0>
35+
, <&key_physical_attrs 100 100 1150 100 0 0 0>
36+
, <&key_physical_attrs 100 100 1250 100 0 0 0>
37+
, <&key_physical_attrs 150 100 1350 100 0 0 0>
38+
, <&key_physical_attrs 175 100 0 200 0 0 0>
39+
, <&key_physical_attrs 100 100 175 200 0 0 0>
40+
, <&key_physical_attrs 100 100 275 200 0 0 0>
41+
, <&key_physical_attrs 100 100 375 200 0 0 0>
42+
, <&key_physical_attrs 100 100 475 200 0 0 0>
43+
, <&key_physical_attrs 100 100 575 200 0 0 0>
44+
, <&key_physical_attrs 100 100 675 200 0 0 0>
45+
, <&key_physical_attrs 100 100 775 200 0 0 0>
46+
, <&key_physical_attrs 100 100 875 200 0 0 0>
47+
, <&key_physical_attrs 100 100 975 200 0 0 0>
48+
, <&key_physical_attrs 100 100 1075 200 0 0 0>
49+
, <&key_physical_attrs 100 100 1175 200 0 0 0>
50+
, <&key_physical_attrs 225 100 1275 200 0 0 0>
51+
, <&key_physical_attrs 225 100 0 300 0 0 0>
52+
, <&key_physical_attrs 100 100 225 300 0 0 0>
53+
, <&key_physical_attrs 100 100 325 300 0 0 0>
54+
, <&key_physical_attrs 100 100 425 300 0 0 0>
55+
, <&key_physical_attrs 100 100 525 300 0 0 0>
56+
, <&key_physical_attrs 100 100 625 300 0 0 0>
57+
, <&key_physical_attrs 100 100 725 300 0 0 0>
58+
, <&key_physical_attrs 100 100 825 300 0 0 0>
59+
, <&key_physical_attrs 100 100 925 300 0 0 0>
60+
, <&key_physical_attrs 100 100 1025 300 0 0 0>
61+
, <&key_physical_attrs 100 100 1125 300 0 0 0>
62+
, <&key_physical_attrs 175 100 1225 300 0 0 0>
63+
, <&key_physical_attrs 100 100 1400 300 0 0 0>
64+
, <&key_physical_attrs 100 100 150 400 0 0 0>
65+
, <&key_physical_attrs 150 100 250 400 0 0 0>
66+
, <&key_physical_attrs 600 100 400 400 0 0 0>
67+
, <&key_physical_attrs 150 100 1000 400 0 0 0>
68+
, <&key_physical_attrs 100 100 1150 400 0 0 0>
69+
;
70+
};
71+
};

config/boards/shields/hhkb_pro2/hhkb_pro2.keymap

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
fn_layer {
2525
bindings = <
2626
&kp K_POWER &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp INS &kp DEL
27-
&kp CAPS &trans &trans &trans &sys_reset &trans &trans &bootloader &kp PSCRN &kp SLCK &kp PAUSE_BREAK &kp UP &trans &kp BSPC
27+
&kp CAPS &trans &trans &trans &sys_reset &studio_unlock &trans &bootloader &kp PSCRN &kp SLCK &kp PAUSE_BREAK &kp UP &trans &kp BSPC
2828
&mo BT &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &kp C_EJECT &trans &kp KP_MULTIPLY &kp KP_DIVIDE &kp HOME &kp PG_UP &kp LEFT &kp RIGHT &trans
2929
&trans &trans &trans &trans &trans &trans &kp KP_PLUS &kp KP_MINUS &kp END &kp PG_DN &kp DOWN &trans &trans
3030
&trans &trans &trans &trans &trans
@@ -40,5 +40,13 @@
4040
&none &none &none &none &none
4141
>;
4242
};
43+
44+
extra1 {
45+
status = "reserved";
46+
};
47+
48+
extra2 {
49+
status = "reserved";
50+
};
4351
};
4452
};

config/boards/shields/hhkb_pro2/hhkb_pro2.overlay

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
#include <dt-bindings/zmk/matrix_transform.h>
22
#include <dt-bindings/zmk/kscan_mock.h>
33

4+
#include "hhkb_pro2-layout.dtsi"
5+
46
/ {
57
chosen {
6-
zmk,kscan = &kscan0;
7-
zmk,matrix_transform = &default_transform;
8+
zmk,physical-layout = &hhkb_pro2_layout;
89
};
910

1011
kscan0: kscan0 {
@@ -33,4 +34,9 @@
3334
RC(3,5) RC(3,6) RC(3,7) RC(5,7) RC(5,6)
3435
>;
3536
};
36-
};
37+
};
38+
39+
&hhkb_pro2_layout {
40+
kscan = <&kscan0>;
41+
transform = <&default_transform>;
42+
};

0 commit comments

Comments
 (0)