fix: Macro name off-by-one — M0 displayed as M1
decode_keycode used (raw >> 8) - 0x14 but macro codes start at 0x15, so M0 (0x1500) decoded to index 1 instead of 0. Fixed to - 0x15. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
d1d10b7d73
commit
b5023b8f02
1 changed files with 1 additions and 1 deletions
|
|
@ -22,7 +22,7 @@ pub fn decode_keycode(raw: u16) -> String {
|
||||||
|
|
||||||
// --- MACRO: 0x1500..=0x2800, low byte == 0 ---
|
// --- MACRO: 0x1500..=0x2800, low byte == 0 ---
|
||||||
if raw >= 0x1500 && raw <= 0x2800 && (raw & 0xFF) == 0 {
|
if raw >= 0x1500 && raw <= 0x2800 && (raw & 0xFF) == 0 {
|
||||||
let idx = (raw >> 8) - 0x14;
|
let idx = (raw >> 8) - 0x15;
|
||||||
return format!("M{idx}");
|
return format!("M{idx}");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue