本页还没有译文
本页 8 段还没译成Русский,下面显示的是英文原文。injectHeldKeyCodes
还没翻译译自英文(tanstack.com)本页 8 段都还没译
function injectHeldKeyCodes(): Signal<Record<string, string>>;Defined in: injectHeldKeyCodes.ts:28
Angular inject-based API that returns a signal of a map from held key names to their physical event.code values.
Useful for debugging which physical key was pressed (e.g. distinguishing left vs right Shift via "ShiftLeft" / "ShiftRight").
Returns
Signal<Record<string, string>>
Signal of record mapping normalized key names to their event.code values
Example
@Component({
template: `
@for (key of heldKeys(); track key) {
<kbd>{{ key }} <small>{{ heldCodes()[key] }}</small></kbd>
}
`,
})
export class KeyDebugComponent {
heldKeys = injectHeldKeys()
heldCodes = injectHeldKeyCodes()
}AI 翻译查看英文原文