From ed6c631c8aead094c2f82fe4004f711e63072c7c Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Wed, 21 Feb 2024 15:50:05 -0800 Subject: [PATCH] Fix some incorrect keycode offsets, one of which broke dynamic macros --- product-status.md | 17 +++++++----- src/api/focus/keymap/db/constants.js | 40 +++++++++++++++------------- 2 files changed, 32 insertions(+), 25 deletions(-) diff --git a/product-status.md b/product-status.md index dfa708c3f..db2a82cd2 100644 --- a/product-status.md +++ b/product-status.md @@ -1,11 +1,7 @@ # Keyboardio Chrysalis -This is a _test release_ of the next version of Chrysalis, the graphical configuration tool for Keyboardio's Kaleidoscope-powered keyboards. +This is Chrysalis, the graphical configuration tool for Keyboardio's Kaleidoscope-powered keyboards. -## What doesn't work - -- Device disconnect detection -- Loading "pre-configured" layouts ## What should work @@ -17,6 +13,11 @@ This is a _test release_ of the next version of Chrysalis, the graphical configu - Backup and restore - Factory reset +## What doesn't work + +- Device disconnect detection +- Loading "pre-configured" layouts + ## Device support - Keyboardio Model 100 @@ -29,6 +30,10 @@ _Note:_ On macOS, the Atreus and Model 01 may experience unreliable connectivity Chrysalis requires a browser with WebSerial support. Right now, this means Chrome, Edge, Arc, Brave, and other browsers based on Chromium. We're hopeful that Firefox and Apple will implement WebSerial and WebUSB, but neither browser maker has yet announced their intention to do so. +## Recent updates + +- Corrections for some incorrect key identifiers, particularly for dynamic macros + ## Last Updated -Feb 9, 2024 +Feb 21, 2024 diff --git a/src/api/focus/keymap/db/constants.js b/src/api/focus/keymap/db/constants.js index 78c248e33..789bd49b8 100644 --- a/src/api/focus/keymap/db/constants.js +++ b/src/api/focus/keymap/db/constants.js @@ -37,7 +37,7 @@ const keycode_ranges = { }, steno: { start: 0xd12d, - end: 0xd16f, + end: 0xd157, }, consumer: { start: 0x4800, @@ -51,11 +51,13 @@ const keycode_ranges = { }, macro: { start: 0x6000 }, leader: { start: 0xd023, end: 0xd02a }, - dynamic_macro: { start: 0xd174, end: 0xd192 }, + dynamic_macro: { start: 0xd15c, end: 0xd17b }, led: { start: 0x4300 }, layer: { start: 0x4400 }, tapdance: { start: 0xd013, end: 0xd022 }, - spacecadet: { start: 0xd170, end: 0xd171 }, + spacecadet: { start: 0xd158, end: 0xd159 }, + redial: { start: 0xd15a, end: 0xd15a }, + turbo: { start: 0xd15b, end: 0xd15b }, }; export const constants = { codes: { @@ -110,11 +112,11 @@ export const constants = { TRANSPARENT: 0x00, // Dual use keycodes - DUAL_USE_MODIFIER_BASE: 49169, - DUAL_USE_LAYER_BASE: 51218, + DUAL_USE_MODIFIER_BASE: keycode_ranges.dual_use_modifier.start, + DUAL_USE_LAYER_BASE: keycode_ranges.dual_use_layer.start, // Aliases FIRST_MODIFIER: 224, - FIRST_ONESHOT_MODIFIER: 49153, + FIRST_ONESHOT_MODIFIER: keycode_ranges.oneshot_modifier.start, EMPTY: 65535, }, ranges: keycode_ranges, @@ -152,19 +154,19 @@ const _PRIVATE_KEYCODE_OFFSET_NEVER_INCLUDE_IN_CODE = { TT: 53293, // 0xd02d TT_LAST: 53548, // 0xd12c STENO: 53549, // 0xd12d - STENO_LAST: 53591, // 0xd16f - SC: 53592, // 0xd170 - SC_LAST: 53593, // 0xd171 - REDIAL: 53594, // 0xd172 - TURBO: 53595, // 0xd173 - DYNAMIC_MACRO: 53596, // 0xd174 - DYNAMIC_MACRO_LAST: 53627, // 0xd192 - OS_META_STICKY: 53628, // 0xd193 - OS_ACTIVE_STICKY: 53629, // 0xd194 - OS_CANCEL: 53630, // 0xd195 - CS: 53631, // 0xd196 - CS_LAST: 53695, // 0xd1d3 - SAFE_START: 53696, // 0xd1d4 + STENO_LAST: 53591, // 0XD157 + SC: 53592, // 0XD158 + SC_LAST: 53593, // 0xd159 + REDIAL: 53594, // 0XD15A + TURBO: 53595, // 0XD15B + DYNAMIC_MACRO: 53596, // 0XD15C + DYNAMIC_MACRO_LAST: 53627, // 0XD17B + OS_META_STICKY: 53628, // 0XD17C + OS_ACTIVE_STICKY: 53629, // 0XD17D + OS_CANCEL: 53630, // 0XD17E + CS: 53631, // 0XD17F + CS_LAST: 53695, // 0XD1BF + SAFE_START: 53696, // 0XD1C0 }; */