Download tools/ui/src/lib/utils/is-ime-composing.ts from Brunobkr/llama.cpp_AlgMor24_github: direct link, hf CLI and curl.
- Browser
- Download file 392 Bytes
-
https://huggingface.co/datasets/Brunobkr/llama.cpp_AlgMor24_github/resolve/main/tools/ui/src/lib/utils/is-ime-composing.ts
- Command line
-
hf download hf://datasets/Brunobkr/llama.cpp_AlgMor24_github/tools/ui/src/lib/utils/is-ime-composing.ts
-
curl -L -o is-ime-composing.ts https://huggingface.co/datasets/Brunobkr/llama.cpp_AlgMor24_github/resolve/main/tools/ui/src/lib/utils/is-ime-composing.ts
392 Bytes
| export function isIMEComposing(event: KeyboardEvent) { | |
| // Check for IME composition using isComposing property and keyCode 229 (specifically for IME composition on Safari, which is notorious for not supporting KeyboardEvent.isComposing) | |
| // This prevents form submission when confirming IME word selection (e.g., Japanese/Chinese input) | |
| return event.isComposing || event.keyCode === 229; | |
| } | |