From 9d235d4fc5c34f372b0c393f41686b5ef4f8dc13 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Mon, 1 Nov 2021 15:42:50 -0700 Subject: [Core] Change OLED task function to be boolean (#14864) * [Core] Add kb level callbacks to OLED driver * Update keyboards and keymaps * Update docs * Update userspace configs * Add fix for my keymap ... * update lefty --- keyboards/z12/keymaps/zigotica/oled.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'keyboards/z12') diff --git a/keyboards/z12/keymaps/zigotica/oled.c b/keyboards/z12/keymaps/zigotica/oled.c index 4b428a42b1..fa11a3d6c6 100644 --- a/keyboards/z12/keymaps/zigotica/oled.c +++ b/keyboards/z12/keymaps/zigotica/oled.c @@ -37,7 +37,7 @@ static void render_status(void) { } } -void oled_task_user(void) { +bool oled_task_user(void) { render_status(); + return false; } - -- cgit v1.2.1 From 84ea77ead663624a6d8ae451ca3d4318008d9d41 Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Thu, 4 Nov 2021 21:18:09 +0000 Subject: Remove `BOOTMAGIC_ENABLE = lite` option (#15002) * remove BOOTMAGIC_ENABLE=lite setting * change keyboard BOOTMAGIC_ENABLE rules Edits keyboard-level instances of `BOOTMAGIC_ENABLE = lite` to `BOOTMAGIC_ENABLE = yes`. * change keyboard BOOTMAGIC_ENABLE inline comments Edits keyboard-level BOOTMAGIC_ENABLE inline comments to "Enable Bootmagic Lite". * change keymap BOOTMAGIC_ENABLE rules Edits keymap-level instances of `BOOTMAGIC_ENABLE = lite` to `BOOTMAGIC_ENABLE = yes`. * change keymap BOOTMAGIC_ENABLE inline comments Edits/adds keymap-level BOOTMAGIC_ENABLE inline comments to read "Enable Bootmagic Lite". * change layout/user BOOTMAGIC_ENABLE rules/comments Edits instances of `BOOTMAGIC_ENABLE = lite` to `BOOTMAGIC_ENABLE = yes`. Edits/adds keymap-level BOOTMAGIC_ENABLE inline comments to read "Enable Bootmagic Lite". * update non-rules.mk BOOTMAGIC_ENABLE references in keyboards/ * remove docs references to Full Bootmagic * convert data-driven Bootmagic Lite instances * remove Bootmagic Lite bodge from data-driven generation * Merge remote-tracking branch 'upstream/develop' into rm/bootmagic-full_q4a * update docs/ja/config_options.md per mtei * update docs/faq_misc.md per mtei Remove remaining Full Bootmagic reference. --- keyboards/z12/rules.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboards/z12') diff --git a/keyboards/z12/rules.mk b/keyboards/z12/rules.mk index 32cdab8e95..b59ce00b47 100644 --- a/keyboards/z12/rules.mk +++ b/keyboards/z12/rules.mk @@ -5,7 +5,7 @@ MCU = atmega32u4 BOOTLOADER = caterina # Build Options -BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug -- cgit v1.2.1 From db04899a4a7cc39665c63e9639a60ea4e1d96bab Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Mon, 29 Nov 2021 15:08:20 +0000 Subject: Remove unnecessary ENCODER_DIRECTION_FLIP at keyboard level (#15342) --- keyboards/z12/config.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'keyboards/z12') diff --git a/keyboards/z12/config.h b/keyboards/z12/config.h index 7f897b795d..68aff7acf7 100644 --- a/keyboards/z12/config.h +++ b/keyboards/z12/config.h @@ -25,9 +25,8 @@ along with this program. If not, see . #define MANUFACTURER zigotica #define PRODUCT z12 -#define ENCODERS_PAD_A { B4, B2 } -#define ENCODERS_PAD_B { B5, B6 } -#define ENCODER_DIRECTION_FLIP +#define ENCODERS_PAD_A { B5, B6 } +#define ENCODERS_PAD_B { B4, B2 } /* key matrix size */ #define MATRIX_ROWS 4 -- cgit v1.2.1 From c12b99767921366c9fa8a1d6ba53872a26aa6127 Mon Sep 17 00:00:00 2001 From: Ryan Date: Wed, 1 Dec 2021 21:13:00 +1100 Subject: Tidy up `SLEEP_LED_ENABLE` rules (#15362) --- keyboards/z12/rules.mk | 2 -- 1 file changed, 2 deletions(-) (limited to 'keyboards/z12') diff --git a/keyboards/z12/rules.mk b/keyboards/z12/rules.mk index b59ce00b47..13ce8f5628 100644 --- a/keyboards/z12/rules.mk +++ b/keyboards/z12/rules.mk @@ -11,8 +11,6 @@ EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration ENCODER_ENABLE = yes # Enables the use of encoders -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -- cgit v1.2.1 From a8d440e4e043dc8427f17c07631556d0ff3efc20 Mon Sep 17 00:00:00 2001 From: Ryan Date: Thu, 9 Dec 2021 16:05:44 +1100 Subject: Tidy up NKRO_ENABLE rules (#15382) --- keyboards/z12/rules.mk | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'keyboards/z12') diff --git a/keyboards/z12/rules.mk b/keyboards/z12/rules.mk index 13ce8f5628..166b2e4116 100644 --- a/keyboards/z12/rules.mk +++ b/keyboards/z12/rules.mk @@ -11,8 +11,7 @@ EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration ENCODER_ENABLE = yes # Enables the use of encoders -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = no # USB Nkey Rollover +NKRO_ENABLE = no # Enable N-Key Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow AUDIO_ENABLE = no # Audio output -- cgit v1.2.1 From f718a10889e6adf33f3fc2f41b61cad7fe9e0c2e Mon Sep 17 00:00:00 2001 From: Ryan Date: Mon, 13 Dec 2021 13:05:37 +1100 Subject: Fix up build options comments (#15463) --- keyboards/z12/rules.mk | 2 ++ 1 file changed, 2 insertions(+) (limited to 'keyboards/z12') diff --git a/keyboards/z12/rules.mk b/keyboards/z12/rules.mk index 166b2e4116..fe67be276f 100644 --- a/keyboards/z12/rules.mk +++ b/keyboards/z12/rules.mk @@ -5,6 +5,8 @@ MCU = atmega32u4 BOOTLOADER = caterina # Build Options +# change yes to no to disable +# BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control -- cgit v1.2.1 From 07465c0ebbabf35079fed70a58e73da1e9419444 Mon Sep 17 00:00:00 2001 From: Sergi Meseguer Date: Mon, 27 Dec 2021 11:24:14 +0100 Subject: zigotica userspace add raw_hid_receive (#14869) * zigotica userspace add raw_hid_receive * add 3 keys to figma keymap * add 2 keys to vim keymap * improve vim keys * add 3 keys to browser keymap * comment typo * shorten SEND_STRING Co-authored-by: Ryan Co-authored-by: Ryan --- keyboards/z12/keymaps/zigotica/encoder.c | 12 ++-- keyboards/z12/keymaps/zigotica/keymap.c | 116 ++++++++++++++++++++++--------- keyboards/z12/keymaps/zigotica/oled.c | 10 +-- keyboards/z12/keymaps/zigotica/readme.md | 3 + 4 files changed, 94 insertions(+), 47 deletions(-) create mode 100644 keyboards/z12/keymaps/zigotica/readme.md (limited to 'keyboards/z12') diff --git a/keyboards/z12/keymaps/zigotica/encoder.c b/keyboards/z12/keymaps/zigotica/encoder.c index 49a3d859b6..f55b9b5ae9 100644 --- a/keyboards/z12/keymaps/zigotica/encoder.c +++ b/keyboards/z12/keymaps/zigotica/encoder.c @@ -48,12 +48,8 @@ bool encoder_update_user(uint8_t index, bool clockwise) { // Cycle through Tabs if (clockwise) { tap_code16(C(KC_TAB)); - /* register_code16(G(KC_RCBR)); */ - /* unregister_code16(G(KC_RCBR)); */ } else { tap_code16(S(C(KC_TAB))); - /* register_code16(G(KC_LCBR)); */ - /* unregister_code16(G(KC_LCBR)); */ } } else { // RIGHT // Scroll up/down @@ -68,11 +64,11 @@ bool encoder_update_user(uint8_t index, bool clockwise) { break; case _FIGMA: if (index == 0) { // LEFT - // Volume control. + // Cycle through Tabs if (clockwise) { - tap_code(KC_VOLU); + tap_code16(C(KC_TAB)); } else { - tap_code(KC_VOLD); + tap_code16(S(C(KC_TAB))); } } else { // RIGHT // Zoom in/out @@ -89,7 +85,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { } } break; - case _TERMINAL: + case _BASE: default: if (index == 0) { // LEFT // Volume control. diff --git a/keyboards/z12/keymaps/zigotica/keymap.c b/keyboards/z12/keymaps/zigotica/keymap.c index 7e969de96e..ef01561f1a 100644 --- a/keyboards/z12/keymaps/zigotica/keymap.c +++ b/keyboards/z12/keymaps/zigotica/keymap.c @@ -16,25 +16,73 @@ along with this program. If not, see . */ #include "zigotica.h" +#include "raw_hid.h" + +#ifdef RAW_ENABLE +void raw_hid_receive(uint8_t* data, uint8_t length) { + layer_clear(); + if (data[0] == 99) { + layer_on(_BASE); + } + else { + layer_on(data[0]); + } +} +#endif // Custom Keycodes -#define MODE_1 TO(_TERMINAL) +#define MODE_1 TO(_BASE) #define MODE_2 TO(_FIGMA) #define MODE_3 TO(_BROWSER) #define MODE_4 TO(_VIM) enum custom_keycodes { - VIM_SIP = SAFE_RANGE + VIM_SIF = SAFE_RANGE, + VIM_SIP, + VIM_RIF, + VIM_RIP, + VIM_NEW }; bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { - case VIM_SIP: + case VIM_SIF:// Search in File + if (record->event.pressed) { + register_code(KC_ESC); + tap_code(KC_SLASH); + } else { // released + unregister_code(KC_ESC); + } + break; + case VIM_SIP:// Search in Project if (record->event.pressed) { register_code(KC_ESC); SEND_STRING(":Ag "); - } else { - // released + } else { // released + unregister_code(KC_ESC); + } + break; + case VIM_RIF:// Replace in File + if (record->event.pressed) { + register_code(KC_ESC); + SEND_STRING(":%s/a/b/g"); + } else { // released + unregister_code(KC_ESC); + } + break; + case VIM_RIP:// Replace in Project + if (record->event.pressed) { + register_code(KC_ESC); + SEND_STRING(":cdo %s/a/b/g"); + } else { // released + unregister_code(KC_ESC); + } + break; + case VIM_NEW:// New buffer + if (record->event.pressed) { + SEND_STRING("\e:vnew\n"); + } else { // released + unregister_code(KC_ENT); unregister_code(KC_ESC); } break; @@ -44,83 +92,83 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* - * TERMINAL Layer + * BASE Layer * * ,-----------------------------. - * | | TERM | FIGM | | + * | | BASE | FIGM | | * |-------+------+------+-------| - * | VOL | BROW | VIM | SCROLL| + * |VOL/PLY| BROW | VIM | SCROLL| * |-------+------+------+-------| * |-------+-------+-------| - * | MEDIA | o | o | + * | o | o | o | * |-------+-------+-------| * | o | o | o | * |-------+-------+-------| */ - [_TERMINAL] = LAYOUT( + [_BASE] = LAYOUT( MODE_1, MODE_2, ZK_MEDIA, MODE_3, MODE_4, _______, _______, _______, _______, _______, _______, _______ ), /* - * VIM Layer + * FIGMA Layer * * ,-----------------------------. - * | | TERM | FIGM | | + * | | BASE | FIGM | | * |-------+------+------+-------| - * |BUFFER | BROW | VIM | SCROLL| + * | TABS | BROW | VIM | ZOOM | * |-------+------+------+-------| * |-------+-------+-------| - * |SEARCH | o | o | + * |ZOOMFIT| GRIDS | FULL | * |-------+-------+-------| - * | o | o | o | + * |ZOOM100| NEXT | COLOR | * |-------+-------+-------| */ - [_VIM] = LAYOUT( + [_FIGMA] = LAYOUT( _______, _______, _______, _______, _______, _______, - VIM_SIP, _______, _______, - _______, _______, _______ + LSFT(KC_1), LCTL(KC_G), LGUI(KC_BSLS), + LSFT(KC_0), KC_N, LCTL(KC_C) ), /* - * FIGMA Layer + * BROWSER Layer * * ,-----------------------------. - * | | TERM | FIGM | | + * | | BASE | FIGM | | * |-------+------+------+-------| - * | VOL | BROW | VIM | ZOOM | + * | TABS | BROW | VIM | SCROLL| * |-------+------+------+-------| * |-------+-------+-------| - * | ZOOM | GRIDS | FULL | + * |SEARCH | BOOKM | DEVTL | * |-------+-------+-------| - * | o | o | o | + * |ZOOM100| MUTE | READ | * |-------+-------+-------| */ - [_FIGMA] = LAYOUT( + [_BROWSER] = LAYOUT( _______, _______, _______, _______, _______, _______, - LSFT(KC_1), LCTL(KC_G), LGUI(KC_BSLS), - _______, _______, _______ + G(KC_F), G(KC_D), G(A(KC_I)), + G(KC_0), C(KC_M), G(A(KC_R)) ), /* - * BROWSER Layer + * VIM Layer * * ,-----------------------------. - * | | TERM | FIGM | | + * | | BASE | FIGM | | * |-------+------+------+-------| - * | TABS | BROW | VIM | SCROLL| + * |BUFFER | BROW | VIM | SCROLL| * |-------+------+------+-------| * |-------+-------+-------| - * |SEARCH | BOOKM | DEVTL | + * |SRCH FL|REPL FL|NEW BUF| * |-------+-------+-------| - * | o | o | o | + * |SRCH PR|REPL PR| o | * |-------+-------+-------| */ - [_BROWSER] = LAYOUT( + [_VIM] = LAYOUT( _______, _______, _______, _______, _______, _______, - G(KC_F), G(KC_D), G(A(KC_I)), - _______, _______, _______ + VIM_SIF, VIM_RIF, VIM_NEW, + VIM_SIP, VIM_RIP, _______ ), }; diff --git a/keyboards/z12/keymaps/zigotica/oled.c b/keyboards/z12/keymaps/zigotica/oled.c index fa11a3d6c6..c96fc0f708 100644 --- a/keyboards/z12/keymaps/zigotica/oled.c +++ b/keyboards/z12/keymaps/zigotica/oled.c @@ -21,16 +21,16 @@ static void render_status(void) { oled_write_P(PSTR("Layer: "), false); switch (get_highest_layer(layer_state)) { case _VIM: - oled_write_P(PSTR("VIM\n\nBUFFER SCROLL"), false); + oled_write_P(PSTR("VIM \n\nBUFFER SCROLL"), false); break; case _FIGMA: - oled_write_P(PSTR("FIGMA\n\nVOLUME ZOOM"), false); + oled_write_P(PSTR("FIGMA \n\nTABS ZOOM"), false); break; case _BROWSER: - oled_write_P(PSTR("BROWSER\n\nTABS SCROLL"), false); + oled_write_P(PSTR("BROWSER \n\nTABS SCROLL"), false); break; - case _TERMINAL: - oled_write_P(PSTR("TERMINAL\n\nVOLUME SCROLL"), false); + case _BASE: + oled_write_P(PSTR("BASE \n\nVOLUME SCROLL"), false); break; default: oled_write_P(PSTR("Undef\n"), false); diff --git a/keyboards/z12/keymaps/zigotica/readme.md b/keyboards/z12/keymaps/zigotica/readme.md new file mode 100644 index 0000000000..a3746a88d2 --- /dev/null +++ b/keyboards/z12/keymaps/zigotica/readme.md @@ -0,0 +1,3 @@ +# zigotica's z12 Layout + +This layout uses `RAW_ENABLE = yes`, and benefits from [active-app-qmk-layer-updater](https://github.com/zigotica/active-app-qmk-layer-updater) node script (run by the host system) to change layers programmatically depending on the current active app. -- cgit v1.2.1 From dcff1a34c7eabce20bb751313867579941222acf Mon Sep 17 00:00:00 2001 From: Gabriel Harel Date: Fri, 28 Jan 2022 19:34:38 -0600 Subject: Remove missing and trailing commas in info.json files. (#16088) --- keyboards/z12/info.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboards/z12') diff --git a/keyboards/z12/info.json b/keyboards/z12/info.json index 3ae8937571..2395401e47 100644 --- a/keyboards/z12/info.json +++ b/keyboards/z12/info.json @@ -19,7 +19,7 @@ {"x": 0.5, "y": 3}, {"x": 1.5, "y": 3}, - {"x": 2.5, "y": 3}, + {"x": 2.5, "y": 3} ] } } -- cgit v1.2.1