ArrowDown
40
down arrow
event.keyCode
40
event.key
ArrowDown
event.code
ArrowDown
Unicode
↓
Code Examples
Copy and paste these examples to detect the ArrowDown key in your JavaScript code
Recommended modern approach
// Modern approach (recommended)
document.addEventListener('keydown', (e) => {
if (e.key === 'ArrowDown') {
console.log('ArrowDown key pressed!');
// Your code here
}
});Common Use Cases
How the ArrowDown key is typically used in web applications
Navigate Lists
Move down in dropdown menus and lists
Game Movement
Move character or cursor down in games
Command History
Navigate through next commands in terminals
Related Keys
Other keys commonly used together or in similar contexts