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

13 lines
384 B
HTML
Raw Normal View History

2016-10-07 21:44:35 +00:00
<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)
}
2016-10-07 22:12:35 +00:00
document.onkeypress = function (e) {
require('electron').ipcRenderer.send('keypress', e.key, e.code, e.keyCode, e.shiftKey, e.ctrlKey, e.altKey)
}
2016-10-07 21:44:35 +00:00
</script>
</body>
</html>