mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-04-29 05:08:26 +00:00
11 lines
302 B
TypeScript
11 lines
302 B
TypeScript
import type { KeyboardEvent } from "react";
|
|
|
|
type IMEKeyboardEvent = KeyboardEvent<HTMLInputElement | HTMLTextAreaElement>;
|
|
|
|
export function isIMEComposing(
|
|
event: IMEKeyboardEvent,
|
|
isComposing = false,
|
|
): boolean {
|
|
return isComposing || event.nativeEvent.isComposing || event.keyCode === 229;
|
|
}
|