Skip to content

Commit

Permalink
Initial commit, simple configuration with 2 layers.
Browse files Browse the repository at this point in the history
Remember to tap the OUT_BLE key at least once; default output destination is USB.
  • Loading branch information
tubbytwins committed Oct 25, 2024
1 parent 1c3f962 commit bdffb65
Show file tree
Hide file tree
Showing 10 changed files with 170 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
on: [push, pull_request, workflow_dispatch]

jobs:
build:
uses: zmkfirmware/zmk/.github/workflows/build-user-config.yml@main
20 changes: 20 additions & 0 deletions build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# This file generates the GitHub Actions matrix
# For simple board + shield combinations, add them
# to the top level board and shield arrays, for more
# control, add individual board + shield combinations to
# the `include` property, e.g:
#
# board: [ "nice_nano_v2" ]
# shield: [ "corne_left", "corne_right" ]
# include:
# - board: bdn9_rev2
# - board: nice_nano_v2
# shield: reviung41
#
---
include:
- board: nice_nano_v2
shield: bsag_nine_nano
- board: nice_nano_v2
shield: settings_reset

13 changes: 13 additions & 0 deletions config/boards/shields/bsag_nine_nano/Kconfig.defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright (c) 2022 The ZMK Contributors
# SPDX-License-Identifier: MIT
#
# Remember: for BT keyboards, the length of ZMK_KEYBOARD_NAME has to be under 16 characters.

if SHIELD_BSAG_NINE_NANO

config ZMK_KEYBOARD_NAME
default "BSAG NineNano L"

endif


7 changes: 7 additions & 0 deletions config/boards/shields/bsag_nine_nano/Kconfig.shield
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Copyright (c) 2022 The ZMK Contributors
# SPDX-License-Identifier: MIT

config SHIELD_BSAG_NINE_NANO
def_bool $(shields_list_contains,bsag_nine_nano)


2 changes: 2 additions & 0 deletions config/boards/shields/bsag_nine_nano/bsag_nine_nano.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y

43 changes: 43 additions & 0 deletions config/boards/shields/bsag_nine_nano/bsag_nine_nano.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/

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

/ {

chosen {
zmk,kscan = &kscan0;
zmk,matrix_transform = &default_transform;
};

default_transform: keymap_transform_0 {
compatible = "zmk,matrix-transform";
columns = <9>;
rows = <1>;
map = <
RC(0,0) RC(0,1) RC(0,2)
RC(0,3) RC(0,4) RC(0,5) RC(0,6)
RC(0,7) RC(0,8)
>;
};

kscan0: kscan {
compatible = "zmk,kscan-gpio-direct";
label = "KSCAN";
input-gpios
= <&gpio0 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&gpio0 29 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&gpio0 31 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&gpio1 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&gpio0 11 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&gpio1 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&gpio0 24 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&gpio1 13 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
, <&gpio1 11 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
;
};

};
53 changes: 53 additions & 0 deletions config/boards/shields/bsag_nine_nano/bsag_nine_nano.keymap
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/*
* Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/

#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/bt.h>
#include <dt-bindings/zmk/outputs.h>


// 0 1 2
// 3 4 5 6
// 7 8


/ {
behaviors {
td: tapdance {
compatible = "zmk,behavior-hold-tap";
label = "TAPDANCE";
#binding-cells = <2>;
tapping-term-ms = <190>;
quick-tap-ms = <250>;
flavor = "tap-preferred";
bindings = <&kp>, <&kp>;
};
};

keymap {
compatible = "zmk,keymap";

base {
label = "Base";
bindings = <
&kp W &kp E &kp R
&kp A &kp S &kp D &kp F
&kp SPACE &tog 1
>;
};

system {
label = "System";
bindings = <
&kp TAB &kp UP &kp RET
&bt BT_CLR &kp LEFT &kp DOWN &kp RIGHT
&out OUT_BLE &trans

>;
};
};
};
8 changes: 8 additions & 0 deletions config/boards/shields/bsag_nine_nano/bsag_nine_nano.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/*
* Copyright (c) 2022 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/

#include "bsag_nine_nano.dtsi"

8 changes: 8 additions & 0 deletions config/boards/shields/bsag_nine_nano/bsag_nine_nano.zmk.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
file_format: "1"
id: bsag_nine_nano
name: bsag_nine_nano
type: shield
url: https://github.com/bsag/
requires: [pro_micro]
features:
- keys
11 changes: 11 additions & 0 deletions config/west.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
manifest:
remotes:
- name: zmkfirmware
url-base: https://github.com/zmkfirmware
projects:
- name: zmk
remote: zmkfirmware
revision: main
import: app/west.yml
self:
path: config

0 comments on commit bdffb65

Please sign in to comment.