electron/spec/fixtures/pages/key-events.html

13 строки
384 B
HTML

<html>
<body>
<script type="text/javascript" charset="utf-8">
document.onkeydown = function (e) {
require('electron').ipcRenderer.send('keydown', e.key, e.code, e.keyCode, e.shiftKey, e.ctrlKey, e.altKey)
}
document.onkeypress = function (e) {
require('electron').ipcRenderer.send('keypress', e.key, e.code, e.keyCode, e.shiftKey, e.ctrlKey, e.altKey)
}
</script>
</body>
</html>