MCPcopy Create free account
hub / github.com/RtlZeroMemory/Rezi / codepointToKeyCode

Function codepointToKeyCode

packages/core/src/app/createApp/keybindings.ts:39–50  ·  view source on GitHub ↗
(codepoint: number)

Source from the content-addressed store, hash-verified

37}>;
38
39export function codepointToKeyCode(codepoint: number): number | null {
40 if (codepoint >= 97 && codepoint <= 122) {
41 return codepoint - 32;
42 }
43 if (codepoint >= 65 && codepoint <= 90) {
44 return codepoint;
45 }
46 if (codepoint >= 32 && codepoint <= 126) {
47 return codepoint;
48 }
49 return null;
50}
51
52export function codepointToCtrlKeyCode(codepoint: number): number | null {
53 if (codepoint === 9 || codepoint === 13) {

Callers 1

processEventBatchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected