Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Sofle Keyboard #118

Merged
merged 18 commits into from Sep 1, 2020
Merged

Add Sofle Keyboard #118

merged 18 commits into from Sep 1, 2020

Conversation

CrossR
Copy link
Contributor

@CrossR CrossR commented Aug 21, 2020

Adds the Sofle keyboard - https://josefadamcik.github.io/SofleKeyboard/

I figure since its an open source board that vendors sell, it makes sense to be in the main repo, at least with my understanding of the current line between in-repo and out-of-repo.

Leaving as a draft as there is a few issues/open questions, and I've not built/tested the board yet.

  • Not 100% on the key codes I've added....the HID document says they are Unix only?
  • Want to check for a sensible value for the encoder resolution, though I believe it can depend on the model used.
  • Format the files. Most files are formatted with tabs, though the main dtsi and keymap are using spaces. Can swap if preferred, though files with such odd formatting to align the key layout may warrant spaces over tabs?
  • Fix up Copyright and remove? Swap to my or the Sofle authors name? Not sure which.

Currently getting a build error when running west build --pristine -b nice_nano -- -DSHIELD=sofle_left -DKEYMAP=default:

-- west build: making build dir /Users/rcross/git/zmk/app/build pristine
-- west build: generating a build system
-- Using keymap file: /Users/rcross/git/zmk/app/boards/shields/sofle/sofle.keymap
Including boilerplate (Zephyr base): /Users/rcross/git/zmk/zephyr/cmake/app/boilerplate.cmake
-- Application: /Users/rcross/git/zmk/app
-- Zephyr version: 2.3.0 (/Users/rcross/git/zmk/zephyr)
-- Found Python3: /Users/rcross/.virtualenvs/zmk-AM_8x1ul-py3.8/bin/python3 (found suitable exact version "3.8.5") found components: Interpreter 
-- Board: nice_nano
-- Found west: /Users/rcross/.virtualenvs/zmk-AM_8x1ul-py3.8/bin/west (found suitable version "0.7.3", minimum required is "0.7.1")
-- Found dtc: /usr/local/bin/dtc (found suitable version "1.6.0", minimum required is "1.4.6")
-- Found toolchain: gnuarmemb (/Users/rcross/git/arm_zmk/gcc-arm)
-- Found BOARD.dts: /Users/rcross/git/zmk/app/boards/arm/nice_nano/nice_nano.dts
-- Found devicetree overlay: /Users/rcross/git/zmk/app/boards/shields/sofle/sofle_left.overlay
-- Found devicetree overlay: /Users/rcross/git/zmk/app/boards/shields/sofle/sofle.keymap
Error: nice_nano.dts.pre.tmp:698.80-81 syntax error
FATAL ERROR: Unable to parse input tree
CMake Error at /Users/rcross/git/zmk/zephyr/cmake/dts.cmake:195 (message):
  command failed with return code: 1
Call Stack (most recent call first):
  /Users/rcross/git/zmk/zephyr/cmake/app/boilerplate.cmake:510 (include)
  /Users/rcross/git/zmk/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
  /Users/rcross/git/zmk/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:35 (include_boilerplate)
  CMakeLists.txt:18 (find_package)


-- Configuring incomplete, errors occurred!
FATAL ERROR: command exited with status 1: /usr/local/bin/cmake -B/Users/rcross/git/zmk/app/build -S/Users/rcross/git/zmk/app -GNinja -DBOARD=nice_nano -DSHIELD=sofle_left -DKEYMAP=default

This is on macOS, and the other boards are fine so most likely a dumb mistake somewhere.

Welcome any help or feedback!

Copy link
Contributor

@petejohanson petejohanson left a comment

A few minor comments.

For the build error, check out build/zephr/nice_nano.dts.pre.tmp at line 698 for the syntax error.

@@ -0,0 +1,8 @@
# Copyright (c) 2020 Pete Johanson
Copy link
Contributor

@petejohanson petejohanson Aug 22, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be you!

@@ -0,0 +1,93 @@
/*
* Copyright (c) 2020 Pete Johanson
Copy link
Contributor

@petejohanson petejohanson Aug 22, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If copied from mine, keep my copyright, add yours.

// | | | | | | | | | | | |
bindings = <
&trans &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11
&kp GRAV &kp 1 &kp 2 &kp 3 &kp 4 &kp 5 &kp 6 &kp 7 &kp 8 &kp 9 &kp 0 &kp F12
Copy link
Contributor

@petejohanson petejohanson Aug 22, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should all be NUM_1, NUM_2, etc.

bindings = <
&trans &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11
&kp GRAV &kp 1 &kp 2 &kp 3 &kp 4 &kp 5 &kp 6 &kp 7 &kp 8 &kp 9 &kp 0 &kp F12
&trans &kp BANG &kp ATSN &kp HASH &kp CURU &kp PRCT &kp CRRT &kp AMPS &kp KMLT &kp LPRN &kp RPRN &kp PIPE
Copy link
Contributor

@petejohanson petejohanson Aug 22, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, these are not really the HID keycodes you want. This needs "shifted keycodes"

@@ -0,0 +1,26 @@
/*
* Copyright (c) 2020 Pete Johanson
Copy link
Contributor

@petejohanson petejohanson Aug 22, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto on copyright.

@@ -0,0 +1,30 @@
/*
* Copyright (c) 2020 Pete Johanson
Copy link
Contributor

@petejohanson petejohanson Aug 22, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto.

Copy link
Contributor

@petejohanson petejohanson left a comment

One minor comment. There are a few other small files also missing headers, I'm trying to be better about being consistent here, so please add to those too. Thanks.

app/boards/shields/sofle/Kconfig.defconfig Show resolved Hide resolved
@CrossR CrossR marked this pull request as ready for review Sep 1, 2020
Copy link
Contributor

@petejohanson petejohanson left a comment

Thanks!

@petejohanson petejohanson merged commit c80b0a7 into zmkfirmware:main Sep 1, 2020
1 check passed
MangoIV pushed a commit to MangoIV/zmk that referenced this pull request Dec 18, 2020
tyalie pushed a commit to tyalie/zmk that referenced this pull request Nov 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants