sofle support added

This commit is contained in:
mctechnology17 2025-01-03 16:58:45 +01:00 committed by github-actions[bot]
parent 9780f60810
commit ae477ef936
28 changed files with 3048 additions and 12 deletions

140
config/sofle.conf Normal file
View file

@ -0,0 +1,140 @@
# ========================================
# FileName: sofle.conf
# Date: 03.01.2025
# Author: Marcos Chow Castro
# Email: mctechnology170318@gmail.com
# GitHub: https://github.com/mctechnology17
# Brief: configuration file for ZMK firmware
# Board: nice_nano_v2 and puchi_ble_v1
# ╔═╦═╦═╗
# ╔════╗ ║║║║║╔╝
# ║╔╗╔╗║ ║║║║║╚╗
# ╚╝║║╚╝ ║╠═╩╩═╝
# ║╠═╦═╣╚╦═╦╦═╦╗╔═╦═╦╦╗
# ║║╩╣═╣║║║║║╬║╚╣╬║╬║║║
# ╚╩═╩═╩╩╩╩═╩═╩═╩═╬╗╠╗║
# ╚═╩═╝
# Copyright (c) 2020 The ZMK Contributors
# SPDX-License-Identifier: MIT
# =========================================
# on config_zmk.h file enable/disable the following options, if you want to
# use CONFIG_ZMK_MOUSE=y, CONFIG_ZMK_RGB_UNDERGLOW=y, CONFIG_ZMK_RGB_UNDERGLOW=y
# mouse config, 1 = enable, 0 = disable, default = 1
# 2 = enable, but with rgb matrix
# #define MC_TECHNOLOGY_MOUSE_ENABLE 1
# rgb matrix config, 1 = enable, 0 = disable, default = 0
# #define MC_TECHNOLOGY_RGB_ENABLE 0
# define macros on for .dtsi file 1 = enable, 0 = disable default = 1
# #define MC_TECHNOLOGY_MACROS_ENABLE 1
### Keyboard name
# CONFIG_ZMK_KEYBOARD_NAME="Nice sofle View"
# CONFIG_ZMK_KEYBOARD_NAME="Puchi sofle View"
# CONFIG_ZMK_KEYBOARD_NAME="Nice sofle Oled"
# CONFIG_ZMK_KEYBOARD_NAME="Puchi sofle Oled"
### Boost Bluetooth TX power, also make Bluetooth stronger
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
CONFIG_ZMK_BLE_EXPERIMENTAL_FEATURES=y
# Tune bluetooth profiles for quick select
# CONFIG_BT_MAX_CONN=3
# Uncomment the following line if you facing issue on win 11 connection
# Enables a combination of settings that are planned to be default in future
# versions of ZMK to improve connection stability. This includes changes to
# timing on BLE pairing initiation, restores use of the updated/new LLCP
# implementation, and disables 2M PHY support.
CONFIG_ZMK_BLE_EXPERIMENTAL_CONN=y
### POWER OPTIONS
CONFIG_ZMK_SLEEP=y
CONFIG_ZMK_EXT_POWER=y
# 15 min (15*60*1000ms)
# CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=900000
# 1 min Número de milisegundos de inactividad antes de entrar en estado inactivo
# CONFIG_ZMK_IDLE_TIMEOUT=60000
# 30 min (30*60*1000ms)
# CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=1800000
# CONFIG_ZMK_IDLE_TIMEOUT=120000
# Disable external power when not connected to USB
# CONFIG_ZMK_EXT_POWER_USB_ONLY=y
### MOUSE
# https://github.com/zmkfirmware/zmk/blob/main/docs/docs/keymaps/behaviors/mouse-emulation.md
CONFIG_ZMK_MOUSE=y
### ZMK STUDIO
# MC: 2. zmk-studio test START
# https://github.com/zmkfirmware/zmk/blob/main/docs/docs/config/studio.md
CONFIG_ZMK_STUDIO=y
CONFIG_ZMK_STUDIO_LOCKING=n
# MC: zmk-studio test END
### RGB UNDERGLOW
# uncomment to enable RGB Underglow or backlight
# CONFIG_ZMK_RGB_UNDERGLOW=y
# CONFIG_WS2812_STRIP=y
# apaga si no se usa el teclado
# CONFIG_ZMK_RGB_UNDERGLOW_AUTO_OFF_IDLE=y
# 0 Solid color 1 Breathe 2 Spectrum 3 Swirl
# CONFIG_ZMK_RGB_UNDERGLOW_EFF_START=3
# nivel de brillo en porcentaje, el valor por defecto es 10 por ciento
# CONFIG_ZMK_RGB_UNDERGLOW_BRT_STEP=1
# Turn off RGB underglow when keyboard goes into idle state
# CONFIG_ZMK_RGB_UNDERGLOW_AUTO_OFF_IDLE=y
# # Hue step in degrees (0-359) used by RGB actions default 10
# CONFIG_ZMK_RGB_UNDERGLOW_HUE_STEP=30
# # Brightness step in percent used by RGB actions default 10
# CONFIG_ZMK_RGB_UNDERGLOW_SAT_STEP=2
# CONFIG_ZMK_RGB_UNDERGLOW_HUE_START=240
# CONFIG_ZMK_RGB_UNDERGLOW_SAT_START=10
# CONFIG_ZMK_RGB_UNDERGLOW_BRT_START=15
# Uncomment the line below to disable external power toggling by the underglow.
# By default toggling the underglow on and off also toggles external power
# on and off. This also causes the display to turn off.
# CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=n
### OLED DISPLAY
CONFIG_ZMK_DISPLAY=y
CONFIG_ZMK_DISPLAY_STATUS_SCREEN_CUSTOM=y
# esto creo que ya no es necesario
# CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED=y
# CONFIG_ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN=y
### WIDGET SETTINGS
# No Widget configurations added since nice!view has its own custom widgets
# activar solo estos dos widgets
# CONFIG_ZMK_WIDGET_WPM_STATUS=n
# CONFIG_ZMK_WIDGET_BATTERY_STATUS_SHOW_PERCENTAGE=y
# CONFIG_ZMK_WIDGET_LAYER_STATUS=y
# CONFIG_ZMK_WIDGET_BATTERY_STATUS=y
# CONFIG_ZMK_WIDGET_OUTPUT_STATUS=y
### HID para nice!view ePaperDisplay
# Enable eager debouncing
# "Eager Debouncing"
# Trying to lower the input lag.
CONFIG_ZMK_KSCAN_DEBOUNCE_PRESS_MS=1
CONFIG_ZMK_KSCAN_DEBOUNCE_RELEASE_MS=5
### Improves compatibility with iPad
# ref: https://zmk.dev/docs/config/system#hid
CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=y
# RDP compatibility.
# CONFIG_ZMK_HID_SEPARATE_MOD_RELEASE_REPORT=y
# NKRO
# CONFIG_ZMK_HID_REPORT_TYPE_NKRO=y
# enable F13-F24
# CONFIG_ZMK_HID_KEYBOARD_NKRO_EXTENDED_REPORT=y
### DEBUG OPTIONS
# CONFIG_ZMK_USB_LOGGING=y
# CONFIG_LOG_PROCESS_THREAD_STARTUP_DELAY_MS=8000
### ENABLE ENCODER
CONFIG_EC11=y
CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y

94
config/sofle.keymap Normal file
View file

@ -0,0 +1,94 @@
/*
* Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#include <behaviors.dtsi>
#include <dt-bindings/zmk/bt.h>
#include <dt-bindings/zmk/ext_power.h>
#include <dt-bindings/zmk/keys.h>
/ {
keymap {
compatible = "zmk,keymap";
default_layer {
// ------------------------------------------------------------------------------------------------------------
// | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | |
// | ESC | Q | W | E | R | T | | Y | U | I | O | P | BKSPC |
// | TAB | A | S | D | F | G | | H | J | K | L | ; | ' |
// | SHIFT | Z | X | C | V | B | MUTE | | | N | M | , | . | / | SHIFT |
// | GUI | ALT | CTRL | LOWER| ENTER | | SPACE | RAISE| CTRL | ALT | GUI |
bindings = <
&kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS
&kp ESC &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSPC
&kp TAB &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp C_MUTE &kp C_MUTE &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT
&kp LGUI &kp LALT &kp LCTRL &mo 1 &kp RET &kp SPACE &mo 2 &kp RCTRL &kp RALT &kp RGUI
>;
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>;
};
lower_layer {
// TODO: Some binds are waiting for shifted keycode support.
// ------------------------------------------------------------------------------------------------------------
// | ` | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 |
// | RAISE | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | F12 |
// | | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | |
// | | = | - | + | { | } | | | | [ | ] | ; | : | \ | |
// | | | | | | | | | | | |
bindings = <
&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11
&mo 2 &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp F12
&trans &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp KP_MULTIPLY &kp LPAR &kp RPAR &kp PIPE
&trans &kp EQUAL &kp MINUS &kp KP_PLUS &kp LBRC &kp RBRC &trans &trans &kp LBKT &kp RBKT &kp SEMI &kp COLON &kp BSLH &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
>;
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>;
};
raise_layer {
// ------------------------------------------------------------------------------------------------------------
// |BTCLR| BT1 | BT2 | BT3 | BT4 | BT5 | | | | | | | |
// | | INS | PSCR | GUI | | | | PGUP | | | | | |
// | | ALT | CTRL | SHIFT | | CAPS | | <- | v | ^ | -> | DEL | BKSPC |
// | | UNDO | CUT | COPY | PASTE | | | | | | | | | | |
// | | | | | | | | | | | |
bindings = <
&bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &trans &trans &trans &trans &trans &trans
&trans &kp INS &kp PSCRN &kp K_CMENU &trans &trans &kp PG_UP &trans &trans &trans &kp N0 &trans
&trans &kp LALT &kp LCTRL &kp LSHFT &trans &kp CLCK &kp LEFT &kp DOWN &kp UP &kp RIGHT &kp DEL &kp BSPC
&trans &kp K_UNDO &kp K_CUT &kp K_COPY &kp K_PASTE &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
>;
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>;
};
layer_3 {
bindings = <
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
>;
};
layer_4 {
bindings = <
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
>;
};
};
};