keydown
eventではIMEに情報を送れないんだと思う e.data
がIMEに入力された値であるということは、IMEがcompositionupdate eventをweb browserに発行しているということ。 keydown
eventを使ったものjs// IMEが有効のときのキー入力
// this.cursorはscrapboxの #text-input
pressOnIME(key) {
this.cursor.dispatchEvent(new KeyboardEvent('keydown', {
bubbles: true,
cancelable: true,
key: 'Process',
keyCode: 229,
code: key,
isComposing: true,}));
}
code
にkeyを渡しても無意味?