The macros were integrated and also the possibility of using RGB with the NiceView screen
This commit is contained in:
parent
f59c5dacad
commit
1b0227b8e9
6 changed files with 125 additions and 274 deletions
|
|
@ -1,82 +0,0 @@
|
|||
/* ========================================
|
||||
FileName: combos.dtsi
|
||||
Date: 15:17 23.September.2022
|
||||
Author: Marcos Chow Castro
|
||||
Email: mctechnology170318@gmail.com
|
||||
GitHub: https://github.com/mctechnology17
|
||||
Brief: combos keymap for the wireless corne keyboard
|
||||
╔═╦═╦═╗
|
||||
╔════╗ ║║║║║╔╝
|
||||
║╔╗╔╗║ ║║║║║╚╗
|
||||
╚╝║║╚╝ ║╠═╩╩═╝
|
||||
║╠═╦═╣╚╦═╦╦═╦╗╔═╦═╦╦╗
|
||||
║║╩╣═╣║║║║║╬║╚╣╬║╬║║║
|
||||
╚╩═╩═╩╩╩╩═╩═╩═╩═╬╗╠╗║
|
||||
╚═╩═╝
|
||||
|
||||
KEY POSITIONS
|
||||
╭────────────────────╮ ╭────────────────────╮
|
||||
│ 0 1 2 3 4 │ │ 5 6 7 8 9 │
|
||||
│ 10 11 12 13 14 │ │ 15 16 17 18 19 │
|
||||
│ 20 21 22 23 24 ╰───╮ ╭───╯ 25 26 27 28 29 │
|
||||
╰───────────╮ 30 31 32 │ │ 33 34 35 ╭───────────╯
|
||||
╰────────────╯ ╰────────────╯
|
||||
========================================= */
|
||||
|
||||
// TODO: en adaptacion
|
||||
compatible = "zmk,combos";
|
||||
|
||||
#define COMBO(NAME, BINDINGS, KEYPOS, LAYERS) \
|
||||
combo_##NAME { \
|
||||
bindings = <BINDINGS>; \
|
||||
key-positions = <KEYPOS>; \
|
||||
layers = <LAYERS>; \
|
||||
};
|
||||
|
||||
/* BRACKETS */
|
||||
COMBO(left_parenthesis, &kp LEFT_PARENTHESIS, 1 2, NUM)
|
||||
COMBO(right_parenthesis, &kp RIGHT_PARENTHESIS, 2 3, NUM)
|
||||
COMBO(parentheses, ¯o_parentheses, 1 2 3, NUM)
|
||||
COMBO(left_bracket, &kp LEFT_BRACKET, 11 12, NUM)
|
||||
COMBO(right_bracket, &kp RIGHT_BRACKET, 12 13, NUM)
|
||||
COMBO(brackets, ¯o_brackets, 11 12 13, NUM)
|
||||
COMBO(less_than, &kp LESS_THAN, 21 22, NUM)
|
||||
COMBO(greater_than, &kp GREATER_THAN, 22 23, NUM)
|
||||
COMBO(ltgt, ¯o_ltgt, 21 22 23, NUM)
|
||||
|
||||
/* TEXT PROCESSING */
|
||||
COMBO(undo, &kp LG(Z), 20 21, BASE)
|
||||
COMBO(cut, &kp LG(X), 21 23, BASE)
|
||||
COMBO(copy, &kp LG(C), 21 22, BASE)
|
||||
COMBO(paste, &kp LG(V), 21 22 23, BASE)
|
||||
COMBO(select_all, &kp LG(A), 20 23, BASE)
|
||||
COMBO(caps_word, &caps_word, 31 32, BASE)
|
||||
|
||||
/* SYSTEM */
|
||||
COMBO(power, ¯o_power, 4 5, BASE)
|
||||
COMBO(menu_search, &kp LG(LS(SLASH)), 16 17 18, BASE)
|
||||
COMBO(spotlight, &kp LG(SPACE), 11 12 13, BASE)
|
||||
COMBO(mic_mute_left, &kp LG(BACKSLASH), 13 23, BASE)
|
||||
COMBO(mic_mute_right, &kp LG(BACKSLASH), 16 26, BASE)
|
||||
|
||||
/* WINDOW MANAGEMENT */
|
||||
COMBO(tile_left, &kp LG(LC(LA(LEFT))), 26 27, BASE)
|
||||
COMBO(tile_right, &kp LG(LC(LA(RIGHT))), 27 28, BASE)
|
||||
COMBO(maximize, &kp LG(LC(LA(UP))), 26 27 28, BASE)
|
||||
COMBO(center, &kp LG(LC(LA(DOWN))), 26 28, BASE)
|
||||
|
||||
/* MEDIA */
|
||||
COMBO(volup, &kp C_VOL_UP, 7 17, NAV)
|
||||
COMBO(voldown, &kp C_VOL_DN, 17 27, NAV)
|
||||
COMBO(playpause, &kp C_PLAY_PAUSE, 26 28, NAV)
|
||||
COMBO(prev, &kp C_PREV, 26 27, NAV)
|
||||
COMBO(next, &kp C_NEXT, 27 28, NAV)
|
||||
|
||||
/* KEYBOARD */
|
||||
COMBO(reset, &reset, 11 12 13 17, BASE)
|
||||
COMBO(bootloader, &bootloader, 14 15 24 25, BASE)
|
||||
COMBO(bt0, &bt BT_SEL 0, 1 2, BASE)
|
||||
COMBO(bt1, &bt BT_SEL 1, 2 3, BASE)
|
||||
COMBO(bttog, &out OUT_TOG, 11 12 13, NAV)
|
||||
COMBO(btclear, &bt BT_CLR, 4 24, BASE)
|
||||
// vim: fdm=marker:
|
||||
|
|
@ -1,53 +1,43 @@
|
|||
### MOUSE
|
||||
# CONFIG_ZMK_MOUSE=y
|
||||
|
||||
### RGB
|
||||
# Uncomment the following lines to enable the Corne RGB Underglow
|
||||
# CONFIG_ZMK_RGB_UNDERGLOW=y
|
||||
# CONFIG_WS2812_STRIP=y
|
||||
|
||||
# Uncomment the following line to enable the Corne OLED Display
|
||||
# CONFIG_ZMK_DISPLAY=y
|
||||
# CONFIG_I2C=y
|
||||
# CONFIG_SSD1306=y
|
||||
# CONFIG_SSD1306_REVERSE_MODE=y
|
||||
# CONFIG_LVGL_HOR_RES_MAX=128
|
||||
# CONFIG_LVGL_VER_RES_MAX=32
|
||||
# CONFIG_LVGL_VDB_SIZE=64
|
||||
# CONFIG_LVGL_DPI=148
|
||||
# CONFIG_LVGL_BITS_PER_PIXEL=1
|
||||
# CONFIG_LVGL_COLOR_DEPTH_1=y
|
||||
# con esta configuracion no me compila
|
||||
# CONFIG_ZMK_WPM=y
|
||||
# CONFIG_ZMK_WIDGET_WPM_STATUS=y
|
||||
# CONFIG_ZMK_WIDGET_LAYER_STATUS=y
|
||||
# CONFIG_ZMK_WIDGET_BATTERY_STATUS=y
|
||||
# CONFIG_ZMK_WIDGET_OUTPUT_STATUS=y
|
||||
# 0 Solid color 1 Breathe 2 Spectrum 3 Swirl
|
||||
# CONFIG_ZMK_RGB_UNDERGLOW_EFF_START=2
|
||||
|
||||
# Turn off RGB underglow when keyboard goes into idle state
|
||||
# apaga los leds cuando el teclado esta en reposo, ahorrando energia
|
||||
# este no es compatible con
|
||||
# CONFIG_ZMK_RGB_UNDERGLOW_AUTO_OFF_IDLE=y
|
||||
|
||||
# Better compatibility with iPadOS
|
||||
# CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=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_BRT_STEP=10
|
||||
# ESTO NO SE ACTIVA
|
||||
# CONFIG_ZMK_RGB_UNDERGLOW_AUTO_OFF_USB=y
|
||||
|
||||
# Power options
|
||||
# CONFIG_ZMK_COMBO_MAX_COMBOS_PER_KEY=7
|
||||
# CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=5400000
|
||||
### POWER OPTIONS
|
||||
CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=600000
|
||||
CONFIG_ZMK_IDLE_TIMEOUT=120000
|
||||
CONFIG_ZMK_SLEEP=y
|
||||
|
||||
# Uncomment the following line to enable the Corne OLED Display
|
||||
CONFIG_ZMK_EXT_POWER=y # optional
|
||||
CONFIG_ZMK_DISPLAY=y
|
||||
# CONFIG_ZMK_WIDGET_OUTPUT_STATUS=y
|
||||
# CONFIG_ZMK_WIDGET_LAYER_STATUS=y
|
||||
# CONFIG_ZMK_WIDGET_WPM_STATUS=y
|
||||
# CONFIG_ZMK_WIDGET_BATTERY_STATUS=y
|
||||
|
||||
# Uncomment these two lines to add support for encoders
|
||||
# CONFIG_EC11=y
|
||||
# CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y
|
||||
|
||||
# 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
|
||||
|
||||
# Enabling Backlight
|
||||
# CONFIG_ZMK_BACKLIGHT=y
|
||||
# CONFIG_ZMK_BACKLIGHT_BRT_STEP=20
|
||||
# CONFIG_ZMK_BACKLIGHT_BRT_START=40
|
||||
# CONFIG_ZMK_BACKLIGHT_ON_START=y
|
||||
# CONFIG_ZMK_BACKLIGHT_AUTO_OFF_IDLE=n
|
||||
# CONFIG_ZMK_BACKLIGHT_AUTO_OFF_USB=n
|
||||
|
||||
# TESTS
|
||||
CONFIG_ZMK_DISPLAY=y
|
||||
CONFIG_ZMK_EXT_POWER=y
|
||||
# Turn on logging, and set ZMK logging to debug output
|
||||
#CONFIG_ZMK_USB_LOGGING=y
|
||||
|
|
|
|||
|
|
@ -16,49 +16,28 @@ Brief: keymap for the wireless corne keyboard
|
|||
Copyright (c) 2020 The ZMK Contributors
|
||||
SPDX-License-Identifier: MIT
|
||||
========================================= */
|
||||
// ### include define {{{
|
||||
// ### include {{{
|
||||
#include <behaviors.dtsi>
|
||||
#include <dt-bindings/zmk/keys.h>
|
||||
#include <dt-bindings/zmk/bt.h>
|
||||
// #include <dt-bindings/zmk/outputs.h>
|
||||
// #include <dt-bindings/zmk/ext_power.h>
|
||||
#include <dt-bindings/zmk/outputs.h>
|
||||
#include <dt-bindings/zmk/ext_power.h>
|
||||
#include "keymap_german_mac_iso_zmk.h"
|
||||
// }}}
|
||||
// ### CONFIG_ZMK_DISPLAY {{{
|
||||
#ifdef CONFIG_ZMK_DISPLAY
|
||||
# include "oled.dtsi"
|
||||
#endif // CONFIG_ZMK_DISPLAY
|
||||
//}}}
|
||||
// ### ifdef CONFIG_ZMK_RGB_UNDERGLOW {{{
|
||||
// # include <dt-bindings/led/led.h>
|
||||
// # include <../boards/shields/corne/boards/nice_nano.overlay>
|
||||
#ifdef CONFIG_ZMK_RGB_UNDERGLOW
|
||||
# include <dt-bindings/zmk/rgb.h>
|
||||
# include <dt-bindings/led/led.h>
|
||||
|
||||
/*
|
||||
* Temporarily here because nice nano v2 spi is not defined on ZMk Yet
|
||||
* Source: https://github.com/zmkfirmware/zmk/blob/main/app/boards/shields/reviung41/boards/nice_nano.overlay
|
||||
* GitHub Issue: https://github.com/zmkfirmware/zmk/issues/885
|
||||
*/
|
||||
|
||||
#include <../boards/shields/corne/boards/nice_nano.overlay>
|
||||
|
||||
// Overwrite number of leds on the keyboard. A Corne has 27 per side.
|
||||
&led_strip { chain-length = <27>; };
|
||||
|
||||
#endif // CONFIG_ZMK_RGB_UNDERGLOW
|
||||
//}}}
|
||||
// ### definiendo capas + otros {{{
|
||||
// ### define {{{
|
||||
#define DEFAULT 0
|
||||
#define NUMBER 1
|
||||
#define SYMBOL 2
|
||||
#define FUNCTION 3
|
||||
#define MEDIA 4
|
||||
#define MOUSE 5
|
||||
// TODO:
|
||||
// #define LOCK_LAYER 6
|
||||
// #define LOCK &tog LOCK_LAYER
|
||||
// #define UNLOCK &tog DEFAULT
|
||||
// #define TO_FUNCTION &tog FUNCTION
|
||||
// combinadas para optimizar espacio
|
||||
#define MEDIA_ESC < MEDIA ESC
|
||||
#define MOUSE_TAB < MOUSE TAB
|
||||
|
|
@ -85,24 +64,30 @@ SPDX-License-Identifier: MIT
|
|||
#define POS2 &kp LA(LG(NUMBER_2)) // positions of current app with carabiner integration for MacOS
|
||||
#define POS3 &kp LA(LG(NUMBER_3)) // positions of current app with carabiner integration for MacOS
|
||||
#define POS4 &kp LA(LG(NUMBER_4)) // positions of current app with carabiner integration for MacOS
|
||||
// define blueth
|
||||
#define BT(n) BT_SEL n
|
||||
//}}}
|
||||
/* ### debounce-period = <10> {{{
|
||||
&kscan0 {
|
||||
debounce-period = <10>;
|
||||
// ### macros {{{
|
||||
#define MACRO(name, keys) \
|
||||
name: name##_macro { \
|
||||
label = #name; \
|
||||
compatible = "zmk,behavior-macro";\
|
||||
#binding-cells = <0>; \
|
||||
tap-ms = <1>; \
|
||||
wait-ms = <1>; \
|
||||
bindings = <keys>; \
|
||||
};
|
||||
}}}*/
|
||||
|
||||
/ {
|
||||
macros {
|
||||
MACRO(example, &kp LS(H) &kp E &kp L &kp L &kp O)
|
||||
MACRO(mctechnology, &kp M &kp C &kp T &kp E &kp C &kp H &kp N &kp O &kp L &kp O &kp G &kp Y &kp N1 &kp N7)
|
||||
MACRO(linea, DE_END &kp LS(HOME) DE_BSPC)
|
||||
};
|
||||
};
|
||||
// }}}
|
||||
// ### keymap {{{
|
||||
/ {
|
||||
/* ### conditional_layers {{{
|
||||
conditional_layers {
|
||||
compatible = "zmk,conditional-layers";
|
||||
|
||||
tri_layer {
|
||||
if-layers = <NONE_LOCK_LAYER LOCK_LAYER>;
|
||||
then-layer = <EXTRA>;
|
||||
};
|
||||
};
|
||||
}}}*/
|
||||
keymap {
|
||||
compatible = "zmk,keymap";
|
||||
// ### default_layer {{{
|
||||
|
|
@ -124,23 +109,23 @@ SPDX-License-Identifier: MIT
|
|||
DE_LCTRL DE_LGUI DE_RALT NUMBER_SPACE SYMBOL_RGUI FUNCTION_RALT
|
||||
>;
|
||||
};
|
||||
// }}}
|
||||
// }}}}
|
||||
// ### number_layer {{{
|
||||
number_layer {
|
||||
// .-------------------------------------------------. .-------------------------------------------------.
|
||||
// | 0 | 1 | 2 | 3 | - | + | | ß | Ü | Ä | Ö | |BACKSPC |
|
||||
// |---------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+---------|
|
||||
// |CAPS_LOCK| 4 | 5 | 6 | / | * | | # | ~ | ? | @ | | ALT |
|
||||
// |CAPS_LOCK| 4 | 5 | 6 | / | * | | # | ~ | ? | @ | UP | ENTER |
|
||||
// |---------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+---------|
|
||||
// | SHIFT | 7 | 8 | 9 | % | = | | . | ´ | ` | | |ALTGR |
|
||||
// | SHIFT | 7 | 8 | 9 | % | = | | . | ´ | ` | LEFT | DOWN | RIGHT |
|
||||
// '----------------------------------------------------------| |----------------------------------------------------------'
|
||||
// | CTRL | CMD | SPACE | | | LSFT | ALTGR |
|
||||
// '--------------------------------' '--------------------------------'
|
||||
// label = "NUMBER";
|
||||
bindings = <
|
||||
DE_0 DE_1 DE_2 DE_3 DE_MINS DE_PLUS DE_SS DE_UDIA DE_ADIA DE_ODIA XXX DE_BSPC
|
||||
DE_CAPS DE_4 DE_5 DE_6 DE_SLSH DE_ASTR DE_HASH DE_TILD DE_QUES DE_AT XXX DE_LALT
|
||||
DE_LSHFT DE_7 DE_8 DE_9 DE_PERC DE_EQL DE_DOT DE_ACUT DE_GRV XXX XXX DE_RALT
|
||||
DE_CAPS DE_4 DE_5 DE_6 DE_SLSH DE_ASTR DE_HASH DE_TILD DE_QUES DE_AT DE_UP DE_RET
|
||||
DE_LSHFT DE_7 DE_8 DE_9 DE_PERC DE_EQL DE_DOT DE_ACUT DE_GRV DE_LEFT DE_DOWN DE_RIGHT
|
||||
DE_LCTRL DE_LGUI DE_SPACE XXX DE_LSHFT DE_RALT
|
||||
>;
|
||||
};
|
||||
|
|
@ -150,17 +135,17 @@ SPDX-License-Identifier: MIT
|
|||
// .------------------------------------------------. TODO: .-------------------------------------------------.
|
||||
// | $ | ( | ) | [ | ] | ~ | | ´ | ` | | | |BACKSPC |
|
||||
// |--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+---------|
|
||||
// | % | { | } | ^ |PAGE_UP| # | | & | | | | | | ALT |
|
||||
// | % | { | } | ^ |PAGE_UP| # | | & | | | | | UP | ENTER |
|
||||
// |--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+---------|
|
||||
// |SHIFT | < | > | HOME |PAGE_DO| END | | ~ | ' | | | |ALTGR |
|
||||
// |SHIFT | < | > | HOME |PAGE_DO| END | | ~ | ' | | LEFT | DOWN | RIGHT |
|
||||
// '---------------------------------------------------------| |----------------------------------------------------------'
|
||||
// | CTRL | CMD | SPACE | | ENTER | ALTGR | CTRL |
|
||||
// '--------------------------------' '--------------------------------'
|
||||
// label = "SYMBOL";
|
||||
bindings = <
|
||||
DE_DLR DE_LPRN DE_RPRN DE_LBRC DE_RBRC DE_TILD DE_ACUT DE_GRV XXX XXX XXX DE_BSPC
|
||||
DE_PERC DE_LCBR DE_RCBR DE_CARET DE_PG_UP DE_HASH DE_AMPR DE_PIPE XXX XXX XXX DE_LALT
|
||||
DE_LSHFT DE_LABK DE_RABK DE_HOME DE_PG_DN DE_END DE_TILD DE_QUOT XXX XXX XXX DE_RALT
|
||||
DE_PERC DE_LCBR DE_RCBR DE_CARET DE_PG_UP DE_HASH DE_AMPR DE_PIPE XXX XXX DE_UP DE_RET
|
||||
DE_LSHFT DE_LABK DE_RABK DE_HOME DE_PG_DN DE_END DE_TILD DE_QUOT XXX DE_LEFT DE_DOWN DE_RIGHT
|
||||
DE_LCTRL DE_LGUI DE_SPACE DE_RET DE_RALT DE_LCTRL
|
||||
>;
|
||||
};
|
||||
|
|
@ -168,20 +153,20 @@ SPDX-License-Identifier: MIT
|
|||
// ### function_layer {{{
|
||||
function_layer {
|
||||
// .------------------------------------------------. .-------------------------------------------------.
|
||||
// | F1 | F2 | F3 | F4 | SPELL |TRADUCT| | | | | | | LOCK | TODO:
|
||||
// | F1 | F2 | F3 | F4 | SPELL |TRADUCT| |DE_F13 | DE_F14|DE_F15 | DE_F16| BRI_DN| BRI_UP |
|
||||
// |--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+---------|
|
||||
// | F5 | F6 | F7 | F8 | \ |SNIPPET| |TASKM | | | |BRI_UP | UNLOCK | TODO:
|
||||
// | F5 | F6 | F7 | F8 | \ |ALFRED | |C-A-DEL|DE_F19 |DE_F20 |CLR_LIN|PAGE_UP| |
|
||||
// |--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+---------|
|
||||
// | F9 | F10 | F11 | F12 |CLIPBRD|EMOJI | |L_SHIFT|L_SHIFT|R_SHIFT| | BRI_UP| |
|
||||
// '---------------------------------------------------------| |----------------------------------------------------------'
|
||||
// | F9 | F10 | F11 | F12 |ALFRED |EMOJI | |L_SHIFT|L_SHIFT|R_SHIFT| HOME |PAGE_DO| END |
|
||||
// '----------------------------------------------------------| |----------------------------------------------------------'
|
||||
// | CTRL | CMD | ALT | | TAB | ´ | CTRL |
|
||||
// '--------------------------------' '--------------------------------'
|
||||
// LCTL(LGUI(KC_D)), LCTL(LGUI(KC_SPC))
|
||||
// label = "FUNCTION";
|
||||
bindings = <
|
||||
DE_F1 DE_F2 DE_F3 DE_F4 SPELL TRADUCT XXX XXX XXX XXX XXX XXX
|
||||
DE_F5 DE_F6 DE_F7 DE_F8 DE_BSLS SNIPPET TASKM XXX XXX XXX DE_BRI_UP XXX
|
||||
DE_F9 DE_F10 DE_F11 DE_F12 CLIPBRD EMOJI DE_LSHFT DE_LSHFT DE_RSHFT XXX DE_BRI_DN XXX
|
||||
DE_F1 DE_F2 DE_F3 DE_F4 SPELL TRADUCT XXX XXX XXX XXX DE_BRI_DN DE_BRI_UP
|
||||
DE_F5 DE_F6 DE_F7 DE_F8 DE_BSLS SNIPPET TASKM &example &mctechnology &linea DE_PG_UP XXX
|
||||
DE_F9 DE_F10 DE_F11 DE_F12 CLIPBRD EMOJI DE_LSHFT DE_LSHFT DE_RSHFT DE_HOME DE_PG_DN DE_END
|
||||
DE_LCTRL DE_LGUI DE_LALT DE_TAB DE_ACUT DE_LCTRL
|
||||
>;
|
||||
};
|
||||
|
|
@ -212,22 +197,22 @@ SPDX-License-Identifier: MIT
|
|||
// .------------------------------------------------. .-------------------------------------------------.
|
||||
// | | | |OUT_USB|OUT_BLE|OUT_TOG| |RGBBRI-|RGBBRI+|WH_LEFT|WH_RIGH|WH_DOWN| WH_UP |
|
||||
// |--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+---------|
|
||||
// | |CLICK_1|CLICK_2|BT_CLR |BT_PRV | BT_NXT| |RGBSAT-|RGBSAT+| |CLICK_1| UP |CLICK_2 |
|
||||
// | |CLICK_1|CLICK_2|CLICK_3|BT_PRV | BT_NXT| |RGBSAT-|RGBSAT+| |CLICK_1| UP |CLICK_2 |
|
||||
// |--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+---------|
|
||||
// |BT_CLR |BT_0 |BT_1 |BT_2 |BT_3 |BT_4 | |RGBHUE-|RGBHUE+| RESET | LEFT | DOWN | RIGHT |
|
||||
// '---------------------------------------------------------| |----------------------------------------------------------'
|
||||
// |EP_OFF | EP_ON| EP_TOG | |RGBANI- |RGBANI+| RGBTOG |
|
||||
// '--------------------------------' '--------------------------------'
|
||||
// label = "MOUSE";
|
||||
// XXX XXX XXX &out OUT_USB &out OUT_BLE &out OUT_TOG &rgb_ug RGB_BRD &rgb_ug RGB_BRI XXX XXX XXX XXX
|
||||
// XXX XXX XXX XXX XXX XXX &rgb_ug RGB_BRD &rgb_ug RGB_BRI XXX XXX XXX XXX
|
||||
// XXX XXX XXX &out OUT_USB &out OUT_BLE &out OUT_TOG &mwh SCROLL_HOR(-15) &mwh SCROLL_VERT(-15) &mwh SCROLL_VERT(15) &mwh SCROLL_HOR(15) &mwh SCROLL_DOWN &mwh SCROLL_UP
|
||||
// XXX &mkp LCLK &mkp RCLK &mkp MCLK &bt BT_PRV &bt BT_NXT &rgb_ug RGB_SAD &rgb_ug RGB_SAI XXX XXX &mmv MOVE_VERT(-2500) XXX
|
||||
// &bt BT_CLR &bt BT(0) &bt BT(1) &bt BT(2) &bt BT(3) &bt BT(4) &rgb_ug RGB_HUD &rgb_ug RGB_HUI &reset &mmv MOVE_HOR(-2500) &mmv MOVE_VERT(2500) &mmv MOVE_HOR(2500)
|
||||
// &ext_power EP_OFF &ext_power EP_ON &ext_power EP_TOG &rgb_ug RGB_EFR &rgb_ug RGB_EFF &rgb_ug RGB_TOG
|
||||
// &ext_power EP_OFF &ext_power EP_ON &ext_power EP_TOG XXX XXX XXX
|
||||
bindings = <
|
||||
XXX XXX XXX &out OUT_USB &out OUT_BLE &out OUT_TOG &rgb_ug RGB_BRD &rgb_ug RGB_BRI XXX XXX XXX XXX
|
||||
XXX XXX XXX &bt BT_CLR &bt BT_PRV &bt BT_NXT &rgb_ug RGB_SAD &rgb_ug RGB_SAI XXX XXX XXX XXX
|
||||
&bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &rgb_ug RGB_HUD &rgb_ug RGB_HUI &reset XXX XXX XXX
|
||||
XXX XXX XXX XXX XXX XXX
|
||||
&bt BT_CLR &bt BT(0) &bt BT(1) &bt BT(2) &bt BT(3) &bt BT(4) &rgb_ug RGB_HUD &rgb_ug RGB_HUI &reset XXX XXX XXX
|
||||
&ext_power EP_OFF &ext_power EP_ON &ext_power EP_TOG &rgb_ug RGB_EFR &rgb_ug RGB_EFF &rgb_ug RGB_TOG
|
||||
>;
|
||||
};
|
||||
// }}}
|
||||
|
|
@ -237,50 +222,32 @@ SPDX-License-Identifier: MIT
|
|||
// .------------------------------------------------. .-------------------------------------------------.
|
||||
// | | | |OUT_USB|OUT_BLE|OUT_TOG| | | |WH_LEFT|WH_RIGH|WH_DOWN| WH_UP |
|
||||
// |--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+---------|
|
||||
// | |CLICK_1|CLICK_2|BT_CLR |BT_PRV | BT_NXT| | | | |CLICK_1| UP |CLICK_2 |
|
||||
// | |CLICK_1|CLICK_2|CLICK_3|BT_PRV | BT_NXT| | | | |CLICK_1| UP |CLICK_2 |
|
||||
// |--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+---------|
|
||||
// |BT_CLR |BT_0 |BT_1 |BT_2 |BT_3 |BT_4 | | | | RESET | LEFT | DOWN | RIGHT |
|
||||
// '---------------------------------------------------------| |----------------------------------------------------------'
|
||||
// |EP_OFF | EP_ON| EP_TOG | | | | |
|
||||
// '--------------------------------' '--------------------------------'
|
||||
// label = "MOUSE";
|
||||
// XXX XXX XXX &out OUT_USB &out OUT_BLE &out OUT_TOG XXX XXX XXX XXX XXX XXX
|
||||
// XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX
|
||||
// XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX
|
||||
// XXX XXX XXX &out OUT_USB &out OUT_BLE &out OUT_TOG &mwh SCROLL_HOR(-15) &mwh SCROLL_VERT(-15) &mwh SCROLL_VERT(15) &mwh SCROLL_HOR(15) &mwh SCROLL_DOWN &mwh SCROLL_UP
|
||||
// XXX &mkp LCLK &mkp RCLK &mkp MCLK &bt BT_PRV &bt BT_NXT XXX XXX XXX XXX &mmv MOVE_VERT(-2500) XXX
|
||||
// &bt BT_CLR &bt BT(0) &bt BT(1) &bt BT(2) &bt BT(3) &bt BT(4) XXX XXX &reset &mmv MOVE_HOR(-2500) &mmv MOVE_VERT(2500) &mmv MOVE_HOR(2500)
|
||||
// &ext_power EP_OFF &ext_power EP_ON &ext_power EP_TOG XXX XXX XXX
|
||||
bindings = <
|
||||
XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX
|
||||
XXX XXX XXX &bt BT_CLR &bt BT_PRV &bt BT_NXT XXX XXX XXX XXX XXX XXX
|
||||
&bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 XXX XXX &reset XXX XXX XXX
|
||||
XXX XXX XXX XXX XXX XXX
|
||||
XXX XXX XXX &out OUT_USB &out OUT_BLE &out OUT_TOG XXX XXX XXX XXX XXX XXX
|
||||
XXX XXX XXX XXX &bt BT_PRV &bt BT_NXT XXX XXX XXX XXX XXX XXX
|
||||
&bt BT_CLR &bt BT(0) &bt BT(1) &bt BT(2) &bt BT(3) &bt BT(4) XXX XXX &reset XXX XXX XXX
|
||||
&ext_power EP_OFF &ext_power EP_ON &ext_power EP_TOG XXX XXX XXX
|
||||
>;
|
||||
};
|
||||
// }}}
|
||||
#endif // CONFIG_ZMK_RGB_UNDERGLOW
|
||||
// ### TODO: lock_layer {{{
|
||||
// in default_layer(RALT) + Backspace = lock
|
||||
// in lock_layer(RALT) + none_lock(ESC)+lock(Q)+Enter = unlock
|
||||
// The "soft lock" mode that effective disables
|
||||
// other keys, allowing the keyboard to be transported without spurious key presses.
|
||||
// If https://github.com/zmkfirmware/zmk/issues/405 is implemented, this layer can be
|
||||
// replaced by a native behavior in the future.
|
||||
// &mo NONE_LOCK_LAYER &mo LOCK_LAYER
|
||||
/*
|
||||
lock_layer {
|
||||
bindings = <
|
||||
XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX
|
||||
XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX
|
||||
XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX XXX
|
||||
XXX XXX XXX XXX XXX ___
|
||||
>;
|
||||
};
|
||||
*/
|
||||
// }}}
|
||||
};
|
||||
};
|
||||
// }}}
|
||||
// TEST
|
||||
// ### niceview {{{
|
||||
&nice_view_spi {
|
||||
cs-gpios = <&pro_micro 0 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
// }}}
|
||||
// vim: fdm=marker:
|
||||
|
|
|
|||
|
|
@ -1,36 +0,0 @@
|
|||
/* ========================================
|
||||
FileName: macros.dtsi
|
||||
Date: 15:17 23.September.2022
|
||||
Author: Marcos Chow Castro
|
||||
Email: mctechnology170318@gmail.com
|
||||
GitHub: https://github.com/mctechnology17
|
||||
Brief: combos keymap for the wireless corne keyboard
|
||||
╔═╦═╦═╗
|
||||
╔════╗ ║║║║║╔╝
|
||||
║╔╗╔╗║ ║║║║║╚╗
|
||||
╚╝║║╚╝ ║╠═╩╩═╝
|
||||
║╠═╦═╣╚╦═╦╦═╦╗╔═╦═╦╦╗
|
||||
║║╩╣═╣║║║║║╬║╚╣╬║╬║║║
|
||||
╚╩═╩═╩╩╩╩═╩═╩═╩═╬╗╠╗║
|
||||
╚═╩═╝
|
||||
========================================= */
|
||||
/* TODO: en adptacion */
|
||||
/* Macro macro: */
|
||||
#define str(s) #s
|
||||
#define MACRO(NAME, BINDINGS) \
|
||||
macro_##NAME: macro_##NAME { \
|
||||
compatible = "zmk,behavior-macro"; \
|
||||
label = str(macro_##NAME); \
|
||||
#binding-cells = <0>; \
|
||||
wait-ms = <30>; \
|
||||
tap-ms = <40>; \
|
||||
bindings = <BINDINGS>; \
|
||||
};
|
||||
|
||||
/* BRACKETS */
|
||||
MACRO(parentheses, &kp LEFT_PARENTHESIS &kp RIGHT_PARENTHESIS &kp LEFT)
|
||||
MACRO(brackets, &kp LEFT_BRACKET &kp RIGHT_BRACKET &kp LEFT)
|
||||
MACRO(ltgt, &kp LESS_THAN &kp GREATER_THAN &kp LEFT)
|
||||
|
||||
/* SUSPEND MACOS BY HOLDING POWER KEY FOR 1 SECOND */
|
||||
MACRO(power, ¯o_tap_time 1000 &kp C_POWER)
|
||||
33
config/nice_nano_v2.overlay
Normal file
33
config/nice_nano_v2.overlay
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
#include <dt-bindings/led/led.h>
|
||||
|
||||
&spi1 {
|
||||
compatible = "nordic,nrf-spim";
|
||||
/* Cannot be used together with i2c0. */
|
||||
status = "okay";
|
||||
mosi-pin = <6>;
|
||||
// Unused pins, needed for SPI definition, but not used by the ws2812 driver itself.
|
||||
sck-pin = <5>;
|
||||
miso-pin = <7>;
|
||||
|
||||
led_strip: ws2812@0 {
|
||||
compatible = "worldsemi,ws2812-spi";
|
||||
label = "SK6812mini";
|
||||
|
||||
/* SPI */
|
||||
reg = <0>; /* ignored, but necessary for SPI bindings */
|
||||
spi-max-frequency = <4000000>;
|
||||
|
||||
/* WS2812 */
|
||||
chain-length = <54>; /* There are per-key RGB, but the first 6 are underglow */
|
||||
spi-one-frame = <0x70>;
|
||||
spi-zero-frame = <0x40>;
|
||||
|
||||
color-mapping = <LED_COLOR_ID_GREEN LED_COLOR_ID_RED LED_COLOR_ID_BLUE>;
|
||||
};
|
||||
};
|
||||
|
||||
/ {
|
||||
chosen {
|
||||
zmk,underglow = &led_strip;
|
||||
};
|
||||
};
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
&i2c0 {
|
||||
status = "okay";
|
||||
sda-pin = <39>; // nice!nano pin 107
|
||||
scl-pin = <34>; // nice!nano pin 102
|
||||
|
||||
oled: ssd1306@3c {
|
||||
compatible = "solomon,ssd1306fb";
|
||||
reg = <0x3c>;
|
||||
label = "DISPLAY";
|
||||
width = <128>;
|
||||
height = <32>;
|
||||
segment-offset = <0>;
|
||||
page-offset = <0>;
|
||||
display-offset = <0>;
|
||||
multiplex-ratio = <31>;
|
||||
com-invdir;
|
||||
segment-remap;
|
||||
com-sequential;
|
||||
prechargep = <0x22>;
|
||||
};
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue