mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-04-02 15:13:46 +00:00
@@ -10,8 +10,8 @@ export namespace Keybind {
|
||||
leader: boolean // our custom field
|
||||
}
|
||||
|
||||
export function match(a: Info, b: Info): boolean {
|
||||
// Normalize super field (undefined and false are equivalent)
|
||||
export function match(a: Info | undefined, b: Info): boolean {
|
||||
if (!a) return false
|
||||
const normalizedA = { ...a, super: a.super ?? false }
|
||||
const normalizedB = { ...b, super: b.super ?? false }
|
||||
return isDeepEqual(normalizedA, normalizedB)
|
||||
@@ -32,7 +32,8 @@ export namespace Keybind {
|
||||
}
|
||||
}
|
||||
|
||||
export function toString(info: Info): string {
|
||||
export function toString(info: Info | undefined): string {
|
||||
if (!info) return ""
|
||||
const parts: string[] = []
|
||||
|
||||
if (info.ctrl) parts.push("ctrl")
|
||||
|
||||
Reference in New Issue
Block a user