ArrowRight
39
right arrow
event.keyCode
39
event.key
ArrowRight
event.code
ArrowRight
Unicode
→
Code Examples
Copy and paste these examples to detect the ArrowRight key in your JavaScript code
Recommended modern approach
// Modern approach (recommended)
document.addEventListener('keydown', (e) => {
if (e.key === 'ArrowRight') {
console.log('ArrowRight key pressed!');
// Your code here
}
});Common Use Cases
How the ArrowRight key is typically used in web applications
UI Navigation
Navigate through menus, lists, and form elements
Media Control
Fast forward or seek forward in media players
Game Movement
Move character or cursor right in games
Related Keys
Other keys commonly used together or in similar contexts