From 62c3e3d11f6956b34966a320cb6897195a2428be Mon Sep 17 00:00:00 2001 From: Ryan Date: Mon, 10 May 2021 02:53:21 +1000 Subject: Remove pointless SERIAL_LINK_ENABLE rules (#12846) --- keyboards/moonlander/rules.mk | 1 - 1 file changed, 1 deletion(-) (limited to 'keyboards/moonlander') diff --git a/keyboards/moonlander/rules.mk b/keyboards/moonlander/rules.mk index 561db849e7..7076347ec8 100644 --- a/keyboards/moonlander/rules.mk +++ b/keyboards/moonlander/rules.mk @@ -23,7 +23,6 @@ DEBOUNCE_TYPE = custom SWAP_HANDS_ENABLE = yes RGB_MATRIX_ENABLE = yes RGB_MATRIX_DRIVER = IS31FL3731 -#SERIAL_LINK_ENABLE = yes EEPROM_DRIVER = i2c #project specific files -- cgit v1.2.3 From f0b30e0027cb890c7510fa22e5824a43c0d9e86f Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Sun, 9 May 2021 23:21:09 -0700 Subject: Make Swap Hands use PROGMEM (#12284) This converts the array that the Swap Hands feature uses to use PROGMEM, and to read from that array, as such. Since this array never changes at runtime, there is no reason to keep it in memory. Especially for AVR boards, as memory is a precious resource. --- keyboards/moonlander/moonlander.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboards/moonlander') diff --git a/keyboards/moonlander/moonlander.c b/keyboards/moonlander/moonlander.c index 39f61b5c40..bc4047b847 100644 --- a/keyboards/moonlander/moonlander.c +++ b/keyboards/moonlander/moonlander.c @@ -370,7 +370,7 @@ bool music_mask_kb(uint16_t keycode) { #ifdef SWAP_HANDS_ENABLE // swap-hands action needs a matrix to define the swap // clang-format off -const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { +const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { /* Left hand, matrix positions */ {{6,6}, {5,6}, {4,6}, {3,6}, {2,6}, {1,6},{0,6}}, {{6,7}, {5,7}, {4,7}, {3,7}, {2,7}, {1,7},{0,7}}, -- cgit v1.2.3 From 7a6e630ffd1a2a8357daf8b7ed2ab766eae55e07 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Wed, 9 Jun 2021 22:59:19 -0700 Subject: Fix RGB/LED Suspend defines (#13146) --- keyboards/moonlander/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboards/moonlander') diff --git a/keyboards/moonlander/config.h b/keyboards/moonlander/config.h index c88feea3d0..c1a139dc77 100644 --- a/keyboards/moonlander/config.h +++ b/keyboards/moonlander/config.h @@ -91,7 +91,7 @@ #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 175 #define RGB_MATRIX_FRAMEBUFFER_EFFECTS #define RGB_MATRIX_KEYPRESSES -#define RGB_DISABLE_WHEN_USB_SUSPENDED true +#define RGB_DISABLE_WHEN_USB_SUSPENDED #define MUSIC_MAP -- cgit v1.2.3 From 65f8da3034c0bc854aa23e0b8e78cbfc8a14ff19 Mon Sep 17 00:00:00 2001 From: Manna Harbour <51143715+manna-harbour@users.noreply.github.com> Date: Sun, 4 Jul 2021 02:09:02 +1000 Subject: [Keymap] Update Miryoku (#13307) Fix reddit link Duplicate open parenthesis next to close parenthesis on NSSL Add customisation instructions Add lily58 Add gergo Co-authored-by: Jonathan Dayton Clean up LAYOUT macro formatting Add alternative vi-style navigation layout Add kyria Add minidox Change order of keyboards Add iris Expand TOC Re-order userspace subheadings Add atreus Add customisation section Add split_3x5_3 and split_3x6_3 layouts Add for_science Fix wrong paths in keyboard config.h and keymap.c headings Fix keyboard ordering Fix blank lines around headings Add compatibility with new org-mode version. Remove keyboards/crkbd now covered by layouts/split_3x6_3 Add Halmak Alphabetise alternative alpha arrangements Move build options out of base layer alphas headings Add list of keyboards supporting split_3x5_3 layout Enable Auto Shift and Retro Shift Add Retro Shift (Auto Shift for Tap Hold via Retro Tapping) Change kyria thumb key mapping Add planck_mit layout Remove alternative bottom row support from ortho_4x12 Remove minidox - Covered by split_3x5_3 layout Add moonlander Remove KC_ macros Add 60_ansi layout Add ortho_5x15 layout Closes manna-harbour/qmk_firmware#5 Co-authored-by: Rob Fix typo (manna-harbour/qmk_firmware#7) Author: sonnius Add redox_w (manna-harbour/qmk_firmware#8) Author: Brian Romanko Co-authored-by: Manna Harbour <51143715+manna-harbour@users.noreply.github.com> Add AUTO_SHIFT_NO_SETUP to reduce firmware size Update image paths Add instructions to checkout development branch Add kyria extended thumbs option, change default, add KLE Change clipboard keys - Change order to be mirror of windows bindings - Change default to use CUA bindings for Cut, Copy, and Paste, and Fun Cluster bindings for Undo and Redo - Add alternative bindings - Fun Cluster (original miryoku bindings) - Mac - Windows - Change prefix for local macros from X_ to U_ Disable Retro Shift, enable Auto Shift for non-alphas Revert "Add Retro Shift (Auto Shift for Tap Hold via Retro Tapping)" Add Experimental Features section Update miryoku image link Update cover image link Add dactyl_manuform/4x5 Add cutomisation examples Add https to remote example Fix dactyl_manuform/4x5 subset mapping Add extended thumbs to ortho_4x12 Update Colemak Mod-DH naming Closes manna-harbour/qmk_firmware#13 Add dactyl_manuform/5x6 Resolves manna-harbour/qmk_firmware#14 Co-authored-by: Sebastian Morales Add note on FORCE_LAYOUT - Needed to use EXTENDED_THUMBS on planck Add parent directories to keyboard headings and re-order Add keyboardio/atreus Resolves manna-harbour/qmk_firmware#15 Add torn Resolves manna-harbour/qmk_firmware#16 Author: Brian Romanko Co-authored-by: Manna Harbour <51143715+manna-harbour@users.noreply.github.com> Change map to zip - Adds support for python3, still compatible with python2. Resolves manna-harbour/qmk_firmware#10 Resolves manna-harbour/qmk_firmware#19 Co-authored-by: Ori Add python-version Add sofle Add ergotravel Add ortho_5x12 Add ortho_4x10 Add :main no header argument to C code blocks resolves manna-harbour/qmk_firmware#11 resolves manna-harbour/qmk_firmware#12 Co-authored-by: RubioJr9 Add flipped layers and inverted-T nav alternative layouts - Separate tap_table into alphas_table and thumbs_table - Add mode argument to table-layout-half - Remove layer_name - Rename layers - Add mods and clipboard to MBO and mirror - Add MIRYOKU_LAYERS=FLIP - Add MIRYOKU_NAV=INVERTEDT Add layer diagrams Update contact section Update links for Bilateral Combinations and Retro Shift Add description and no reverse angle option to 60_ansi layout Update list of keyboards supporting community layouts - and example build command lines Change moonlander thumb keys Update list of keyboards supporting split_3x5_3 Add license to tangled C source files --- .../keymaps/manna-harbour_miryoku/config.h | 24 ++++++++++++++++++++++ .../keymaps/manna-harbour_miryoku/keymap.c | 5 +++++ 2 files changed, 29 insertions(+) create mode 100644 keyboards/moonlander/keymaps/manna-harbour_miryoku/config.h create mode 100644 keyboards/moonlander/keymaps/manna-harbour_miryoku/keymap.c (limited to 'keyboards/moonlander') diff --git a/keyboards/moonlander/keymaps/manna-harbour_miryoku/config.h b/keyboards/moonlander/keymaps/manna-harbour_miryoku/config.h new file mode 100644 index 0000000000..ad6eee3682 --- /dev/null +++ b/keyboards/moonlander/keymaps/manna-harbour_miryoku/config.h @@ -0,0 +1,24 @@ +// Copyright 2019 Manna Harbour +// https://github.com/manna-harbour/miryoku +// generated from users/manna-harbour_miryoku/miryoku.org -*- buffer-read-only: t -*- + +// This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . + +#pragma once + +#define XXX KC_NO + +#define LAYOUT_miryoku(\ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09,\ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19,\ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29,\ + N30, N31, K32, K33, K34, K35, K36, K37, N38, N39\ +)\ +LAYOUT_moonlander(\ +XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX,\ +XXX, K00, K01, K02, K03, K04, XXX, XXX, K05, K06, K07, K08, K09, XXX,\ +XXX, K10, K11, K12, K13, K14, XXX, XXX, K15, K16, K17, K18, K19, XXX,\ +XXX, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, XXX,\ +XXX, XXX, XXX, XXX, K32, XXX, XXX, K37, XXX, XXX, XXX, XXX,\ + K33, K34, XXX, XXX, K35, K36\ +) diff --git a/keyboards/moonlander/keymaps/manna-harbour_miryoku/keymap.c b/keyboards/moonlander/keymaps/manna-harbour_miryoku/keymap.c new file mode 100644 index 0000000000..1520387e88 --- /dev/null +++ b/keyboards/moonlander/keymaps/manna-harbour_miryoku/keymap.c @@ -0,0 +1,5 @@ +// Copyright 2019 Manna Harbour +// https://github.com/manna-harbour/miryoku +// generated from users/manna-harbour_miryoku/miryoku.org -*- buffer-read-only: t -*- + +// This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . -- cgit v1.2.3 From d45da3f0fb76222a2af63b0b61f21ae78117b2d4 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Sun, 25 Jul 2021 18:18:22 -0700 Subject: [Keyboard] Update ZSA Keyboard Readmes and keymaps (#13041) * [Keyboard] Update ZSA Keyboard Readmes and keymaps * Apply suggestions from code review Co-authored-by: Ryan * Remove custom rgb code for RGB_M_P * Fix inevitable typo Co-authored-by: Ryan * Update keyboards/planck/ez/readme.md Co-authored-by: Ryan Co-authored-by: Ryan --- keyboards/moonlander/config.h | 2 +- keyboards/moonlander/keymaps/default/config.h | 2 +- keyboards/moonlander/keymaps/default/keymap.c | 2 +- keyboards/moonlander/matrix.c | 2 +- keyboards/moonlander/moonlander.c | 11 +---------- keyboards/moonlander/moonlander.h | 2 +- keyboards/moonlander/readme.md | 18 +++++++++++++++++- 7 files changed, 23 insertions(+), 16 deletions(-) (limited to 'keyboards/moonlander') diff --git a/keyboards/moonlander/config.h b/keyboards/moonlander/config.h index c88feea3d0..16a41c9cc6 100644 --- a/keyboards/moonlander/config.h +++ b/keyboards/moonlander/config.h @@ -1,6 +1,6 @@ /* Copyright 2020 ZSA Technology Labs, Inc <@zsa> * Copyright 2020 Jack Humbert - * Copyright 2020 Christopher Courtney (@drashna) + * Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/keyboards/moonlander/keymaps/default/config.h b/keyboards/moonlander/keymaps/default/config.h index 576aae9f52..83ea2a1b58 100644 --- a/keyboards/moonlander/keymaps/default/config.h +++ b/keyboards/moonlander/keymaps/default/config.h @@ -1,6 +1,6 @@ /* Copyright 2020 ZSA Technology Labs, Inc <@zsa> * Copyright 2020 Jack Humbert - * Copyright 2020 Christopher Courtney (@drashna) + * Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/keyboards/moonlander/keymaps/default/keymap.c b/keyboards/moonlander/keymaps/default/keymap.c index 6d98a8607e..0cb7fa5d27 100644 --- a/keyboards/moonlander/keymaps/default/keymap.c +++ b/keyboards/moonlander/keymaps/default/keymap.c @@ -1,6 +1,6 @@ /* Copyright 2020 ZSA Technology Labs, Inc <@zsa> * Copyright 2020 Jack Humbert - * Copyright 2020 Christopher Courtney (@drashna) + * Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/keyboards/moonlander/matrix.c b/keyboards/moonlander/matrix.c index 566f8bb1b2..dbd44d1618 100644 --- a/keyboards/moonlander/matrix.c +++ b/keyboards/moonlander/matrix.c @@ -1,6 +1,6 @@ /* Copyright 2020 ZSA Technology Labs, Inc <@zsa> * Copyright 2020 Jack Humbert - * Copyright 2020 Christopher Courtney (@drashna) + * Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/keyboards/moonlander/moonlander.c b/keyboards/moonlander/moonlander.c index bc4047b847..d66b74d973 100644 --- a/keyboards/moonlander/moonlander.c +++ b/keyboards/moonlander/moonlander.c @@ -1,6 +1,6 @@ /* Copyright 2020 ZSA Technology Labs, Inc <@zsa> * Copyright 2020 Jack Humbert - * Copyright 2020 Christopher Courtney (@drashna) + * Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -340,15 +340,6 @@ led_config_t g_led_config = { { } }; // clang-format on -void suspend_power_down_kb(void) { - rgb_matrix_set_suspend_state(true); - suspend_power_down_user(); -} - -void suspend_wakeup_init_kb(void) { - rgb_matrix_set_suspend_state(false); - suspend_wakeup_init_user(); -} #endif #ifdef AUDIO_ENABLE diff --git a/keyboards/moonlander/moonlander.h b/keyboards/moonlander/moonlander.h index 08bec5c070..8598260211 100644 --- a/keyboards/moonlander/moonlander.h +++ b/keyboards/moonlander/moonlander.h @@ -1,6 +1,6 @@ /* Copyright 2020 ZSA Technology Labs, Inc <@zsa> * Copyright 2020 Jack Humbert - * Copyright 2020 Christopher Courtney (@drashna) + * Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/keyboards/moonlander/readme.md b/keyboards/moonlander/readme.md index 7ddfdb84a7..0ad2e4775c 100644 --- a/keyboards/moonlander/readme.md +++ b/keyboards/moonlander/readme.md @@ -19,7 +19,23 @@ Flashing example for this keyboard: See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). -## Oryx Configuation + +## Moonlander Customization + +### Indicator LEDs + +There are 6 functions for enabling and disabling the LEDs on the top of the boards. The functions are `ML_LED_1(bool)` through `ML_LED_6(bool)`, with the first LED being the left most LED on the left hand, and the sixth LED being the right most LED on the right side. + +By default, the Indicator LEDs are used to indicate the layer state for the keyboard. If you wish to change this (and indicate caps/num/scroll lock status instead), then define `MOONLANDER_USER_LEDS` in your `config.h` file. + + +### Oryx Configuration + +To enable the features from Oryx (ZSA's Configurator), either compile the the `default` keymap, or add `#define ORYX_CONFIGURATOR` to your `config.h` file. + +This enables the front Indicator LEDs, and the `TOGGLE_LAYER_COLOR` keycode. The `TOGGLE_LAYER_COLOR` keycode toggles the customized LED map configured on Oryx. + +### RGB Matrix Features If you're using the Smart LED (layer indication) feature from the Oryx Configurator, you want to make sure that you enable these options by adding `#define ORYX_CONFIGURATOR` to your keymap's `config.h`. -- cgit v1.2.3 From eb46c954dcf99d842967cc6095827316ffddd291 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Mon, 26 Jul 2021 17:59:49 -0700 Subject: [Keymap] Drashna's Defaults cleanup (#13722) --- keyboards/moonlander/keymaps/drashna/keymap.c | 82 ++++++--------------------- 1 file changed, 17 insertions(+), 65 deletions(-) (limited to 'keyboards/moonlander') diff --git a/keyboards/moonlander/keymaps/drashna/keymap.c b/keyboards/moonlander/keymaps/drashna/keymap.c index 57c69df480..f6af7e53af 100644 --- a/keyboards/moonlander/keymaps/drashna/keymap.c +++ b/keyboards/moonlander/keymaps/drashna/keymap.c @@ -39,68 +39,32 @@ enum more_custom_keycodes { KC_SWAP_NUM = NEW_SAFE_RANGE }; KC_SPC, BK_LWER, OS_LALT, OS_RGUI, DL_RAIS, KC_ENT \ ) -#define LAYOUT_moonlander_base_wrapper(...) LAYOUT_moonlander_base(__VA_ARGS__) +#define LAYOUT_base_wrapper(...) LAYOUT_moonlander_base(__VA_ARGS__) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - [_QWERTY] = LAYOUT_moonlander_base_wrapper( + [_DEFAULT_LAYER_1] = LAYOUT_base_wrapper( _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ ), - [_COLEMAK] = LAYOUT_moonlander_base_wrapper( + [_DEFAULT_LAYER_2] = LAYOUT_base_wrapper( + ______________COLEMAK_MOD_DH_L1____________, ______________COLEMAK_MOD_DH_R1____________, + ______________COLEMAK_MOD_DH_L2____________, ______________COLEMAK_MOD_DH_R2____________, + ______________COLEMAK_MOD_DH_L3____________, ______________COLEMAK_MOD_DH_R3____________ + ), + [_DEFAULT_LAYER_3] = LAYOUT_base_wrapper( _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ ), - [_DVORAK] = LAYOUT_moonlander_base_wrapper( + [_DEFAULT_LAYER_4] = LAYOUT_base_wrapper( _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ ), - [_WORKMAN] = LAYOUT_moonlander_base_wrapper( - _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, - _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, - _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ - ), - - [_NORMAN] = LAYOUT_moonlander_base_wrapper( - _________________NORMAN_L1_________________, _________________NORMAN_L1_________________, - _________________NORMAN_L2_________________, _________________NORMAN_R2_________________, - _________________NORMAN_L3_________________, _________________NORMAN_R3_________________ - ), - - [_MALTRON] = LAYOUT_moonlander_base_wrapper( - _________________MALTRON_L1________________, _________________MALTRON_R1________________, - _________________MALTRON_L2________________, _________________MALTRON_R2________________, - _________________MALTRON_L3________________, _________________MALTRON_R3________________ - ), - - [_EUCALYN] = LAYOUT_moonlander_base_wrapper( - _________________EUCALYN_L1________________, _________________EUCALYN_R1________________, - _________________EUCALYN_L2________________, _________________EUCALYN_R2________________, - _________________EUCALYN_L3________________, _________________EUCALYN_R3________________ - ), - - [_CARPLAX] = LAYOUT_moonlander_base_wrapper( - _____________CARPLAX_QFMLWY_L1_____________, _____________CARPLAX_QFMLWY_R1_____________, - _____________CARPLAX_QFMLWY_L2_____________, _____________CARPLAX_QFMLWY_R2_____________, - _____________CARPLAX_QFMLWY_L3_____________, _____________CARPLAX_QFMLWY_R3_____________ - ), - -#ifdef _MODS - [_MODS] = LAYOUT_moonlander_wrapper( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RSFT, - _______, KC_MEH, KC_HYPR, _______, _______, _______, _______, _______, _______, _______, _______, _______, - KC_LALT, _______, _______, _______, _______, KC_RGUI - ), -#endif [_GAMEPAD] = LAYOUT_moonlander_wrapper( KC_ESC, KC_NO, KC_1, KC_2, KC_3, KC_4, HYPR(KC_Q), KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, @@ -214,29 +178,17 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { if (userspace_config.rgb_layer_change) { switch (get_highest_layer(layer_state|default_layer_state)) { - case _QWERTY: - rgb_matrix_layer_helper(HSV_CYAN, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); - break; - case _COLEMAK: - rgb_matrix_layer_helper(HSV_MAGENTA, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); - break; - case _DVORAK: - rgb_matrix_layer_helper(HSV_SPRINGGREEN, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); - break; - case _WORKMAN: - rgb_matrix_layer_helper(HSV_GOLDENROD, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); - break; - case _NORMAN: - rgb_matrix_layer_helper(HSV_CORAL, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); + case _DEFAULT_LAYER_1: + rgb_matrix_layer_helper(DEFAULT_LAYER_1_HSV, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); break; - case _MALTRON: - rgb_matrix_layer_helper(HSV_YELLOW, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); + case _DEFAULT_LAYER_2: + rgb_matrix_layer_helper(DEFAULT_LAYER_2_HSV, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); break; - case _EUCALYN: - rgb_matrix_layer_helper(HSV_PINK, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); + case _DEFAULT_LAYER_3: + rgb_matrix_layer_helper(DEFAULT_LAYER_3_HSV, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); break; - case _CARPLAX: - rgb_matrix_layer_helper(HSV_BLUE, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); + case _DEFAULT_LAYER_4: + rgb_matrix_layer_helper(DEFAULT_LAYER_4_HSV, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); break; case _GAMEPAD: rgb_matrix_layer_helper(HSV_ORANGE, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); -- cgit v1.2.3 From 70fb3e1aaf406cbbd5137916a93ed814d6891ef2 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sat, 31 Jul 2021 14:35:30 +0100 Subject: __flash? (#13799) --- keyboards/moonlander/moonlander.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboards/moonlander') diff --git a/keyboards/moonlander/moonlander.c b/keyboards/moonlander/moonlander.c index d66b74d973..8688b9efa4 100644 --- a/keyboards/moonlander/moonlander.c +++ b/keyboards/moonlander/moonlander.c @@ -203,7 +203,7 @@ layer_state_t layer_state_set_kb(layer_state_t state) { #ifdef RGB_MATRIX_ENABLE // clang-format off -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location -- cgit v1.2.3 From a03aa301def77c867ae6c6c840f7fc82b26d91d6 Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Fri, 6 Aug 2021 23:59:56 -0700 Subject: Remove Full Bootmagic (#13846) * disambiguate Bootmagic rules in keymaps The files edited by this commit were added at a point in time where `BOOTMAGIC_ENABLE = yes` enabled full Bootmagic. This commit edits the files to specify that full Bootmagic is intended. * remove BOOTMAGIC_ENABLE=full setting * unify commented BOOTMAGIC_ENABLE rules in keyboards Explicitly sets `BOOTMAGIC_ENABLE = no` in keyboards where the rule was commented out. Command: ``` find keyboards/ -type f -name 'rules.mk' -and -not -path '*/keymaps/*' -exec sed -i -e 's;#[ \t]*\(BOOTMAGIC_ENABLE\)[ \t=]\+\([a-zA-Z]\+\).*;\1 = no # Virtual DIP switch configuration;g' {} + ``` * remove commented Bootmagic rules from keymap/user level Command: ``` find keyboards/ layouts/ users/ -type f -name 'rules.mk' -exec sed -i -e '/#.*\(BOOTMAGIC_ENABLE\)[ \t=]\+\([a-z]\+\).*/d' {} + ``` * update keyboard BOOTMAGIC_ENABLE rule formatting Sets the formatting of BOOTMAGIC_ENABLE rules to `BOOTMAGIC_ENABLE = [value]`, without the inline comments (which will be replaced later). Command: ``` find keyboards/ -type f -name 'rules.mk' -and -not -path '*/keymaps/*' -exec sed -i -e 's;\(BOOTMAGIC_ENABLE\)[ \t=]\+\([a-z]\+\).*;\1 = \2;g' '{}' + ``` * update keyboards' BOOTMAGIC_ENABLE settings Updates keyboard `rules.mk` files to use `BOOTMAGIC_ENABLE = lite` where `BOOTMAGIC_ENABLE = full` was being used. Command: ``` find keyboards/ -type f -name 'rules.mk' -and -not -path '*/keymaps/*' -exec sed -i -e 's;\(BOOTMAGIC_ENABLE = \)full;\1lite;g' '{}' + ``` * update keymap/user BOOTMAGIC_ENABLE settings Updates keymap/user `rules.mk` files to use `BOOTMAGIC_ENABLE = lite` where `BOOTMAGIC_ENABLE = full` was being used. Commands: ``` find keyboards/ -type f -name 'rules.mk' -and -path '*/keymaps/*' -exec sed -i -e 's;\(BOOTMAGIC_ENABLE[ \t=]\+\)full;\1lite;g' '{}' + find layouts/community/ users/ -type f -name 'rules.mk' -exec sed -i -e 's;\(BOOTMAGIC_ENABLE[ \t=]\+\)full;\1lite;g' '{}' + ``` * remove and replace inline comments in keyboards and keymap/user files Removes and replaces the inline comments, which have been updated to read `Enable Bootmagic Lite`. Commands: ``` find keyboards/ -type f -name 'rules.mk' -and -path '*/keymaps/*' -exec sed -i -e 's;\(BOOTMAGIC_ENABLE\)[ \t=]\+\([a-z]\+\).*;\1 = \2;g' '{}' + find layouts/community/ users/ -type f -name 'rules.mk' -exec sed -i -e 's;\(BOOTMAGIC_ENABLE\)[ \t=]\+\([a-z]\+\).*;\1 = \2;g' '{}' + find keyboards/ layouts/community/ users/ -type f -name 'rules.mk' -exec sed -i -e 's;\(BOOTMAGIC_ENABLE = lite\);\1 # Enable Bootmagic Lite;g' '{}' + find keyboards/ layouts/community/ users/ -type f -name 'rules.mk' -exec sed -i -e 's;\(BOOTMAGIC_ENABLE = yes\);\1 # Enable Bootmagic Lite;g' '{}' + find keyboards/ layouts/community/ users/ -type f -name 'rules.mk' -exec sed -i -e 's;\(BOOTMAGIC_ENABLE = no\);\1 # Enable Bootmagic Lite;g' '{}' + ``` * rename improperly named makefiles Some files intended to be used as makefiles had improper names causing them to not be used as intended when building. This commit corrects the filenames of the affected files. * update renamed file with new rule formatting * update QMK's template files Updates QMK's `rules.mk` templates to use the new inline comment. * update QMK Docs - remove documentation of full Bootmagic - update links to Bootmagic Lite doc - add doc for Magic Keycodes * rules.mk patch for coarse/ixora and coarse/vinta --- keyboards/moonlander/keymaps/drashna/rules.mk | 2 +- keyboards/moonlander/rules.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'keyboards/moonlander') diff --git a/keyboards/moonlander/keymaps/drashna/rules.mk b/keyboards/moonlander/keymaps/drashna/rules.mk index 480e974463..0af16d6e17 100644 --- a/keyboards/moonlander/keymaps/drashna/rules.mk +++ b/keyboards/moonlander/keymaps/drashna/rules.mk @@ -1,4 +1,4 @@ TAP_DANCE_ENABLE = yes -BOOTMAGIC_ENABLE = lite +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite UNICODE_ENABLE = yes UNICODEMAP_ENABLE = no diff --git a/keyboards/moonlander/rules.mk b/keyboards/moonlander/rules.mk index 8e8dbf94f4..cb9cd299e6 100644 --- a/keyboards/moonlander/rules.mk +++ b/keyboards/moonlander/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug -- cgit v1.2.3 From 30843f8329315426ff433a40095f1de2b2669e57 Mon Sep 17 00:00:00 2001 From: Jacob Jerrell <86279411+jjerrell@users.noreply.github.com> Date: Thu, 12 Aug 2021 09:44:15 -0500 Subject: [Keymap] JJerrell - Add Userspace and ZSA Keyboard Keymaps (#13548) --- keyboards/moonlander/keymaps/jjerrell/config.h | 27 ++++++ keyboards/moonlander/keymaps/jjerrell/keymap.c | 117 ++++++++++++++++++++++++ keyboards/moonlander/keymaps/jjerrell/readme.md | 3 + keyboards/moonlander/keymaps/jjerrell/rules.mk | 1 + 4 files changed, 148 insertions(+) create mode 100644 keyboards/moonlander/keymaps/jjerrell/config.h create mode 100644 keyboards/moonlander/keymaps/jjerrell/keymap.c create mode 100644 keyboards/moonlander/keymaps/jjerrell/readme.md create mode 100644 keyboards/moonlander/keymaps/jjerrell/rules.mk (limited to 'keyboards/moonlander') diff --git a/keyboards/moonlander/keymaps/jjerrell/config.h b/keyboards/moonlander/keymaps/jjerrell/config.h new file mode 100644 index 0000000000..1fd17fbbe3 --- /dev/null +++ b/keyboards/moonlander/keymaps/jjerrell/config.h @@ -0,0 +1,27 @@ +/* Copyright 2020 ZSA Technology Labs, Inc <@zsa> + * Copyright 2020 Jack Humbert + * Copyright 2020 Christopher Courtney (@drashna) + * Copyright 2021 Jacob Jerrell <@jjerrell> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#define ORYX_CONFIGURATOR + +#undef PRODUCT +#define PRODUCT Moonlander Mark I - Modified by <@jjerrell> + +#define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/moonlander/keymaps/jjerrell/keymap.c b/keyboards/moonlander/keymaps/jjerrell/keymap.c new file mode 100644 index 0000000000..012b773678 --- /dev/null +++ b/keyboards/moonlander/keymaps/jjerrell/keymap.c @@ -0,0 +1,117 @@ +/** + * Copyright (C) 2021 Jerrell, Jacob <@jjerrell> + * + * This file is part of qmk_firmware. + * + * qmk_firmware is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * qmk_firmware is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with qmk_firmware. If not, see . + */ + +#include "jjerrell.h" + +enum moonlander_layers { + _GAME_LOWER = LAYER_SAFE_RANGE, + // _GAME_RAISE, +}; + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_WORKMAN] = LAYOUT_moonlander_mods( + __________________WORKMN_L1__________________, __________________WORKMN_R1__________________, + __________________WORKMN_L2__________________, __________________WORKMN_R2__________________, + __________________WORKMN_L3__________________, __________________WORKMN_R3__________________, + XXXXXXX, XXXXXXX, XXXXXXX, KC_LSFT, KC_RSFT, XXXXXXX, XXXXXXX, XXXXXXX + ), + + [_LOWER] = LAYOUT_moonlander_mods( + __________________LOWER_L1___________________, __________________LOWER_R1___________________, + __________________LOWER_L2___________________, __________________LOWER_R2___________________, + __________________LOWER_L3___________________, __________________LOWER_R3___________________, + XXXXXXX, XXXXXXX, XXXXXXX, KC_LSFT, KC_0, KC_DOT, KC_COMM, KC_PLUS + ), + + [_RAISE] = LAYOUT_moonlander_common( + __________________RAISE_L1___________________, __________________RAISE_R1___________________, + __________________RAISE_L2___________________, __________________RAISE_R2___________________, + __________________RAISE_L3___________________, __________________RAISE_R3___________________, + XXXXXXX, XXXXXXX, XXXXXXX, KC_LSFT, KC_RSFT, XXXXXXX, XXXXXXX, XXXXXXX + ), + + [_ADJUST] = LAYOUT_moonlander_common( + __________________ADJUST_L1__________________, __________________ADJUST_R1__________________, + __________________ADJUST_L2__________________, __________________ADJUST_R2__________________, + __________________ADJUST_L3__________________, __________________ADJUST_R3__________________, + XXXXXXX, XXXXXXX, XXXXXXX, KC_LSFT, KC_RSFT, XXXXXXX, XXXXXXX, XXXXXXX + ), + + [_SPECIAL] = LAYOUT_moonlander_common( + XXXXXXX, XXXXXXX, KC_WH_D, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, KC_WH_L, KC_WH_U, KC_WH_R, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, KC_LALT, KC_RALT, XXXXXXX, XXXXXXX, XXXXXXX + ), + + [_GAME] = LAYOUT_moonlander_gamepad( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, + KC_TAB, __________________QWERTY_L1__________________, KC_SLSH, + KC_LALT, __________________QWERTY_L2__________________, KC_BSLS, + KC_LSFT, __________________QWERTY_L3__________________, + KC_LGUI, MACRO_1, MACRO_2, MACRO_3, MACRO_4, KC_LOCK, + KC_SPC, KC_BTN2, MO(_LOWER) + ), + [_GAME_LOWER] = LAYOUT_moonlander_gamepad( + KC_GRV, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, + KC_TAB, __________________QWERTY_L1__________________, KC_SLSH, + KC_LALT, __________________QWERTY_L2__________________, KC_BSLS, + KC_LSFT, __________________QWERTY_L3__________________, + KC_LGUI, MACRO_5, MACRO_6, MACRO_7, MACRO_8, KC_LOCK, + KC_SPC, KC_BTN2, MO(_LOWER) + ) +}; +// clang-format on + +layer_state_t layer_state_set_keymap(layer_state_t state) { + ML_LED_1(0); + ML_LED_2(0); + ML_LED_3(0); + ML_LED_4(0); + ML_LED_5(0); + ML_LED_6(0); + state = update_tri_layer_state(state, _GAME, _LOWER, _GAME_LOWER); + switch (get_highest_layer(state)) { + case 1: + ML_LED_1(1); + ML_LED_4(1); + break; + case 2: + ML_LED_2(1); + ML_LED_5(1); + break; + case 3: + ML_LED_3(1); + break; + case 4: + ML_LED_4(1); + break; + case 5: + ML_LED_5(1); + break; + case 6: + ML_LED_6(1); + break; + default: + break; + } + + return state; +} diff --git a/keyboards/moonlander/keymaps/jjerrell/readme.md b/keyboards/moonlander/keymaps/jjerrell/readme.md new file mode 100644 index 0000000000..51476f8ab9 --- /dev/null +++ b/keyboards/moonlander/keymaps/jjerrell/readme.md @@ -0,0 +1,3 @@ +# Jacob Jerrell's Moonlander Keymap + +Concrete proof and acceptance of a problem. There is some not so custom Moonlander LED control in here but everything else is implemented in [my userspace](../../../../users/jjerrell/). diff --git a/keyboards/moonlander/keymaps/jjerrell/rules.mk b/keyboards/moonlander/keymaps/jjerrell/rules.mk new file mode 100644 index 0000000000..ef72559a0c --- /dev/null +++ b/keyboards/moonlander/keymaps/jjerrell/rules.mk @@ -0,0 +1 @@ +AUDIO_ENABLE = yes -- cgit v1.2.3 From d5eb673426230a87be229219127c2f553c7fd8f2 Mon Sep 17 00:00:00 2001 From: Hugues Morisset Date: Fri, 13 Aug 2021 20:52:27 +0200 Subject: [Keyboard] Interlace matrix scan for performance on Moonlander (#13625) --- keyboards/moonlander/matrix.c | 158 ++++++++++++++++++++++-------------------- 1 file changed, 82 insertions(+), 76 deletions(-) (limited to 'keyboards/moonlander') diff --git a/keyboards/moonlander/matrix.c b/keyboards/moonlander/matrix.c index dbd44d1618..8f2610fc6c 100644 --- a/keyboards/moonlander/matrix.c +++ b/keyboards/moonlander/matrix.c @@ -129,10 +129,29 @@ void matrix_init(void) { uint8_t matrix_scan(void) { bool changed = false; + // Try to re-init right side + if (!mcp23018_initd) { + if (++mcp23018_reset_loop == 0) { + // if (++mcp23018_reset_loop >= 1300) { + // since mcp23018_reset_loop is 8 bit - we'll try to reset once in 255 matrix scans + // this will be approx bit more frequent than once per second + print("trying to reset mcp23018\n"); + mcp23018_init(); + if (!mcp23018_initd) { + print("left side not responding\n"); + } else { + print("left side attached\n"); +#ifdef RGB_MATRIX_ENABLE + rgb_matrix_init(); +#endif + } + } + } + matrix_row_t data = 0; // actual matrix - for (uint8_t row = 0; row < ROWS_PER_HAND; row++) { - // strobe row + for (uint8_t row = 0; row <= ROWS_PER_HAND; row++) { + // strobe row switch (row) { case 0: writePinHigh(B10); break; case 1: writePinHigh(B11); break; @@ -140,94 +159,81 @@ uint8_t matrix_scan(void) { case 3: writePinHigh(B13); break; case 4: writePinHigh(B14); break; case 5: writePinHigh(B15); break; + case 6: break; // Left hand has 6 rows } - // need wait to settle pin state - matrix_io_delay(); - - // read col data - data = ( - (readPin(A0) << 0 ) | - (readPin(A1) << 1 ) | - (readPin(A2) << 2 ) | - (readPin(A3) << 3 ) | - (readPin(A6) << 4 ) | - (readPin(A7) << 5 ) | - (readPin(B0) << 6 ) - ); - - // unstrobe row - switch (row) { - case 0: writePinLow(B10); break; - case 1: writePinLow(B11); break; - case 2: writePinLow(B12); break; - case 3: writePinLow(B13); break; - case 4: writePinLow(B14); break; - case 5: writePinLow(B15); break; - } - - if (matrix_debouncing[row] != data) { - matrix_debouncing[row] = data; - debouncing = true; - debouncing_time = timer_read(); - changed = true; - } - } - - for (uint8_t row = 0; row <= ROWS_PER_HAND; row++) { // right side - - if (!mcp23018_initd) { - if (++mcp23018_reset_loop == 0) { - // if (++mcp23018_reset_loop >= 1300) { - // since mcp23018_reset_loop is 8 bit - we'll try to reset once in 255 matrix scans - // this will be approx bit more frequent than once per second - print("trying to reset mcp23018\n"); - mcp23018_init(); - if (!mcp23018_initd) { - print("left side not responding\n"); - } else { - print("left side attached\n"); -#ifdef RGB_MATRIX_ENABLE - rgb_matrix_init(); -#endif - } + if (mcp23018_initd) { + // #define MCP23_ROW_PINS { GPB5, GBP4, GBP3, GBP2, GBP1, GBP0 } outputs + // #define MCP23_COL_PINS { GPA0, GBA1, GBA2, GBA3, GBA4, GBA5, GBA6 } inputs + + // select row + mcp23018_tx[0] = 0x12; // GPIOA + mcp23018_tx[1] = (0b01111111 & ~(1 << (row))) | ((uint8_t)!mcp23018_leds[2] << 7); // activate row + mcp23018_tx[2] = ((uint8_t)!mcp23018_leds[1] << 6) | ((uint8_t)!mcp23018_leds[0] << 7); // activate row + + if (MSG_OK != i2c_transmit(MCP23018_DEFAULT_ADDRESS << 1, mcp23018_tx, 3, I2C_TIMEOUT)) { + dprintf("error hori\n"); + mcp23018_initd = false; } - } - // #define MCP23_ROW_PINS { GPB5, GBP4, GBP3, GBP2, GBP1, GBP0 } outputs - // #define MCP23_COL_PINS { GPA0, GBA1, GBA2, GBA3, GBA4, GBA5, GBA6 } inputs + // read col - // select row - - mcp23018_tx[0] = 0x12; // GPIOA - mcp23018_tx[1] = (0b01111111 & ~(1 << (row))) | ((uint8_t)!mcp23018_leds[2] << 7); // activate row - mcp23018_tx[2] = ((uint8_t)!mcp23018_leds[1] << 6) | ((uint8_t)!mcp23018_leds[0] << 7); // activate row - - if (MSG_OK != i2c_transmit(MCP23018_DEFAULT_ADDRESS << 1, mcp23018_tx, 3, I2C_TIMEOUT)) { - dprintf("error hori\n"); - mcp23018_initd = false; - } + mcp23018_tx[0] = 0x13; // GPIOB + if (MSG_OK != i2c_readReg(MCP23018_DEFAULT_ADDRESS << 1, mcp23018_tx[0], &mcp23018_rx[0], 1, I2C_TIMEOUT)) { + dprintf("error vert\n"); + mcp23018_initd = false; + } - // read col + data = ~(mcp23018_rx[0] & 0b00111111); + // data = 0x01; - mcp23018_tx[0] = 0x13; // GPIOB - if (MSG_OK != i2c_readReg(MCP23018_DEFAULT_ADDRESS << 1, mcp23018_tx[0], &mcp23018_rx[0], 1, I2C_TIMEOUT)) { - dprintf("error vert\n"); - mcp23018_initd = false; + if (matrix_debouncing_right[row] != data) { + matrix_debouncing_right[row] = data; + debouncing_right = true; + debouncing_time_right = timer_read(); + changed = true; + } } - data = ~(mcp23018_rx[0] & 0b00111111); - // data = 0x01; + // left side + if (row < ROWS_PER_HAND) { + // i2c comm incur enough wait time + if (!mcp23018_initd) { + // need wait to settle pin state + matrix_io_delay(); + } + // read col data + data = ( + (readPin(A0) << 0 ) | + (readPin(A1) << 1 ) | + (readPin(A2) << 2 ) | + (readPin(A3) << 3 ) | + (readPin(A6) << 4 ) | + (readPin(A7) << 5 ) | + (readPin(B0) << 6 ) + ); + // unstrobe row + switch (row) { + case 0: writePinLow(B10); break; + case 1: writePinLow(B11); break; + case 2: writePinLow(B12); break; + case 3: writePinLow(B13); break; + case 4: writePinLow(B14); break; + case 5: writePinLow(B15); break; + case 6: break; + } - if (matrix_debouncing_right[row] != data) { - matrix_debouncing_right[row] = data; - debouncing_right = true; - debouncing_time_right = timer_read(); - changed = true; + if (matrix_debouncing[row] != data) { + matrix_debouncing[row] = data; + debouncing = true; + debouncing_time = timer_read(); + changed = true; + } } } + // Debounce both hands if (debouncing && timer_elapsed(debouncing_time) > DEBOUNCE) { for (int row = 0; row < ROWS_PER_HAND; row++) { matrix[row] = matrix_debouncing[row]; -- cgit v1.2.3 From 4791cfae1af0bc15a0bd8417c5195bf482b87605 Mon Sep 17 00:00:00 2001 From: Ryan Date: Sun, 12 Sep 2021 14:04:56 +1000 Subject: Remove width, height and key_count from info.json (#14274) --- keyboards/moonlander/info.json | 3 --- 1 file changed, 3 deletions(-) (limited to 'keyboards/moonlander') diff --git a/keyboards/moonlander/info.json b/keyboards/moonlander/info.json index 34f4e8a9ae..60b560eeee 100644 --- a/keyboards/moonlander/info.json +++ b/keyboards/moonlander/info.json @@ -2,9 +2,6 @@ "keyboard_name": "Moonlander Mark I", "url": "zsa.io/moonlander", "maintainer": "ZSA via Drashna", - "width": 17, - "height": 8, - "layouts": { "LAYOUT_moonlander": { "layout": [ -- cgit v1.2.3 From 5af17997359d91ee0a7340d1e17514fe8c8a46f1 Mon Sep 17 00:00:00 2001 From: Ryan Date: Sun, 12 Sep 2021 15:27:29 +1000 Subject: Remove BLUETOOTH_ENABLE from keyboard-level rules.mk (#14379) --- keyboards/moonlander/rules.mk | 1 - 1 file changed, 1 deletion(-) (limited to 'keyboards/moonlander') diff --git a/keyboards/moonlander/rules.mk b/keyboards/moonlander/rules.mk index cb9cd299e6..557c2c4650 100644 --- a/keyboards/moonlander/rules.mk +++ b/keyboards/moonlander/rules.mk @@ -19,7 +19,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = yes # Audio output CUSTOM_MATRIX = yes DEBOUNCE_TYPE = custom -- cgit v1.2.3 From 40578621a76b43481116fd73b10b8cdec3d3a7ef Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Fri, 17 Sep 2021 13:00:42 -0700 Subject: [Keyboard] Move Moonlander off 'Proton C' board (#14478) --- keyboards/moonlander/halconf.h | 22 ++++++++++++++++++++++ keyboards/moonlander/mcuconf.h | 39 +++++++++++++++++++++++++++++++++++++++ keyboards/moonlander/rules.mk | 3 +-- 3 files changed, 62 insertions(+), 2 deletions(-) create mode 100644 keyboards/moonlander/halconf.h create mode 100644 keyboards/moonlander/mcuconf.h (limited to 'keyboards/moonlander') diff --git a/keyboards/moonlander/halconf.h b/keyboards/moonlander/halconf.h new file mode 100644 index 0000000000..46b53b1a7f --- /dev/null +++ b/keyboards/moonlander/halconf.h @@ -0,0 +1,22 @@ +/* Copyright 2021 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#define HAL_USE_I2C TRUE +#define HAL_USE_GPT TRUE +#define HAL_USE_DAC TRUE + +#include_next diff --git a/keyboards/moonlander/mcuconf.h b/keyboards/moonlander/mcuconf.h new file mode 100644 index 0000000000..69f458a937 --- /dev/null +++ b/keyboards/moonlander/mcuconf.h @@ -0,0 +1,39 @@ +/* Copyright 2021 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include_next "mcuconf.h" + +// for i2c expander, and ISSI +#undef STM32_I2C_USE_I2C1 +#define STM32_I2C_USE_I2C1 TRUE + +// for future hardwar +#undef STM32_I2C_USE_I2C2 +#define STM32_I2C_USE_I2C2 TRUE + +// for audio +#undef STM32_DAC_USE_DAC1_CH1 +#define STM32_DAC_USE_DAC1_CH1 TRUE +#undef STM32_DAC_USE_DAC1_CH2 +#define STM32_DAC_USE_DAC1_CH2 TRUE +#undef STM32_GPT_USE_TIM6 +#define STM32_GPT_USE_TIM6 TRUE +#undef STM32_GPT_USE_TIM7 +#define STM32_GPT_USE_TIM7 TRUE +#undef STM32_GPT_USE_TIM8 +#define STM32_GPT_USE_TIM8 TRUE diff --git a/keyboards/moonlander/rules.mk b/keyboards/moonlander/rules.mk index 557c2c4650..23bf7b7087 100644 --- a/keyboards/moonlander/rules.mk +++ b/keyboards/moonlander/rules.mk @@ -1,6 +1,5 @@ # MCU name MCU = STM32F303 -BOARD = QMK_PROTON_C # Bootloader selection BOOTLOADER = stm32-dfu @@ -8,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug -- cgit v1.2.3 From 54b8d6a89182390533ccd1cb715fbaf59720bf3e Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Fri, 1 Oct 2021 17:13:15 -0700 Subject: [Keyboard] Convert ZSA's Moonlander keyboard to matrix lite (#14667) --- keyboards/moonlander/matrix.c | 140 ++++++++---------------------------------- keyboards/moonlander/rules.mk | 3 +- 2 files changed, 28 insertions(+), 115 deletions(-) (limited to 'keyboards/moonlander') diff --git a/keyboards/moonlander/matrix.c b/keyboards/moonlander/matrix.c index 8f2610fc6c..782f131a50 100644 --- a/keyboards/moonlander/matrix.c +++ b/keyboards/moonlander/matrix.c @@ -16,55 +16,26 @@ * along with this program. If not, see . */ - - -#include -#include -#include -#include -#include "timer.h" -#include "wait.h" -#include "print.h" -#include "matrix.h" -#include "action.h" -#include "keycode.h" -#include #include "moonlander.h" #include "i2c_master.h" -#include "debounce.h" /* #define MATRIX_ROW_PINS { B10, B11, B12, B13, B14, B15 } outputs #define MATRIX_COL_PINS { A0, A1, A2, A3, A6, A7, B0 } inputs */ /* matrix state(1:on, 0:off) */ -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing_right[MATRIX_COLS]; -static bool debouncing = false; -static uint16_t debouncing_time = 0; -static bool debouncing_right = false; -static uint16_t debouncing_time_right = 0; +extern matrix_row_t matrix[MATRIX_ROWS]; // debounced values +extern matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values +static matrix_row_t raw_matrix_right[MATRIX_COLS]; #define ROWS_PER_HAND (MATRIX_ROWS / 2) - -#ifndef MATRIX_IO_DELAY -# define MATRIX_IO_DELAY 20 +#ifndef MOONLANDER_I2C_TIMEOUT +# define MOONLANDER_I2C_TIMEOUT 100 #endif extern bool mcp23018_leds[3]; extern bool is_launching; -__attribute__((weak)) void matrix_init_user(void) {} - -__attribute__((weak)) void matrix_scan_user(void) {} - -__attribute__((weak)) void matrix_init_kb(void) { matrix_init_user(); } - -__attribute__((weak)) void matrix_scan_kb(void) { matrix_scan_user(); } - -__attribute__((weak)) void matrix_io_delay(void) { wait_us(MATRIX_IO_DELAY); } - bool mcp23018_initd = false; static uint8_t mcp23018_reset_loop; @@ -81,14 +52,14 @@ void mcp23018_init(void) { mcp23018_tx[1] = 0b00000000; // A is output mcp23018_tx[2] = 0b00111111; // B is inputs - if (MSG_OK != i2c_transmit(MCP23018_DEFAULT_ADDRESS << 1, mcp23018_tx, 3, I2C_TIMEOUT)) { + if (MSG_OK != i2c_transmit(MCP23018_DEFAULT_ADDRESS << 1, mcp23018_tx, 3, MOONLANDER_I2C_TIMEOUT)) { dprintf("error hori\n"); } else { mcp23018_tx[0] = 0x0C; // GPPUA mcp23018_tx[1] = 0b10000000; // A is not pulled-up mcp23018_tx[2] = 0b11111111; // B is pulled-up - if (MSG_OK != i2c_transmit(MCP23018_DEFAULT_ADDRESS << 1, mcp23018_tx, 3, I2C_TIMEOUT)) { + if (MSG_OK != i2c_transmit(MCP23018_DEFAULT_ADDRESS << 1, mcp23018_tx, 3, MOONLANDER_I2C_TIMEOUT)) { dprintf("error hori\n"); } else { mcp23018_initd = is_launching = true; @@ -96,10 +67,9 @@ void mcp23018_init(void) { } } -void matrix_init(void) { +void matrix_init_custom(void) { dprintf("matrix init\n"); // debug_matrix = true; - // outputs setPinOutput(B10); setPinOutput(B11); @@ -117,16 +87,10 @@ void matrix_init(void) { setPinInputLow(A7); setPinInputLow(B0); - memset(matrix, 0, MATRIX_ROWS * sizeof(matrix_row_t)); - memset(matrix_debouncing, 0, MATRIX_ROWS * sizeof(matrix_row_t)); - memset(matrix_debouncing_right, 0, MATRIX_COLS * sizeof(matrix_row_t)); - mcp23018_init(); - - matrix_init_quantum(); } -uint8_t matrix_scan(void) { +bool matrix_scan_custom(matrix_row_t current_matrix[]) { bool changed = false; // Try to re-init right side @@ -151,7 +115,7 @@ uint8_t matrix_scan(void) { matrix_row_t data = 0; // actual matrix for (uint8_t row = 0; row <= ROWS_PER_HAND; row++) { - // strobe row + // strobe row switch (row) { case 0: writePinHigh(B10); break; case 1: writePinHigh(B11); break; @@ -172,7 +136,7 @@ uint8_t matrix_scan(void) { mcp23018_tx[1] = (0b01111111 & ~(1 << (row))) | ((uint8_t)!mcp23018_leds[2] << 7); // activate row mcp23018_tx[2] = ((uint8_t)!mcp23018_leds[1] << 6) | ((uint8_t)!mcp23018_leds[0] << 7); // activate row - if (MSG_OK != i2c_transmit(MCP23018_DEFAULT_ADDRESS << 1, mcp23018_tx, 3, I2C_TIMEOUT)) { + if (MSG_OK != i2c_transmit(MCP23018_DEFAULT_ADDRESS << 1, mcp23018_tx, 3, MOONLANDER_I2C_TIMEOUT)) { dprintf("error hori\n"); mcp23018_initd = false; } @@ -180,22 +144,23 @@ uint8_t matrix_scan(void) { // read col mcp23018_tx[0] = 0x13; // GPIOB - if (MSG_OK != i2c_readReg(MCP23018_DEFAULT_ADDRESS << 1, mcp23018_tx[0], &mcp23018_rx[0], 1, I2C_TIMEOUT)) { + if (MSG_OK != i2c_readReg(MCP23018_DEFAULT_ADDRESS << 1, mcp23018_tx[0], &mcp23018_rx[0], 1, MOONLANDER_I2C_TIMEOUT)) { dprintf("error vert\n"); mcp23018_initd = false; } data = ~(mcp23018_rx[0] & 0b00111111); // data = 0x01; + } else { + data = 0; + } - if (matrix_debouncing_right[row] != data) { - matrix_debouncing_right[row] = data; - debouncing_right = true; - debouncing_time_right = timer_read(); - changed = true; - } + if (raw_matrix_right[row] != data) { + raw_matrix_right[row] = data; + changed = true; } + // left side if (row < ROWS_PER_HAND) { // i2c comm incur enough wait time @@ -224,79 +189,28 @@ uint8_t matrix_scan(void) { case 6: break; } - if (matrix_debouncing[row] != data) { - matrix_debouncing[row] = data; - debouncing = true; - debouncing_time = timer_read(); + if (current_matrix[row] != data) { + current_matrix[row] = data; changed = true; } } } - - // Debounce both hands - if (debouncing && timer_elapsed(debouncing_time) > DEBOUNCE) { - for (int row = 0; row < ROWS_PER_HAND; row++) { - matrix[row] = matrix_debouncing[row]; - } - debouncing = false; - } - - if (debouncing_right && timer_elapsed(debouncing_time_right) > DEBOUNCE && mcp23018_initd) { - for (int row = 0; row < ROWS_PER_HAND; row++) { - matrix[11 - row] = 0; - for (int col = 0; col < MATRIX_COLS; col++) { - matrix[11 - row] |= ((matrix_debouncing_right[6 - col] & (1 << row) ? 1 : 0) << col); - } - } - debouncing_right = false; - } - - matrix_scan_quantum(); - - return (uint8_t)changed; -} - -bool matrix_is_on(uint8_t row, uint8_t col) { return (matrix[row] & (1 << col)); } - -matrix_row_t matrix_get_row(uint8_t row) { return matrix[row]; } - -void matrix_print(void) { - dprintf("\nr/c 01234567\n"); - for (uint8_t row = 0; row < MATRIX_ROWS; row++) { - dprintf("%X0: ", row); - matrix_row_t data = matrix_get_row(row); - for (int col = 0; col < MATRIX_COLS; col++) { - if (data & (1 << col)) - dprintf("1"); - else - dprintf("0"); + for (uint8_t row = 0; row < ROWS_PER_HAND; row++) { + current_matrix[11 - row] = 0; + for (uint8_t col = 0; col < MATRIX_COLS; col++) { + current_matrix[11 - row] |= ((raw_matrix_right[6 - col] & (1 << row) ? 1 : 0) << col); } - dprintf("\n"); } + return changed; } // DO NOT REMOVE // Needed for proper wake/sleep void matrix_power_up(void) { bool temp_launching = is_launching; - // outputs - setPinOutput(B10); - setPinOutput(B11); - setPinOutput(B12); - setPinOutput(B13); - setPinOutput(B14); - setPinOutput(B15); - // inputs - setPinInputLow(A0); - setPinInputLow(A1); - setPinInputLow(A2); - setPinInputLow(A3); - setPinInputLow(A6); - setPinInputLow(A7); - setPinInputLow(B0); + matrix_init_custom(); - mcp23018_init(); is_launching = temp_launching; if (!is_launching) { ML_LED_1(false); diff --git a/keyboards/moonlander/rules.mk b/keyboards/moonlander/rules.mk index 23bf7b7087..ed448ff434 100644 --- a/keyboards/moonlander/rules.mk +++ b/keyboards/moonlander/rules.mk @@ -19,8 +19,7 @@ NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow AUDIO_ENABLE = yes # Audio output -CUSTOM_MATRIX = yes -DEBOUNCE_TYPE = custom +CUSTOM_MATRIX = lite SWAP_HANDS_ENABLE = yes RGB_MATRIX_ENABLE = yes RGB_MATRIX_DRIVER = IS31FL3731 -- cgit v1.2.3 From d9e077468ab3446cbd7306a453a73dad2c1403e8 Mon Sep 17 00:00:00 2001 From: Quinn Mikelson Date: Mon, 11 Oct 2021 02:57:44 -0700 Subject: [Keyboard] Add ZSA Moonlander VIA support (#14603) Co-authored-by: Quinn Mikelson Co-authored-by: Drashna Jael're --- keyboards/moonlander/config.h | 3 +- keyboards/moonlander/keymaps/via/keymap.c | 126 +++++++++++++++++++++++++++++ keyboards/moonlander/keymaps/via/readme.md | 7 ++ keyboards/moonlander/keymaps/via/rules.mk | 1 + 4 files changed, 136 insertions(+), 1 deletion(-) create mode 100644 keyboards/moonlander/keymaps/via/keymap.c create mode 100644 keyboards/moonlander/keymaps/via/readme.md create mode 100644 keyboards/moonlander/keymaps/via/rules.mk (limited to 'keyboards/moonlander') diff --git a/keyboards/moonlander/config.h b/keyboards/moonlander/config.h index 522cb0ab27..f2e5088a34 100644 --- a/keyboards/moonlander/config.h +++ b/keyboards/moonlander/config.h @@ -99,8 +99,9 @@ #define DYNAMIC_KEYMAP_EEPROM_ADDR (EECONFIG_SIZE + FIRMWARE_VERSION_SIZE) #ifdef EEPROM_I2C # define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 16383 -# define DYNAMIC_KEYMAP_LAYER_COUNT 32 +# define DYNAMIC_KEYMAP_LAYER_COUNT 8 #endif +#define VIA_QMK_RGBLIGHT_ENABLE #define AUDIO_PIN A5 #define AUDIO_PIN_ALT A4 diff --git a/keyboards/moonlander/keymaps/via/keymap.c b/keyboards/moonlander/keymaps/via/keymap.c new file mode 100644 index 0000000000..13a299b434 --- /dev/null +++ b/keyboards/moonlander/keymaps/via/keymap.c @@ -0,0 +1,126 @@ +/* Copyright 2020 ZSA Technology Labs, Inc <@zsa> + * Copyright 2020 Jack Humbert + * Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + + + +#include QMK_KEYBOARD_H +#include "version.h" + +enum layers { + BASE, // default layer + SYMB, // symbols + MDIA, // media keys +}; + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [BASE] = LAYOUT_moonlander( + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_DEL, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_HYPR, KC_MEH, KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN), LGUI_T(KC_QUOT), + KC_LSFT, LCTL_T(KC_Z),KC_X,KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RCTL_T(KC_SLSH), KC_RSFT, + LT(SYMB,KC_GRV),WEBUSB_PAIR,A(KC_LSFT),KC_LEFT, KC_RGHT, LALT_T(KC_APP), RCTL_T(KC_ESC), KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, MO(SYMB), + KC_SPC, KC_BSPC, KC_LGUI, KC_LALT, KC_TAB, KC_ENT + ), + + [SYMB] = LAYOUT_moonlander( + USER00, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + _______, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, _______, _______, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, + _______, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, _______, _______, KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, _______, + _______, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, _______, + _______, _______, _______, _______, _______, RGB_VAI, RGB_TOG, _______, KC_DOT, KC_0, KC_EQL, _______, + RGB_HUD, RGB_VAD, RGB_HUI, _______, _______, _______ + ), + + [MDIA] = LAYOUT_moonlander( + USER01, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, + _______, _______, _______, KC_MS_U, _______, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST, + _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, _______, _______, + _______, _______, _______, KC_BTN1, KC_BTN2, _______, _______, KC_VOLU, KC_VOLD, KC_MUTE, _______, _______, + _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT_moonlander( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ + ), + [4] = LAYOUT_moonlander( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ + ), + [5] = LAYOUT_moonlander( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ + ), + [6] = LAYOUT_moonlander( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ + ), + [7] = LAYOUT_moonlander( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ + ), +}; +// clang-format on + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case USER00: + if (record->event.pressed) { + SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + return false; + case USER01: + if (record->event.pressed) { + keyboard_config.led_level ^= 1; + eeconfig_update_kb(keyboard_config.raw); + if (keyboard_config.led_level) { + layer_state_set_kb(layer_state); + } else { + ML_LED_1(false); + ML_LED_2(false); + ML_LED_3(false); + ML_LED_4(false); + ML_LED_5(false); + ML_LED_6(false); + } + } + break; + } + return true; +} diff --git a/keyboards/moonlander/keymaps/via/readme.md b/keyboards/moonlander/keymaps/via/readme.md new file mode 100644 index 0000000000..8bede7bee3 --- /dev/null +++ b/keyboards/moonlander/keymaps/via/readme.md @@ -0,0 +1,7 @@ +# VIA Keymap for the Moonlander + +This is based on the default layout for the Moonlander keyboard from ZSA Techonology Labs. + +ZSA does not provide any support for VIA (the app or firmware feature). Any and all issues should be directed to [VIA](https://github.com/the-via). + +Initial flash and reflash may make the keyboard look like it has locked up. This is because it can take a while to load the EEPROM data (the keymap), and is halted by that process until it's finished. diff --git a/keyboards/moonlander/keymaps/via/rules.mk b/keyboards/moonlander/keymaps/via/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/moonlander/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes -- cgit v1.2.3