urob / zmk-helpers Goto Github PK
View Code? Open in Web Editor NEWConvenience macros simplifying ZMK's keymap configuration
License: MIT License
Convenience macros simplifying ZMK's keymap configuration
License: MIT License
When I use ZMK_UNICODE_SINGLE(euro_sign, N2, N0, A, C)
, the output of the keyboard is u20ac
instead of €
.
My chip is Seeed Studio XIAO nRF52840 Sense, my computer is a Mac mini with macOS 14.
Any help is appreciated.
My profile.
So after long while I could refrence the files, but I can not get them to work, every time i try to build with them I get this error
devicetree error: /tmp/zmk-config/config/german.dtsi:6 (column 1): parse error: expected '/' or label reference (&foo)
When I remove the unicode, there is no problem building it and my repo: https://github.com/haShinui/zmk_test
Any idea how to fix this?
I have setup zmk-nodefree-config to work with HOST_OS 2
/ macOS and I'm using the Unicode Hex Input
. The keyboard is connected via bluetooth, I have CONFIG_ZMK_BLE_PASSKEY_ENTRY
enabled.
Now every once in a while, when typing my ZMK_UNICODE_PAIR
the connection suddenly closes. The Mac shows that the keyboard is disconnected and the computer does not take any inputs from either halve.
I then have to remove the connection on the Mac "Forget...", remove the profile on the keyboard and connect again. It then works again.
This only happens sometime and cannot be reproduced consistently, however, it often occurs when I press another letter immediately after the ZMK_UNICODE_PAIR
. It seems to me, that while sending the unicode sequence, inbetween it tries to send the other letter I pressed and then is stuck.
Does anyone else have this problem and is there a solution to it?
Thanks.
It would be useful the be able to have a windows and linux version of a unicode macro at the same time, so you can toggle depending on what system the keyboard is connected to
Thank you for these macros, they looks great. Would you mind adding a LICENSE like MIT?
Hello urob,
i have created a custom shield for my 3d printed handwired corne keyboard. That works until I would like to integrate the nodefree submodule and build it via github actions. Build error when building it tries to find "3dpcorne" shield from the official keyboards. It does not recognize the shield within the repository for building the firmware. How can i build the firmware with the custom shield?
The shifted version of behaviors created with ZMK_UNICODE_PAIR
for Linux does not work correctly.
As a workaround, one can replace helper.h
from the main branch with helper.h
from the unicode_linux
branch. Caveat: One must use LEFT_SHIFT
to trigger the shifted version of behaviors created with the unicode_linux
version of ZMK_UNICODE_PAIR
. Using RIGHT_SHIFT
will result in garbled unicode sequences.
Thanks a lot for sharing your setup, it is extremely helpful! One thing I noticed is that if you use an OLED widget, it pulls the name of the current layer from the zmk layer label. I know adding this would be a breaking change, so I could see adding this as either:
If you want this added, I'm happy to put up a PR for whichever fits better with your direction.
I have a tried a few things, but nothing work for now.
I am on Windows 11, using a nice!nanov2 Corne 42 keys.
First try: macros are printed on screen but not the char.
Second try: I use WinCompose but it does not solves the problem.
Third try: I set the HOST_OS variable to 2. Now macros are not printed, but nothing is at all. When not on an input field, I have a typical Windows sound, but I don't really know which shortcut it is trying to do.
Here is a snippet with relevant code from my config:
#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/bt.h>
#define HOST_OS 2 // To use "press LALT"
#include "../zmk-nodefree-config/helper.h"
#include "../zmk-nodefree-config/keypos_def/keypos_42keys.h" // keyposition helpers
#include "../zmk-nodefree-config/international_chars/french.dtsi"
...
/ {
keymap {
compatible = "zmk,keymap";
...
accents {
bindings = <
___ ___ ___ &fr_ae &fr_oe ___ /**/ ___ ___ ___ ___ ___ ___
___ &fr_a_circumflex &fr_a_grave &fr_e_grave &fr_e_acute &fr_e_circumflex /**/ ___ ___ ___ ___ ___ ___
___ &fr_o_circumflex &fr_i_diaeresis &fr_e_diaeresis &fr_c_cedilla ___ /**/ ___ ___ ___ ___ ___ ___
___ ___ ___ /**/ ___ ___ ___
>;
};
};
};
Link to my config in case it helps : https://github.com/lou-bi/zmk-config/blob/8130b7838f5ea5f3f71ea4a0fea252d06ca8b821/config/corne.keymap#L82
Sorry if its just a huge nooby problem, already solved, and that i just didn't try hard enough.
trying to build using Github workflows, I get the following error:
devicetree error: /__w/zmk-config/zmk-config/config/kyria_rev3.keymap:85 (column 132): parse error: expected number or parenthesized expression
CMake Error at /__w/zmk-config/zmk-config/zephyr/cmake/dts.cmake:205 (message):
gen_defines.py failed with return code: 1
Call Stack (most recent call first):
/__w/zmk-config/zmk-config/zephyr/cmake/app/boilerplate.cmake:542 (include)
-- Configuring incomplete, errors occurred!
/__w/zmk-config/zmk-config/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
/__w/zmk-config/zmk-config/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:35 (include_boilerplate)
CMakeLists.txt:15 (find_package)
FATAL ERROR: command exited with status 1: /usr/local/bin/cmake -DWEST_PYTHON=/usr/bin/python3 -B/__w/zmk-config/zmk-config/build -S/__w/zmk-config/zmk-config/zmk/app -GNinja -DBOARD=nice_nano_v2 -DZMK_CONFIG=/__w/zmk-config/zmk-config/config -DSHIELD=kyria_rev3_left
Error: Process completed with exit code 1.
I was able to successfully build using a default keymap
Working from this repo (https://github.com/urob/zmk-config) and trying to use unicode pair functions through my Glove80, I followed the instructions and set the correct OS in base.keymap
as such:
#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/bt.h>
#define HOST_OS 1 // Linux
#include "../zmk-nodefree-config/helper.h"
#include "../zmk-nodefree-config/international_chars/greek.dtsi"
But upon pressing one of the keys with the greek letters, this is what gets inputted by my keyboard (as recorded by xev):
108 Alt_R
30 u
19 0
12 3
54 c
16 7
36 Return
This looks like the correct way to input unicode using Alt-codes, so perhaps the OS setting isn't being read?
On my Corne 42, for french accents, I've notice that when using dead key, it works intermittently.
Xudongz on Discord did help me tracking the issue, and it works well when using the &kp APOS + &kp x
code, but sometimes works, sometimes not with &kp APOS + &hmr x x
.
Is there some kind of setting to adjust to be able to use both your timeless HRM and the dead key ?
I can give more details if needed, but I don't think the debug process was relevant
I tried to implement the unicode function for german umlaute and just can't get the build done. It always fails with the following message:
devicetree error: /__w/zmk-config/zmk-config/config/german.dtsi:2 (column 84): parse error: malformed value
Any idea what I'm doing wrong?
I would like to use the german umlauts with Windows 10.
To achive this, I added with #include
the files helper.h
and german.dtsi
to the keymap-file.
I would then expect &de_ae
to be recognized as an ä, but I get u00e4
instead. So basicly the Unicode, but not the character for it.
Any idea what I have misconfigured?
Depending on the application, CTRL
and SHIFT
might need to be pressed for the whole sequence (except for the terminating SPACE
). Here's the script I'm using right now,
ZMK_BEHAVIOR(iris_sep, macro,
wait-ms = <5>;
tap-ms = <5>;
bindings = <¯o_press &kp LCTRL &kp LSHFT> ,
<¯o_tap &kp U &kp N2 &kp N2 &kp N1 &kp N7 &kp SPACE> ,
<¯o_release &kp LSHFT &kp LCTRL>;
)
For my limited test (well, Firefox, thunderbird, and Emacs), "pressing throughout" style works for all of them, but the current macro doesn't work in Emacs.
I tried gcc -E corne.keymap
but nothing happened
ZMK_BEHAVIOR(tmux_left, macro,
wait-ms = <0>;
tap-ms = <5>;
bindings = <&kp LC(A) &kp H>;
)
https://github.com/lsshawn/corne-zmk/blob/f9514af7ffbd0659245a88ec1488e9c4fd61bf7c/config/corne.keymap#L188 here's my keymap.
I noticed that the macro only register the first keypress.
I'm trying to create a full layout of Ukrainian characters, creating ukrainian.dtsi similar to the ones in this repo (should be available https://github.com/vlnn/samoklava-zmk-config/blob/test-zmk-nodefree-config/zmk-nodefree-config/international_chars/ukrainian.dtsi). It mostly works -- except several, well, exceptions:
ZMK_UNICODE_PAIR(ua_a, N0, N4, N3, N0, N0, N4, N1, N0) // а/А
and
ZMK_UNICODE_PAIR(ua_r, N0, N4, N4, N0, N0, N4, N2, N0) // р/Р
They are just ignored on my MacBook. Any hints/ideas/proposals on how to work this through/around?
I'm trying to use your amazing timeless homerow mod on my Kinesis 360 by using your adv360-demo-config repository as a base and as a first step trying to add zmk-nodefree-config
.
I've added the zmk-nodefree-config
repository as a submodule to the adv360-demo-config
root but builds fail with:
/__w/adv360-demo-config/adv360-demo-config/config/adv360pro.keymap:8:10: fatal error: ../zmk-nodefree-config/helper.h: No such file or directory
Here is the build: https://github.com/tymm/adv360-demo-config/actions/runs/5708421380/job/15466158281
And here is the underlying commit: urob/adv360-demo-config@e2182fe
Thank you for your great work.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.