mirror of
https://github.com/electron/electron.git
synced 2026-01-09 15:38:08 -05:00
8 lines
250 B
JavaScript
8 lines
250 B
JavaScript
function handleKeyPress (event) {
|
|
// You can put code here to handle the keypress.
|
|
document.getElementById('last-keypress').innerText = event.key
|
|
console.log(`You pressed ${event.key}`)
|
|
}
|
|
|
|
window.addEventListener('keyup', handleKeyPress, true)
|