keecode logokeecode

Print

42

print

event.keyCode

42

event.key

Print

event.code

n/a

Unicode

n/a

Code Examples

Copy and paste these examples to detect the Print key in your JavaScript code

Recommended modern approach

// Modern approach (recommended)
document.addEventListener('keydown', (e) => {
  if (e.key === 'Print') {
    console.log('Print key pressed!');
    // Your code here
  }
});

Related Keys

Other keys commonly used together or in similar contexts