Giter Club home page Giter Club logo

hhkb-zmk's Introduction

HHKB Pro 2 with ZMK firmware

This project provides an out-of-tree Zephyr module and shield definition for the HHKB Pro2 daugther board.

The hhkb_pro2 shield defines the default HHKB keymap and zmk,kscan chosen. Any board can use the hhkb_pro2 shield by defining the hhkb_pro2_connector gpio nexus node. Examples can be find in custom_pro2.overlay and whkb_pro2.dts.

Customizing

Clone this repository then add your keymap overlay to the custom_pro2 shield. You can also create more complex customization by creating entirely new boards or shields.

The default Github Actions will build the firmware using the build.yml definition.

๐Ÿ“ข If you build some custom boards or configs, please share a picture and tips to the discussion thread!

Build locally

Follow the steps in the official ZMK document to setup build environment.

Setup Zephyr

west init -l config
west update

To build nice_nano_v2 based board:

west build -s zmk/app -p -b nice_nano_v2 -- \
    -DSHIELD="hhkb_pro2 custom_pro2" \
    -DZMK_CONFIG=$PWD/config

or to build WHKB Pro2:

west build -s zmk/app -p -b whkb_pro2 -- \
    -DSHIELD=hhkb_pro2 \
    -DZMK_CONFIG=$PWD/config

The finished UF2 file is at build/zephyr/zmk.uf2

Soldering a custom board

The default configuration in custom_pro2 is based on the nice_nano_v2 board. It only uses the pins on the left side. The pins' order is upside down so the wires can be bend easily under the case.

It take advantages of the high drive capability of nRF52 GPIO to power the HHKB Pro2 daughter board.

parts

connector

board

schematics

3D Printed Mount

The 3D printed mount (@oldmanz) is designed to fit in the HHKB Pro2 case in place of the main board. It holds the Nice!Nano, a connector for the daughter board, a reset button, and a toggle switch for power.

3D Models are in the 3d_models directory.

3d_mount

3d_mount_components

3d_mount_components_2

3d_mount_soldered_poorly

3d_mount_assembled

3d_mount_rear_io

  • The usb port will need to be filed a bit to fit usb-c.
  • The switch was something I had laying around, so I am unsure of its part number.
  • The reset button is behind a 3D Printed Cap, by alienman82. A hole is drilled through it.

hhkb-zmk's People

Contributors

kanru avatar oldmanz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hhkb-zmk's Issues

Build failed

Current build steps in Actions failed. Maybe there's some update in ZMK module architecture.

Wake up from deep sleep does not work

On HHKB2 Pro custom build,

with

CONFIG_ZMK_IDLE_TIMEOUT=5000
CONFIG_ZMK_SLEEP=y
CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=900000
CONFIG_ZMK_BLE=y
CONFIG_ZMK_EXT_POWER=n
CONFIG_ZMK_BATTERY_REPORT_INTERVAL=3600

,

hhkb_pro2_connector: hhkb_pro2_connector {
        compatible = "zmk,hhkb-pro2-header";	        compatible = "zmk,hhkb-pro2-header";
        #gpio-cells = <2>;	        #gpio-cells = <2>;
        gpio-map-mask = <0xffffffff 0xffffffc0>;	        gpio-map-mask = <0xffffffff 0xffffffc0>;
        gpio-map-pass-thru = <0 0x3f>;	        gpio-map-pass-thru = <0 0x3f>;
        gpio-map = <0 0 &gpio1 6 NRF_GPIO_DRIVE_S0H1>,	        gpio-map = <0 0 &gpio1 6 NRF_GPIO_DRIVE_S0H1>,
                   <1 0 &gpio1 4 0>,	                   <1 0 &gpio1 4 0>,
                   <2 0 &gpio0 11 0>,	                   <2 0 &gpio0 11 0>,
                   <3 0 &gpio1 0 0>,	                   <3 0 &gpio1 0 0>,
                   <4 0 &gpio0 24 0>,	                   <4 0 &gpio0 24 0>,
                   <5 0 &gpio0 22 0>,	                   <5 0 &gpio0 22 0>,
                   <6 0 &gpio0 20 0>,	                   <6 0 &gpio0 20 0>,
                   <7 0 &gpio0 17 0>,	                   <7 0 &gpio0 17 0>,
                   <8 0 &gpio0 8 0>,	                   <8 0 &gpio0 8 0>,
                   <9 0 &gpio0 6 0>;	                   <9 0 &gpio0 6 0>,
                   <10 0 &gpio0 9 0>,     /* D10/A10 */
                   <19 0 &gpio0 2 0>;     /* D19/A1 */
    };	    };

, and

pm_wake_sensor {
        compatible = "zmk,pm-wake-sensor";
        status = "okay";
        power-gpios = <&hhkb_pro2_connector 19 GPIO_ACTIVE_HIGH>;
        sensor-gpios = <&hhkb_pro2_connector 10 (GPIO_ACTIVE_LOW|GPIO_PULL_DOWN)>;
    };

It doesn't wake up hhkb from sleep.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.