Merge remote-tracking branch 'origin/develop' into xap

This commit is contained in:
zvecr 2022-04-16 23:49:41 +01:00
commit 3c20f00238
41 changed files with 421 additions and 101 deletions

View File

@ -80,7 +80,8 @@ OTHER_OPTION_NAMES = \
LED_MIRRORED \
RGBLIGHT_FULL_POWER \
LTO_ENABLE \
PROGRAMMABLE_BUTTON_ENABLE
PROGRAMMABLE_BUTTON_ENABLE \
SECURE_ENABLE
define NAME_ECHO
@printf " %-30s = %-16s # %s\\n" "$1" "$($1)" "$(origin $1)"

View File

@ -78,6 +78,7 @@
"QMK_KEYS_PER_SCAN": {"info_key": "qmk.keys_per_scan", "value_type": "int"},
"QMK_LED": {"info_key": "qmk_lufa_bootloader.led"},
"QMK_SPEAKER": {"info_key": "qmk_lufa_bootloader.speaker"},
"SECURE_UNLOCK_SEQUENCE": {"info_key": "secure.unlock_sequence", "value_type": "array.array.int", "to_json": false},
"SECURE_UNLOCK_TIMEOUT": {"info_key": "secure.unlock_timeout", "value_type": "int"},
"SECURE_IDLE_TIMEOUT": {"info_key": "secure.idle_timeout", "value_type": "int"},
"SENDSTRING_BELL": {"info_key": "audio.macro_beep", "value_type": "bool"},

View File

@ -657,18 +657,19 @@ You can enable a single effect by defining `ENABLE_[EFFECT_NAME]` in your `confi
### RGB Matrix Effect Typing Heatmap :id=rgb-matrix-effect-typing-heatmap
This effect will color the RGB matrix according to a heatmap of recently pressed
keys. Whenever a key is pressed its "temperature" increases as well as that of
its neighboring keys. The temperature of each key is then decreased
automatically every 25 milliseconds by default.
This effect will color the RGB matrix according to a heatmap of recently pressed keys. Whenever a key is pressed its "temperature" increases as well as that of its neighboring keys. The temperature of each key is then decreased automatically every 25 milliseconds by default.
In order to change the delay of temperature decrease define
`RGB_MATRIX_TYPING_HEATMAP_DECREASE_DELAY_MS`:
In order to change the delay of temperature decrease define `RGB_MATRIX_TYPING_HEATMAP_DECREASE_DELAY_MS`:
```c
#define RGB_MATRIX_TYPING_HEATMAP_DECREASE_DELAY_MS 50
```
Heatmap effect may not light up the correct adjacent LEDs for certain key matrix layout such as split keyboards. The following define will limit the effect to pressed keys only:
```c
#define RGB_MATRIX_TYPING_HEATMAP_SLIM
```
## Custom RGB Matrix Effects :id=custom-rgb-matrix-effects
By setting `RGB_MATRIX_CUSTOM_USER = yes` in `rules.mk`, new effects can be defined directly from your keymap or userspace, without having to edit any QMK core files. To declare new effects, create a `rgb_matrix_user.inc` file in the user keymap directory or userspace folder.

View File

@ -326,6 +326,19 @@ void post_process_record_user(uint16_t keycode, keyrecord_t *record) {
```
would turn the layer 0 (or 1) on and off again three times when `DEBUG` is pressed.
Blinking accumulates layers so if multiple layers are set blinking at the same time they will all blink for the duration and repeat times of the last layer to be blinked.
To stop these other layers from blinking use `rgblight_unblink_layer` or `rgblight_unblink_all_but_layer`:
```c
rgblight_blink_layer(1, 500);
rgblight_unblink_all_but_layer(1);
```
```c
rgblight_unblink_layer(3);
rgblight_blink_layer(2, 500);
```
!> Lighting layers on split keyboards will require layer state synced to the slave half (e.g. `#define SPLIT_LAYER_STATE_ENABLE`). See [data sync options](feature_split_keyboard.md#data-sync-options) for more details.
### Overriding RGB Lighting on/off status

View File

@ -112,7 +112,7 @@ uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) {
}
```
The reason being that `TAPPING_TERM` is a macro that expands to a constant integer and thus cannot be changed at runtime whereas `g_tapping_term` is a variable whose value can be changed at runtime. If you want, you can temporarily enable `DYNAMIC_TAPPING_TERM_ENABLE` to find a suitable tapping term value and then disable that feature and revert back to using the classic syntax for per-key tapping term settings.
The reason being that `TAPPING_TERM` is a macro that expands to a constant integer and thus cannot be changed at runtime whereas `g_tapping_term` is a variable whose value can be changed at runtime. If you want, you can temporarily enable `DYNAMIC_TAPPING_TERM_ENABLE` to find a suitable tapping term value and then disable that feature and revert back to using the classic syntax for per-key tapping term settings. In case you need to access the tapping term from elsewhere in your code, you can use the `GET_TAPPING_TERM(keycode, record)` macro. This macro will expand to whatever is the appropriate access pattern given the current configuration.
## Tap-Or-Hold Decision Modes

View File

@ -23,7 +23,7 @@
#define PRODUCT_ID 0xB260
#define DEVICE_VER 0x0000
#define MANUFACTURER Cutie Club
#define PRODUCT Keebcats Denis 60%
#define PRODUCT Keebcats Denis 60
/* key matrix size */
#define MATRIX_ROWS 5

View File

@ -23,7 +23,7 @@
#define PRODUCT_ID 0xB265
#define DEVICE_VER 0x0000
#define MANUFACTURER Cutie Club
#define PRODUCT Keebcats Dougal 65%
#define PRODUCT Keebcats Dougal 65
/* key matrix size */
#define MATRIX_ROWS 5

View File

@ -0,0 +1,62 @@
/* Copyright 2022 Dztech
*
* 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 <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "config_common.h"
/* USB Device descriptor parameter */
#define VENDOR_ID 0x4B42
#define PRODUCT_ID 0x0103
#define DEVICE_VER 0x0001
#define MANUFACTURER KBDFans
#define PRODUCT phaseone
/* key matrix size */
#define MATRIX_ROWS 5
#define MATRIX_COLS 15
#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4 }
#define MATRIX_COL_PINS { B5, C6, C7, F7, F6, F5, F4, F1, E6, B7, D0, D1, D2, D3, D5 }
#define UNUSED_PINS
#define LED_NUM_LOCK_PIN D7
#define LED_CAPS_LOCK_PIN D6
#define LED_PIN_ON_STATE 0
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
/* Set 0 if debouncing isn't needed */
#define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
#define RGB_DI_PIN B6
#ifdef RGB_DI_PIN
#define RGBLIGHT_EFFECT_BREATHING
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
#define RGBLIGHT_EFFECT_SNAKE
#define RGBLIGHT_EFFECT_KNIGHT
#define RGBLIGHT_EFFECT_CHRISTMAS
#define RGBLIGHT_EFFECT_STATIC_GRADIENT
#define RGBLIGHT_EFFECT_RGB_TEST
#define RGBLIGHT_EFFECT_ALTERNATING
#define RGBLIGHT_EFFECT_TWINKLE
#define RGBLIGHT_DEFAULT_MODE (RGBLIGHT_EFFECT_RAINBOW_MOOD + 6)
#define RGBLIGHT_DEFAULT_SPD 15
#define RGBLED_NUM 4
#define RGBLIGHT_HUE_STEP 10
#define RGBLIGHT_SAT_STEP 10
#define RGBLIGHT_VAL_STEP 10
#define RGBLIGHT_SLEEP
#endif
#define VIA_EEPROM_LAYOUT_OPTIONS_SIZE 2

View File

@ -0,0 +1,47 @@
/* Copyright 2022 Dztech
*
* 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 <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_all(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, KC_HOME,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN,
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RCTL, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT
),
[1] = LAYOUT_all(
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_MUTE, KC_INS,
_______, _______, KC_UP, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, _______, _______,
_______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_END, KC_PGDN, KC_DOWN, _______, KC_PGUP, _______,
_______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END
),
[2] = LAYOUT_all(
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_MUTE, KC_INS,
_______, _______, KC_UP, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, _______, _______,
_______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_END, KC_PGDN, KC_DOWN, _______, KC_PGUP, _______,
_______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END
),
[3] = LAYOUT_all(
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_MUTE, KC_INS,
_______, _______, KC_UP, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, _______, _______,
_______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_END, KC_PGDN, KC_DOWN, _______, KC_PGUP, _______,
_______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END
)
};

View File

@ -0,0 +1,47 @@
/* Copyright 2022 Dztech
*
* 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 <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_all(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, KC_HOME,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN,
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RCTL, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT
),
[1] = LAYOUT_all(
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_MUTE, KC_INS,
_______, _______, KC_UP, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, _______, _______,
_______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_END, KC_PGDN, KC_DOWN, _______, KC_PGUP, _______,
_______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END
),
[2] = LAYOUT_all(
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_MUTE, KC_INS,
_______, _______, KC_UP, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, _______, _______,
_______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_END, KC_PGDN, KC_DOWN, _______, KC_PGUP, _______,
_______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END
),
[3] = LAYOUT_all(
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_MUTE, KC_INS,
_______, _______, KC_UP, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, _______, _______,
_______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_END, KC_PGDN, KC_DOWN, _______, KC_PGUP, _______,
_______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END
)
};

View File

@ -0,0 +1,2 @@
VIA_ENABLE = yes
LTO_ENABLE = yes

View File

@ -0,0 +1,20 @@
/* Copyright 2022 Dztech
*
* 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 <http://www.gnu.org/licenses/>.
*/
#include "phaseone.h"
void keyboard_pre_init_kb(void) {
setPinOutput(D4);
}

View File

@ -0,0 +1,60 @@
/* Copyright 2022 Dztech
*
* 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 <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "quantum.h"
#define LAYOUT_all( \
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K2C, K0E, \
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \
K40, K41, K42, K46, K4A, K4B, K4C, K4D, K4E \
) { \
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E}, \
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E}, \
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E}, \
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E}, \
{ K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D, K4E}, \
}
#define LAYOUT_65_ansi_blocker( \
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \
K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \
K40, K41, K42, K46, K4A, K4B, K4C, K4D, K4E \
) { \
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E}, \
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E}, \
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E}, \
{ K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E}, \
{ K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D, K4E}, \
}
#define LAYOUT_65_ansi_wkl( \
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \
K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \
K40, K42, K46, K4B, K4C, K4D, K4E \
) { \
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E}, \
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E}, \
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E}, \
{ K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E}, \
{ K40, KC_NO, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, KC_NO, K4B, K4C, K4D, K4E}, \
}

View File

@ -0,0 +1,21 @@
# PHASEONE
A 65% keyboard, include 3 layouts: WK HOTSWAP; WKL HOTSWAP and SOLDERED.
* Keyboard Maintainer: [moyi4681](https://github.com/moyi4681)
* Hardware Supported: KBDFANS PHASEONE
* Hardware Availability: [KBDfans](https://kbdfans.com/)
## Bootloader
Enter the bootloader in 3 ways:
* **Bootmagic reset**: Hold down the key at (0,0) in the matrix
* **Physical reset button**: Briefly press the button on the back of the PCB
* **Keycode in layout**: Press the key mapped to `RESET` if it is available
Make example for this keyboard (after setting up your build environment):
make kbdfans/phaseone:default
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).

View File

@ -0,0 +1,18 @@
# MCU name
MCU = atmega32u4
# Bootloader selection
BOOTLOADER = atmel-dfu
# Build Options
# change yes to no to disable
#
BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
MOUSEKEY_ENABLE = no # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration
NKRO_ENABLE = yes # Enable N-Key Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output

View File

@ -17,8 +17,8 @@
#include "config_common.h"
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x1225
#define VENDOR_ID 0x5842
#define PRODUCT_ID 0x4B6E
#define DEVICE_VER 0x0001
#define MANUFACTURER X-BOWS
#define PRODUCT KNIGHT

View File

@ -1 +1,2 @@
VIA_ENABLE = yes
LTO_ENABLE = yes

View File

@ -17,8 +17,8 @@
#include "config_common.h"
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x1227
#define VENDOR_ID 0x5842
#define PRODUCT_ID 0x4B50
#define DEVICE_VER 0x0001
#define MANUFACTURER X-BOWS
#define PRODUCT KNIGHT_PLUS

View File

@ -1 +1,2 @@
VIA_ENABLE = yes
LTO_ENABLE = yes

View File

@ -17,8 +17,8 @@
#include "config_common.h"
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x1226
#define VENDOR_ID 0x5842
#define PRODUCT_ID 0x4E61
#define DEVICE_VER 0x0001
#define MANUFACTURER X-BOWS
#define PRODUCT NATURE
@ -35,7 +35,7 @@
# define RGB_MATRIX_LED_FLUSH_LIMIT 16
# define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
// # define RGB_MATRIX_KEYPRESSES
# define RGB_MATRIX_KEYPRESSES
# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200
# define RGB_MATRIX_CENTER \
{ 92, 33 }

View File

@ -1 +1,2 @@
VIA_ENABLE = yes
LTO_ENABLE = yes

View File

@ -16,6 +16,5 @@ NKRO_ENABLE = yes # Enable N-Key Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
SLEEP_LED_ENABLE = yes
RGB_MATRIX_ENABLE = yes
RGB_MATRIX_DRIVER = IS31FL3731

View File

@ -17,8 +17,8 @@
#include "config_common.h"
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x1228
#define VENDOR_ID 0x5842
#define PRODUCT_ID 0x4E75
#define DEVICE_VER 0x0001
#define MANUFACTURER X-BOWS
#define PRODUCT NUMPAD

View File

@ -1 +1,2 @@
VIA_ENABLE = yes
LTO_ENABLE = yes

View File

@ -17,8 +17,8 @@
#include "config_common.h"
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x1229
#define VENDOR_ID 0x5842
#define PRODUCT_ID 0x5261
#define DEVICE_VER 0x0001
#define MANUFACTURER X-BOWS
#define PRODUCT Ranger

View File

@ -1 +1,2 @@
VIA_ENABLE = yes
LTO_ENABLE = yes

View File

@ -94,7 +94,12 @@ def generate_config_items(kb_info_json, config_h_lines):
except KeyError:
continue
if key_type.startswith('array'):
if key_type.startswith('array.array'):
config_h_lines.append('')
config_h_lines.append(f'#ifndef {config_key}')
config_h_lines.append(f'# define {config_key} {{ {", ".join(["{" + ",".join(list(map(str, x))) + "}" for x in config_value])} }}')
config_h_lines.append(f'#endif // {config_key}')
elif key_type.startswith('array'):
config_h_lines.append('')
config_h_lines.append(f'#ifndef {config_key}')
config_h_lines.append(f'# define {config_key} {{ {", ".join(map(str, config_value))} }}')

View File

@ -171,8 +171,8 @@ def _extract_pins(pins):
return [_pin_name(pin) for pin in pins.split(',')]
def _parse_2d_array(raw):
"""Return a 2d array of ints
def _extract_2d_array(raw):
"""Return a 2d array of strings
"""
out_array = []
@ -189,33 +189,28 @@ def _parse_2d_array(raw):
out_array.append([])
for val in row.split(','):
out_array[-1].append(int(val))
out_array[-1].append(val)
return out_array
def _extract_2d_int_array(raw):
"""Return a 2d array of ints
"""
ret = _extract_2d_array(raw)
return [list(map(int, x)) for x in ret]
def _extract_direct_matrix(direct_pins):
"""extract direct_matrix
"""
"""
direct_pin_array = []
direct_pin_array = _extract_2d_array(direct_pins)
while direct_pins[-1] != '}':
direct_pins = direct_pins[:-1]
for row in direct_pins.split('},{'):
if row.startswith('{'):
row = row[1:]
if row.endswith('}'):
row = row[:-1]
direct_pin_array.append([])
for pin in row.split(','):
if pin == 'NO_PIN':
pin = None
direct_pin_array[-1].append(pin)
for i in range(len(direct_pin_array)):
for j in range(len(direct_pin_array[i])):
if direct_pin_array[i][j] == 'NO_PIN':
direct_pin_array[i][j] = None
return direct_pin_array
@ -238,7 +233,7 @@ def _extract_secure_unlock(info_data, config_c):
"""
unlock = config_c.get('SECURE_UNLOCK_SEQUENCE', '').replace(' ', '')[1:-1]
if unlock:
unlock_array = _parse_2d_array(unlock)
unlock_array = _extract_2d_int_array(unlock)
if 'secure' not in info_data:
info_data['secure'] = {}

View File

@ -24,17 +24,20 @@
# else
# define IS_TAPPING_RECORD(r) (IS_TAPPING() && KEYEQ(tapping_key.event.key, (r->event.key)) && tapping_key.keycode == r->keycode)
# endif
# define WITHIN_TAPPING_TERM(e) (TIMER_DIFF_16(e.time, tapping_key.event.time) < GET_TAPPING_TERM(get_record_keycode(&tapping_key, false), &tapping_key))
# ifdef DYNAMIC_TAPPING_TERM_ENABLE
uint16_t g_tapping_term = TAPPING_TERM;
__attribute__((weak)) uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) {
return g_tapping_term;
}
# endif
# ifdef TAPPING_TERM_PER_KEY
# define WITHIN_TAPPING_TERM(e) (TIMER_DIFF_16(e.time, tapping_key.event.time) < get_tapping_term(get_record_keycode(&tapping_key, false), &tapping_key))
__attribute__((weak)) uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) {
# ifdef DYNAMIC_TAPPING_TERM_ENABLE
return g_tapping_term;
# else
# define WITHIN_TAPPING_TERM(e) (TIMER_DIFF_16(e.time, tapping_key.event.time) < g_tapping_term)
return TAPPING_TERM;
# endif
}
# endif
# ifdef TAPPING_FORCE_HOLD_PER_KEY
@ -165,15 +168,7 @@ bool process_tapping(keyrecord_t *keyp) {
else if (
(
(
(
# ifdef TAPPING_TERM_PER_KEY
get_tapping_term(tapping_keycode, &tapping_key)
# else
g_tapping_term
# endif
>= 500
)
GET_TAPPING_TERM(tapping_keycode, &tapping_key) >= 500
# ifdef PERMISSIVE_HOLD_PER_KEY
|| get_permissive_hold(tapping_keycode, &tapping_key)
# elif defined(PERMISSIVE_HOLD)

View File

@ -44,3 +44,11 @@ bool get_retro_tapping(uint16_t keycode, keyrecord_t *record);
#ifdef DYNAMIC_TAPPING_TERM_ENABLE
extern uint16_t g_tapping_term;
#endif
#ifdef TAPPING_TERM_PER_KEY
# define GET_TAPPING_TERM(keycode, record) get_tapping_term(keycode, record)
#elif defined(DYNAMIC_TAPPING_TERM_ENABLE)
# define GET_TAPPING_TERM(keycode, record) g_tapping_term
#else
# define GET_TAPPING_TERM(keycode, record) (TAPPING_TERM)
#endif

View File

@ -131,6 +131,12 @@ static bool qp_drawimage_prepare_frame_for_stream_read(painter_device_t device,
// Ensure we aren't reusing any palette
qp_internal_invalidate_palette();
if (!qp_internal_bpp_capable(info->bpp)) {
qp_dprintf("qp_drawimage_recolor: fail (image bpp too high (%d), check QUANTUM_PAINTER_SUPPORTS_256_PALETTE)\n", (int)info->bpp);
qp_comms_stop(device);
return false;
}
// Handle palette if needed
const uint16_t palette_entries = 1u << info->bpp;
bool needs_pixconvert = false;
@ -146,12 +152,6 @@ static bool qp_drawimage_prepare_frame_for_stream_read(painter_device_t device,
needs_pixconvert = qp_internal_interpolate_palette(fg_hsv888, bg_hsv888, palette_entries);
}
if (!qp_internal_bpp_capable(info->bpp)) {
qp_dprintf("qp_drawimage_recolor: fail (image bpp too high (%d), check QUANTUM_PAINTER_SUPPORTS_256_PALETTE)\n", (int)info->bpp);
qp_comms_stop(device);
return false;
}
if (needs_pixconvert) {
// Convert the palette to native format
if (!driver->driver_vtable->palette_convert(device, palette_entries, qp_internal_global_pixel_lookup_table)) {

View File

@ -98,17 +98,9 @@ const pointing_device_driver_t pointing_device_driver = {
// clang-format on
#elif defined(POINTING_DEVICE_DRIVER_cirque_pinnacle_i2c) || defined(POINTING_DEVICE_DRIVER_cirque_pinnacle_spi)
# ifndef CIRQUE_PINNACLE_TAPPING_TERM
# ifdef TAPPING_TERM_PER_KEY
# include "action.h"
# include "action_tapping.h"
# define CIRQUE_PINNACLE_TAPPING_TERM get_tapping_term(KC_BTN1, &(keyrecord_t){})
# else
# ifdef TAPPING_TERM
# define CIRQUE_PINNACLE_TAPPING_TERM TAPPING_TERM
# else
# define CIRQUE_PINNACLE_TAPPING_TERM 200
# endif
# endif
# define CIRQUE_PINNACLE_TAPPING_TERM GET_TAPPING_TERM(KC_BTN1, &(keyrecord_t){})
# endif
# ifndef CIRQUE_PINNACLE_TOUCH_DEBOUNCE
# define CIRQUE_PINNACLE_TOUCH_DEBOUNCE (CIRQUE_PINNACLE_TAPPING_TERM * 8)

View File

@ -182,12 +182,7 @@ static bool autoshift_press(uint16_t keycode, uint16_t now, keyrecord_t *record)
# endif
) &&
# endif
TIMER_DIFF_16(now, autoshift_time) <
# ifdef TAPPING_TERM_PER_KEY
get_tapping_term(autoshift_lastkey, record)
# else
TAPPING_TERM
# endif
TIMER_DIFF_16(now, autoshift_time) < GET_TAPPING_TERM(autoshift_lastkey, record)
) {
// clang-format on
// Allow a tap-then-hold for keyrepeat.

View File

@ -26,7 +26,7 @@ bool process_secure(uint16_t keycode, keyrecord_t *record) {
return false;
}
if (keycode == SECURE_UNLOCK) {
secure_lock();
secure_unlock();
return false;
}
if (keycode == SECURE_TOGGLE) {

View File

@ -6,6 +6,10 @@
#include <stdbool.h>
#include "action.h"
/** \brief Intercept keycodes and detect unlock sequences
*/
bool preprocess_secure(uint16_t keycode, keyrecord_t *record);
/** \brief Handle any secure specific keycodes
*/
bool process_secure(uint16_t keycode, keyrecord_t *record);

View File

@ -93,12 +93,7 @@ void perform_space_cadet(keyrecord_t *record, uint16_t sc_keycode, uint8_t holdM
register_mods(MOD_BIT(holdMod));
}
} else {
#ifdef TAPPING_TERM_PER_KEY
if (sc_last == holdMod && timer_elapsed(sc_timer) < get_tapping_term(sc_keycode, record))
#else
if (sc_last == holdMod && timer_elapsed(sc_timer) < TAPPING_TERM)
#endif
{
if (sc_last == holdMod && timer_elapsed(sc_timer) < GET_TAPPING_TERM(sc_keycode, record)) {
if (holdMod != tapMod) {
if (IS_MOD(holdMod)) {
unregister_mods(MOD_BIT(holdMod));

View File

@ -174,11 +174,7 @@ void tap_dance_task() {
if (action->custom_tapping_term > 0) {
tap_user_defined = action->custom_tapping_term;
} else {
#ifdef TAPPING_TERM_PER_KEY
tap_user_defined = get_tapping_term(action->state.keycode, &(keyrecord_t){});
#else
tap_user_defined = TAPPING_TERM;
#endif
tap_user_defined = GET_TAPPING_TERM(action->state.keycode, &(keyrecord_t){});
}
if (action->state.count && timer_elapsed(action->state.timer) > tap_user_defined) {
process_tap_dance_action_on_dance_finished(action);

View File

@ -7,6 +7,10 @@ RGB_MATRIX_EFFECT(TYPING_HEATMAP)
# endif
void process_rgb_matrix_typing_heatmap(uint8_t row, uint8_t col) {
# ifdef RGB_MATRIX_TYPING_HEATMAP_SLIM
// Limit effect to pressed keys
g_rgb_frame_buffer[row][col] = qadd8(g_rgb_frame_buffer[row][col], 32);
# else
uint8_t m_row = row - 1;
uint8_t p_row = row + 1;
uint8_t m_col = col - 1;
@ -27,6 +31,7 @@ void process_rgb_matrix_typing_heatmap(uint8_t row, uint8_t col) {
g_rgb_frame_buffer[m_row][col] = qadd8(g_rgb_frame_buffer[m_row][col], 16);
if (p_col < MATRIX_COLS) g_rgb_frame_buffer[m_row][p_col] = qadd8(g_rgb_frame_buffer[m_row][p_col], 13);
}
# endif
}
// A timer to track the last time we decremented all heatmap values.

View File

@ -826,6 +826,21 @@ void rgblight_blink_layer_repeat(uint8_t layer, uint16_t duration_ms, uint8_t ti
_repeat_timer = sync_timer_read() + duration_ms;
}
void rgblight_unblink_layer(uint8_t layer) {
rgblight_set_layer_state(layer, false);
_blinking_layer_mask &= ~((rgblight_layer_mask_t)1 << layer);
}
void rgblight_unblink_all_but_layer(uint8_t layer) {
for (uint8_t i = 0; i < RGBLIGHT_MAX_LAYERS; i++) {
if (i != layer) {
if ((_blinking_layer_mask & (rgblight_layer_mask_t)1 << i) != 0) {
rgblight_unblink_layer(i);
}
}
}
}
void rgblight_blink_layer_repeat_helper(void) {
if (_blinking_layer_mask != 0 && timer_expired(sync_timer_read(), _repeat_timer)) {
for (uint8_t layer = 0; layer < RGBLIGHT_MAX_LAYERS; layer++) {

View File

@ -216,7 +216,25 @@ extern const rgblight_segment_t *const *rgblight_layers;
# ifdef RGBLIGHT_LAYER_BLINK
# define RGBLIGHT_USE_TIMER
void rgblight_blink_layer(uint8_t layer, uint16_t duration_ms);
void rgblight_blink_layer_repeat(uint8_t layer, uint16_t duration_ms, uint8_t times);
void rgblight_blink_layer_repeat(uint8_t layer, uint16_ duration_ms, uint8_t times);
/**
* \brief Stop blinking on one layer.
*
* Stop a layer that is blinking. If the layer is not blinking it will
* be unaffected.
*
* \param layer Layer number to stop blinking.
*/
void rgblight_unblink_layer(uint8_t layer);
/**
* \brief Stop blinking all layers except one.
*
* Stop all layers that are blinking except for one specific layer.
* Layers that are not blinking are unaffected.
*
* \param layer Layer number to keep blinking.
*/
void rgblight_unblink_all_but_layer(uint8_t layer);
# endif
#endif

View File

@ -19,7 +19,7 @@
}
#endif
secure_status_t secure_status = SECURE_LOCKED;
static secure_status_t secure_status = SECURE_LOCKED;
static uint32_t unlock_time = 0;
static uint32_t idle_time = 0;