Download packages/pi-tui/src/native-modifiers.ts from SaylorTwift/kimi-code: direct link, hf CLI and curl.
- Browser
- Download file 388 Bytes
-
https://huggingface.co/SaylorTwift/kimi-code/resolve/main/packages/pi-tui/src/native-modifiers.ts
- Command line
-
hf download hf://SaylorTwift/kimi-code/packages/pi-tui/src/native-modifiers.ts
-
curl -L -o native-modifiers.ts https://huggingface.co/SaylorTwift/kimi-code/resolve/main/packages/pi-tui/src/native-modifiers.ts
388 Bytes
| import { getNativePlatformHelper, type ModifierKey } from "./native-platform.ts"; | |
| export type { ModifierKey } from "./native-platform.ts"; | |
| export function isNativeModifierPressed(key: ModifierKey): boolean { | |
| const helper = getNativePlatformHelper(); | |
| if (!helper?.isModifierPressed) return false; | |
| try { | |
| return helper.isModifierPressed(key) === true; | |
| } catch { | |
| return false; | |
| } | |
| } | |