MCPcopy Create free account
hub / github.com/devnullvoid/pvetui / CanonicalID

Function CanonicalID

internal/keys/parse.go:142–148  ·  view source on GitHub ↗

CanonicalID returns a unique identifier for a parsed key combination.

(key tcell.Key, r rune, mod tcell.ModMask)

Source from the content-addressed store, hash-verified

140
141// CanonicalID returns a unique identifier for a parsed key combination.
142func CanonicalID(key tcell.Key, r rune, mod tcell.ModMask) string {
143 if key == tcell.KeyRune {
144 r = unicode.ToLower(r)
145 }
146
147 return fmt.Sprintf("%d:%d:%d", key, r, mod)
148}
149
150// IsReserved reports whether the given key combination is reserved for
151// navigation and should not be reassigned. Only unmodified keys are checked.

Callers 2

ValidateKeyBindingsFunction · 0.92

Calls

no outgoing calls

Tested by 1