Download tools/server/webui/src/lib/utils/is-ime-composing.ts from OpenTransformer/llama.cpp-prismml: direct link, hf CLI and curl.
- Browser
- Download file 392 Bytes
-
https://huggingface.co/OpenTransformer/llama.cpp-prismml/resolve/main/tools/server/webui/src/lib/utils/is-ime-composing.ts
- Command line
-
hf download hf://OpenTransformer/llama.cpp-prismml/tools/server/webui/src/lib/utils/is-ime-composing.ts
-
curl -L -o is-ime-composing.ts https://huggingface.co/OpenTransformer/llama.cpp-prismml/resolve/main/tools/server/webui/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; | |
| } | |