|
|
@ -82,8 +82,12 @@ module.exports = function (screen, input) { |
|
|
|
keyInput.addEventListener('input', e => { |
|
|
|
keyInput.addEventListener('input', e => { |
|
|
|
e.stopPropagation() |
|
|
|
e.stopPropagation() |
|
|
|
|
|
|
|
|
|
|
|
if (e.isComposing) { |
|
|
|
if (e.isComposing && 'data' in e) { |
|
|
|
sendInputDelta(e.data) |
|
|
|
sendInputDelta(e.data) |
|
|
|
|
|
|
|
} else if (e.isComposing) { |
|
|
|
|
|
|
|
// Firefox Mobile doesn't support InputEvent#data, so here's a hack
|
|
|
|
|
|
|
|
// that just takes the input value and uses that
|
|
|
|
|
|
|
|
sendInputDelta(keyInput.value) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
if (e.inputType === 'insertCompositionText') input.sendString(e.data) |
|
|
|
if (e.inputType === 'insertCompositionText') input.sendString(e.data) |
|
|
|
else if (e.inputType === 'deleteContentBackward') { |
|
|
|
else if (e.inputType === 'deleteContentBackward') { |
|
|
|