Compare commits

...

14 commits

Author SHA1 Message Date
Vinicius Souza
488c337f43 feat: add achordion 2024-08-05 15:12:28 -03:00
Vinicius Souza
04dbb6e2b8 fix: remove CAPS_WORD_ENABLE from general rules.mk 2024-07-31 15:13:05 -03:00
Vinicius Souza
ae8dda4a9c Merge remote-tracking branch 'origin/bluetooth_playground' into homerow 2024-07-31 15:09:28 -03:00
Vinicius Souza
44a4d6f3a4 wip: changes 2024-07-31 14:59:40 -03:00
lokher
613719b66d
Merge pull request #232 from jeremy-engel/q2-pro-led-indicator-index
Use expected LED indices for host and battery indicators on Q2 Pro
2024-03-02 14:17:37 +08:00
Jeremy Engel
c1ef96df3e
Use digits to indicate battery level
Co-authored-by: lokher <lokher@gmail.com>
2024-02-29 08:15:11 -08:00
Jeremy Engel
5ace91966c Use expected LED indices for host and battery indicators 2024-02-22 14:17:47 -08:00
lokher
87e48857b1
Merge pull request #213 from mindeng/bluetooth_playground
k11_pro readme.md updated: fix instruction errors
2024-01-18 16:41:22 +08:00
lokher
b448ae0214
Merge pull request #214 from Sophed/patch-1
Fix typo in effects list
2024-01-11 13:29:22 +08:00
Min Deng
da3753f994
typo fixed in k11_pro/readme.md 2024-01-10 14:07:34 +08:00
Sophia
8abf25cfe7
Fix another spelling mistake jis 2024-01-09 01:36:53 +00:00
Sophia
11edb733df
CYCKE -> CYCLE 2024-01-09 01:27:00 +00:00
Min Deng
eae78fc591
k11_pro readme.md updated: fix instruction errors
Corrected the compilation & flashing instructions in README.md for
k11_pro.
2024-01-08 10:45:43 +08:00
lokher
6f0a1d98cc fix q6 pro KC_TASK issue 2023-11-25 10:35:48 +08:00
12 changed files with 677 additions and 13 deletions

View file

@ -32,7 +32,7 @@
["08. CYCLE_OUT_IN", 8],
["09. CYCLE_OUT_IN_DUAL", 9],
["10. CYCLE_PINWHEEL", 10],
["11. CYCKE_SPIRAL", 11],
["11. CYCLE_SPIRAL", 11],
["12. DUAL_BEACON", 12],
["13. RAINBOW_BEACON", 13],
["14. JELLYBEAN_RAINDROPS", 14],

View file

@ -32,7 +32,7 @@
["08. CYCLE_OUT_IN", 8],
["09. CYCLE_OUT_IN_DUAL", 9],
["10. CYCLE_PINWHEEL", 10],
["11. CYCKE_SPIRAL", 11],
["11. CYCLE_SPIRAL", 11],
["12. DUAL_BEACON", 12],
["13. RAINBOW_BEACON", 13],
["14. JELLYBEAN_RAINDROPS", 14],

View file

@ -10,13 +10,13 @@ A customizable 65% and ergonomic keyboard.
Make example for this keyboard (after setting up your build environment):
make keychron/k11_pro/ansi:default
make keychron/k11_pro/ansi_encoder:default
make keychron/k11_pro/ansi_encoder/rgb:default
make keychron/k11_pro/ansi_encoder/white:default
Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid))
make keychron/k11_pro/ansi:default:flash
make keychron/k11_pro/ansi_encoder:default:flash
make keychron/k11_pro/ansi_encoder/rgb:default:flash
make keychron/k11_pro/ansi_encoder/white:default:flash
**Reset Key**: Hold down the key located at *K00*, commonly programmed as *Esc* while plugging in the keyboard.

View file

@ -0,0 +1,10 @@
// Configure the global tapping term (default: 200ms)
#define TAPPING_TERM 150
// Enable rapid switch from tap to hold, disables double tap hold auto-repeat.
#define QUICK_TAP_TERM 0
// This makes tap and hold keys (like Layer Tap) work better for fast typists, or for high TAPPING_TERM settings
#define PERMISSIVE_HOLD
#define ACHORDION_STREAK

View file

@ -0,0 +1,347 @@
// Copyright 2022-2024 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
/**
* @file achordion.c
* @brief Achordion implementation
*
* For full documentation, see
* <https://getreuer.info/posts/keyboards/achordion>
*/
#include "achordion.h"
#if !defined(IS_QK_MOD_TAP)
// Attempt to detect out-of-date QMK installation, which would fail with
// implicit-function-declaration errors in the code below.
#error "achordion: QMK version is too old to build. Please update QMK."
#else
// Copy of the `record` and `keycode` args for the current active tap-hold key.
static keyrecord_t tap_hold_record;
static uint16_t tap_hold_keycode = KC_NO;
// Timeout timer. When it expires, the key is considered held.
static uint16_t hold_timer = 0;
// Eagerly applied mods, if any.
static uint8_t eager_mods = 0;
// Flag to determine whether another key is pressed within the timeout.
static bool pressed_another_key_before_release = false;
#ifdef ACHORDION_STREAK
// Timer for typing streak
static uint16_t streak_timer = 0;
#else
// When disabled, is_streak is never true
#define is_streak false
#endif
// Achordion's current state.
enum {
// A tap-hold key is pressed, but hasn't yet been settled as tapped or held.
STATE_UNSETTLED,
// Achordion is inactive.
STATE_RELEASED,
// Active tap-hold key has been settled as tapped.
STATE_TAPPING,
// Active tap-hold key has been settled as held.
STATE_HOLDING,
// This state is set while calling `process_record()`, which will recursively
// call `process_achordion()`. This state is checked so that we don't process
// events generated by Achordion and potentially create an infinite loop.
STATE_RECURSING,
};
static uint8_t achordion_state = STATE_RELEASED;
// Calls `process_record()` with state set to RECURSING.
static void recursively_process_record(keyrecord_t* record, uint8_t state) {
achordion_state = STATE_RECURSING;
process_record(record);
achordion_state = state;
}
// Clears eagerly-applied mods.
static void clear_eager_mods(void) {
unregister_mods(eager_mods);
eager_mods = 0;
}
// Sends hold press event and settles the active tap-hold key as held.
static void settle_as_hold(void) {
clear_eager_mods();
// Create hold press event.
recursively_process_record(&tap_hold_record, STATE_HOLDING);
}
#ifdef ACHORDION_STREAK
static void update_streak_timer(uint16_t keycode, keyrecord_t* record) {
if (achordion_streak_continue(keycode)) {
// We use 0 to represent an unset timer, so `| 1` to force a nonzero value.
streak_timer = record->event.time | 1;
} else {
streak_timer = 0;
}
}
#endif
bool process_achordion(uint16_t keycode, keyrecord_t* record) {
// Don't process events that Achordion generated.
if (achordion_state == STATE_RECURSING) {
return true;
}
// If this is a keypress and if the key is different than the tap-hold key,
// this information is saved to a flag to be processed later when the tap-hold
// key is released.
if (!pressed_another_key_before_release && record->event.pressed &&
tap_hold_keycode != KC_NO && tap_hold_keycode != keycode) {
pressed_another_key_before_release = true;
}
// Determine whether the current event is for a mod-tap or layer-tap key.
const bool is_mt = IS_QK_MOD_TAP(keycode);
const bool is_tap_hold = is_mt || IS_QK_LAYER_TAP(keycode);
// Check that this is a normal key event, don't act on combos.
const bool is_key_event = IS_KEYEVENT(record->event);
if (achordion_state == STATE_RELEASED) {
if (is_tap_hold && record->tap.count == 0 && record->event.pressed &&
is_key_event) {
// A tap-hold key is pressed and considered by QMK as "held".
const uint16_t timeout = achordion_timeout(keycode);
if (timeout > 0) {
achordion_state = STATE_UNSETTLED;
// Save info about this key.
tap_hold_keycode = keycode;
tap_hold_record = *record;
hold_timer = record->event.time + timeout;
if (is_mt) { // Apply mods immediately if they are "eager."
uint8_t mod = mod_config(QK_MOD_TAP_GET_MODS(tap_hold_keycode));
if (achordion_eager_mod(mod)) {
eager_mods = ((mod & 0x10) == 0) ? mod : (mod << 4);
register_mods(eager_mods);
}
}
dprintf("Achordion: Key 0x%04X pressed.%s\n", keycode,
eager_mods ? " Set eager mods." : "");
return false; // Skip default handling.
}
}
#ifdef ACHORDION_STREAK
update_streak_timer(keycode, record);
#endif
return true; // Otherwise, continue with default handling.
}
if (keycode == tap_hold_keycode && !record->event.pressed) {
// The active tap-hold key is being released.
if (achordion_state == STATE_HOLDING) {
dprintln("Achordion: Key released. Plumbing hold release.");
tap_hold_record.event.pressed = false;
// Plumb hold release event.
recursively_process_record(&tap_hold_record, STATE_RELEASED);
} else if (!pressed_another_key_before_release) {
// No other key was pressed between the press and release of the tap-hold
// key, simulate a hold and then a release without waiting for Achordion
// timeout to end.
dprintln("Achordion: Key released. Simulating hold and release.");
settle_as_hold();
tap_hold_record.event.pressed = false;
// Plumb hold release event.
recursively_process_record(&tap_hold_record, STATE_RELEASED);
} else {
dprintf("Achordion: Key released.%s\n",
eager_mods ? " Clearing eager mods." : "");
if (is_mt) {
clear_eager_mods();
}
}
achordion_state = STATE_RELEASED;
// The tap-hold key is released, clear the related keycode and the flag.
tap_hold_keycode = KC_NO;
pressed_another_key_before_release = false;
return false;
}
if (achordion_state == STATE_UNSETTLED && record->event.pressed) {
#ifdef ACHORDION_STREAK
const uint16_t s_timeout =
achordion_streak_chord_timeout(tap_hold_keycode, keycode);
const bool is_streak =
streak_timer && s_timeout &&
!timer_expired(record->event.time, (streak_timer + s_timeout));
#endif
// Press event occurred on a key other than the active tap-hold key.
// If the other key is *also* a tap-hold key and considered by QMK to be
// held, then we settle the active key as held. This way, things like
// chording multiple home row modifiers will work, but let's our logic
// consider simply a single tap-hold key as "active" at a time.
//
// Otherwise, we call `achordion_chord()` to determine whether to settle the
// tap-hold key as tapped vs. held. We implement the tap or hold by plumbing
// events back into the handling pipeline so that QMK features and other
// user code can see them. This is done by calling `process_record()`, which
// in turn calls most handlers including `process_record_user()`.
if (!is_streak &&
(!is_key_event || (is_tap_hold && record->tap.count == 0) ||
achordion_chord(tap_hold_keycode, &tap_hold_record, keycode,
record))) {
dprintln("Achordion: Plumbing hold press.");
settle_as_hold();
#ifdef REPEAT_KEY_ENABLE
// Edge case involving LT + Repeat Key: in a sequence of "LT down, other
// down" where "other" is on the other layer in the same position as
// Repeat or Alternate Repeat, the repeated keycode is set instead of the
// the one on the switched-to layer. Here we correct that.
if (get_repeat_key_count() != 0 && IS_QK_LAYER_TAP(tap_hold_keycode)) {
record->keycode = KC_NO; // Forget the repeated keycode.
clear_weak_mods();
}
#endif // REPEAT_KEY_ENABLE
} else {
clear_eager_mods(); // Clear in case eager mods were set.
dprintln("Achordion: Plumbing tap press.");
tap_hold_record.tap.count = 1; // Revise event as a tap.
tap_hold_record.tap.interrupted = true;
// Plumb tap press event.
recursively_process_record(&tap_hold_record, STATE_TAPPING);
send_keyboard_report();
#if TAP_CODE_DELAY > 0
wait_ms(TAP_CODE_DELAY);
#endif // TAP_CODE_DELAY > 0
dprintln("Achordion: Plumbing tap release.");
tap_hold_record.event.pressed = false;
// Plumb tap release event.
recursively_process_record(&tap_hold_record, STATE_TAPPING);
#ifdef ACHORDION_STREAK
update_streak_timer(keycode, record);
if (is_streak && is_key_event && is_tap_hold && record->tap.count == 0) {
// If we are in a streak and resolved the current tap-hold key as a tap
// consider the next tap-hold key as active to be resolved next.
update_streak_timer(tap_hold_keycode, &tap_hold_record);
const uint16_t timeout = achordion_timeout(keycode);
tap_hold_keycode = keycode;
tap_hold_record = *record;
hold_timer = record->event.time + timeout;
achordion_state = STATE_UNSETTLED;
pressed_another_key_before_release = false;
return false;
}
#endif
}
recursively_process_record(record, achordion_state); // Re-process event.
return false; // Block the original event.
}
#ifdef ACHORDION_STREAK
// update idle timer on regular keys event
update_streak_timer(keycode, record);
#endif
return true;
}
void achordion_task(void) {
if (achordion_state == STATE_UNSETTLED &&
timer_expired(timer_read(), hold_timer)) {
dprintln("Achordion: Timeout. Plumbing hold press.");
settle_as_hold(); // Timeout expired, settle the key as held.
}
#ifdef ACHORDION_STREAK
#define MAX_STREAK_TIMEOUT 800
if (streak_timer &&
timer_expired(timer_read(), (streak_timer + MAX_STREAK_TIMEOUT))) {
streak_timer = 0; // Expired.
}
#endif
}
// Returns true if `pos` on the left hand of the keyboard, false if right.
static bool on_left_hand(keypos_t pos) {
#ifdef SPLIT_KEYBOARD
return pos.row < MATRIX_ROWS / 2;
#else
return (MATRIX_COLS > MATRIX_ROWS) ? pos.col < MATRIX_COLS / 2
: pos.row < MATRIX_ROWS / 2;
#endif
}
bool achordion_opposite_hands(const keyrecord_t* tap_hold_record,
const keyrecord_t* other_record) {
return on_left_hand(tap_hold_record->event.key) !=
on_left_hand(other_record->event.key);
}
// By default, use the BILATERAL_COMBINATIONS rule to consider the tap-hold key
// "held" only when it and the other key are on opposite hands.
__attribute__((weak)) bool achordion_chord(uint16_t tap_hold_keycode,
keyrecord_t* tap_hold_record,
uint16_t other_keycode,
keyrecord_t* other_record) {
return achordion_opposite_hands(tap_hold_record, other_record);
}
// By default, the timeout is 1000 ms for all keys.
__attribute__((weak)) uint16_t achordion_timeout(uint16_t tap_hold_keycode) {
return 1000;
}
// By default, Shift and Ctrl mods are eager, and Alt and GUI are not.
__attribute__((weak)) bool achordion_eager_mod(uint8_t mod) {
return (mod & (MOD_LALT | MOD_LGUI)) == 0;
}
#ifdef ACHORDION_STREAK
__attribute__((weak)) bool achordion_streak_continue(uint16_t keycode) {
// If any mods other than shift or AltGr are held, don't continue the streak
if (get_mods() & (MOD_MASK_CG | MOD_BIT(KC_LALT))) return false;
// This function doesn't get called for holds, so convert to tap version of
// keycodes
if (IS_QK_MOD_TAP(keycode)) keycode = QK_MOD_TAP_GET_TAP_KEYCODE(keycode);
if (IS_QK_LAYER_TAP(keycode)) keycode = QK_LAYER_TAP_GET_TAP_KEYCODE(keycode);
// Regular letters and punctuation continue the streak.
if (keycode >= KC_A && keycode <= KC_Z) return true;
switch (keycode) {
case KC_DOT:
case KC_COMMA:
case KC_QUOTE:
case KC_SPACE:
return true;
}
// All other keys end the streak
return false;
}
__attribute__((weak)) uint16_t achordion_streak_chord_timeout(
uint16_t tap_hold_keycode, uint16_t next_keycode) {
return achordion_streak_timeout(tap_hold_keycode);
}
__attribute__((weak)) uint16_t
achordion_streak_timeout(uint16_t tap_hold_keycode) {
return 200;
}
#endif
#endif // version check

View file

@ -0,0 +1,197 @@
// Copyright 2022-2024 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
/**
* @file achordion.h
* @brief Achordion: Customizing the tap-hold decision.
*
* Overview
* --------
*
* This library customizes when tap-hold keys are considered held vs. tapped
* based on the next pressed key, like Manna Harbour's Bilateral Combinations or
* ZMK's positional hold. The library works on top of QMK's existing tap-hold
* implementation. You define mod-tap and layer-tap keys as usual and use
* Achordion to fine-tune the behavior.
*
* When QMK settles a tap-hold key as held, Achordion intercepts the event.
* Achordion then revises the event as a tap or passes it along as a hold:
*
* * Chord condition: On the next key press, a customizable `achordion_chord()`
* function is called, which takes the tap-hold key and the next key pressed
* as args. When the function returns true, the tap-hold key is settled as
* held, and otherwise as tapped.
*
* * Timeout: If no other key press occurs within a timeout, the tap-hold key
* is settled as held. This is customizable with `achordion_timeout()`.
*
* Achordion only changes the behavior when QMK considered the key held. It
* changes some would-be holds to taps, but no taps to holds.
*
* @note Some QMK features handle events before the point where Achordion can
* intercept them, particularly: Combos, Key Lock, and Dynamic Macros. It's
* still possible to use these features and Achordion in your keymap, but beware
* they might behave poorly when used simultaneously with tap-hold keys.
*
*
* For full documentation, see
* <https://getreuer.info/posts/keyboards/achordion>
*/
#pragma once
#include "quantum.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* Handler function for Achordion.
*
* Call this function from `process_record_user()` as
*
* #include "features/achordion.h"
*
* bool process_record_user(uint16_t keycode, keyrecord_t* record) {
* if (!process_achordion(keycode, record)) { return false; }
* // Your macros...
* return true;
* }
*/
bool process_achordion(uint16_t keycode, keyrecord_t* record);
/**
* Matrix task function for Achordion.
*
* Call this function from `matrix_scan_user()` as
*
* void matrix_scan_user(void) {
* achordion_task();
* }
*/
void achordion_task(void);
/**
* Optional callback to customize which key chords are considered "held".
*
* In your keymap.c, define the callback
*
* bool achordion_chord(uint16_t tap_hold_keycode,
* keyrecord_t* tap_hold_record,
* uint16_t other_keycode,
* keyrecord_t* other_record) {
* // Conditions...
* }
*
* This callback is called if while `tap_hold_keycode` is pressed,
* `other_keycode` is pressed. Return true if the tap-hold key should be
* considered held, or false to consider it tapped.
*
* @param tap_hold_keycode Keycode of the tap-hold key.
* @param tap_hold_record keyrecord_t from the tap-hold press event.
* @param other_keycode Keycode of the other key.
* @param other_record keyrecord_t from the other key's press event.
* @return True if the tap-hold key should be considered held.
*/
bool achordion_chord(uint16_t tap_hold_keycode, keyrecord_t* tap_hold_record,
uint16_t other_keycode, keyrecord_t* other_record);
/**
* Optional callback to define a timeout duration per keycode.
*
* In your keymap.c, define the callback
*
* uint16_t achordion_timeout(uint16_t tap_hold_keycode) {
* // ...
* }
*
* The callback determines Achordion's timeout duration for `tap_hold_keycode`
* in units of milliseconds. The timeout be in the range 0 to 32767 ms (upper
* bound is due to 16-bit timer limitations). Use a timeout of 0 to bypass
* Achordion.
*
* @param tap_hold_keycode Keycode of the tap-hold key.
* @return Timeout duration in milliseconds in the range 0 to 32767.
*/
uint16_t achordion_timeout(uint16_t tap_hold_keycode);
/**
* Optional callback defining which mods are "eagerly" applied.
*
* This callback defines which mods are "eagerly" applied while a mod-tap
* key is still being settled. This is helpful to reduce delay particularly when
* using mod-tap keys with an external mouse.
*
* Define this callback in your keymap.c. The default callback is eager for
* Shift and Ctrl, and not for Alt and GUI:
*
* bool achordion_eager_mod(uint8_t mod) {
* return (mod & (MOD_LALT | MOD_LGUI)) == 0;
* }
*
* @note `mod` should be compared with `MOD_` prefixed codes, not `KC_` codes,
* described at <https://docs.qmk.fm/mod_tap>.
*
* @param mod Modifier `MOD_` code.
* @return True if the modifier should be eagerly applied.
*/
bool achordion_eager_mod(uint8_t mod);
/**
* Returns true if the args come from keys on opposite hands.
*
* @param tap_hold_record keyrecord_t from the tap-hold key's event.
* @param other_record keyrecord_t from the other key's event.
* @return True if the keys are on opposite hands.
*/
bool achordion_opposite_hands(const keyrecord_t* tap_hold_record,
const keyrecord_t* other_record);
/**
* Suppress tap-hold mods within a *typing streak* by defining
* ACHORDION_STREAK. This can help preventing accidental mod
* activation when performing a fast tapping sequence.
* This is inspired by
* https://sunaku.github.io/home-row-mods.html#typing-streaks
*
* Enable with:
*
* #define ACHORDION_STREAK
*
* Adjust the maximum time between key events before modifiers can be enabled
* by defining the following callback in your keymap.c:
*
* uint16_t achordion_streak_chord_timeout(
* uint16_t tap_hold_keycode, uint16_t next_keycode) {
* return 200; // Default of 200 ms.
* }
*/
#ifndef ACHORDION_STREAK
#error "ACHORDION_STREAK is not defined."
#endif
#ifdef ACHORDION_STREAK
uint16_t achordion_streak_chord_timeout(uint16_t tap_hold_keycode,
uint16_t next_keycode);
bool achordion_streak_continue(uint16_t keycode);
/** @deprecated Use `achordion_streak_chord_timeout()` instead. */
uint16_t achordion_streak_timeout(uint16_t tap_hold_keycode);
#endif
#ifdef __cplusplus
}
#endif

View file

@ -0,0 +1,110 @@
/* Copyright 2021 @ Keychron (https://www.keychron.com)
*
* 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
#include "features/achordion.h"
#define USE_HOMEROW_MODS 1
#if (USE_HOMEROW_MODS == 1)
// Left-hand home row mods
#define HOME_A LCTL_T(KC_A)
#define HOME_S LALT_T(KC_S)
#define HOME_D LGUI_T(KC_D)
#define HOME_F LSFT_T(KC_F)
// Right-hand home row mods
#define HOME_J RSFT_T(KC_J)
#define HOME_K RGUI_T(KC_K)
#define HOME_L LALT_T(KC_L)
#define HOME_SCLN RCTL_T(KC_SCLN)
#else
// Left-hand home row mods
#define HOME_A KC_A
#define HOME_S KC_S
#define HOME_D KC_D
#define HOME_F KC_F
// Right-hand home row mods
#define HOME_J KC_J
#define HOME_K KC_K
#define HOME_L KC_L
#define HOME_SCLN KC_SCLN
#endif
// clang-format off
enum layers{
MAC_BASE,
WIN_BASE,
MAC_FN1,
WIN_FN1,
FN2
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[MAC_BASE] = LAYOUT_ansi_68(
KC_GRAVE, 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, CW_TOGG,
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_HOME,
LCTL_T(KC_ESC), HOME_A, HOME_S, HOME_D, HOME_F, KC_G, KC_H, HOME_J, HOME_K, HOME_L, HOME_SCLN,KC_QUOT, RCTL_T(KC_ENT), KC_PGUP,
KC_LSFT, 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_PGDN,
KC_LCTL, KC_LOPTN, KC_LCMMD, KC_SPC, KC_RCMMD,MO(MAC_FN1),MO(FN2), KC_LEFT, KC_DOWN, KC_RGHT),
[WIN_BASE] = LAYOUT_ansi_68(
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, RGB_MOD,
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_HOME,
LCTL_T(KC_ESC), HOME_A, HOME_S, HOME_D, HOME_F, KC_G, KC_H, HOME_J, HOME_K, HOME_L, HOME_SCLN,KC_QUOT, RCTL_T(KC_ENT), KC_PGUP,
KC_LSFT, 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_PGDN,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(WIN_FN1),MO(FN2), KC_LEFT, KC_DOWN, KC_RGHT),
[MAC_FN1] = LAYOUT_ansi_68(
KC_GRV, KC_BRID, KC_BRIU, KC_MCTL, KC_LPAD, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, RGB_TOG,
KC_TRNS, BT_HST1, BT_HST2, BT_HST3, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, RGB_RMOD, RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, NK_TOGG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
[WIN_FN1] = LAYOUT_ansi_68(
KC_GRV, KC_BRID, KC_BRIU, KC_TASK, KC_FILE, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, RGB_TOG,
KC_TRNS, BT_HST1, BT_HST2, BT_HST3, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
RGB_TOG, RGB_MOD, RGB_VAI, RGB_HUI, RGB_SAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, RGB_RMOD, RGB_VAD, RGB_HUD, RGB_SAD, RGB_SPD, NK_TOGG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
[FN2] = LAYOUT_ansi_68(
KC_TILD, 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_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BAT_LVL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (!process_achordion(keycode, record)) {
return false;
}
return true;
}
void matrix_scan_user(void) {
achordion_task();
}

View file

@ -0,0 +1,3 @@
CAPS_WORD_ENABLE = yes
SRC += features/achordion.c

View file

@ -47,10 +47,10 @@
# define LED_DRIVER_SHUTDOWN_PIN C14
# define HOST_LED_MATRIX_LIST \
{ 16, 17, 18 }
{ 15, 16, 17 }
# define BAT_LEVEL_LED_LIST \
{ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 }
{ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
/* Backlit disable timeout when keyboard is disconnected(unit: second) */
# define DISCONNECTED_BACKLIGHT_DISABLE_TIMEOUT 40

View file

@ -1,7 +1,7 @@
{
"usb": {
"pid": "0x0660",
"device_version": "1.0.1"
"device_version": "1.0.2"
},
"layouts": {
"LAYOUT_109_ansi": {

View file

@ -1,7 +1,7 @@
{
"usb": {
"pid": "0x0661",
"device_version": "1.0.0"
"device_version": "1.0.1"
},
"layouts": {
"LAYOUT_110_iso": {

View file

@ -91,9 +91,6 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
}
return false; // Skip all further processing of this key)
case KC_TASK:
if (record->event.pressed) {
ckbt51_factory_reset();
}
case KC_FILE:
case KC_SNAP:
case KC_CTANA: