Reference
Keyboard keycode reference API
Map between a key name and the JavaScript KeyboardEvent fields — `key`, legacy `keyCode`/`which`, physical `code`, and DOM key `location` (with a readable name). Bidirectional: accepts a key name, numeric keyCode, or code string. Answers 'what is the keyCode for Enter', 'which key is code 65', 'what is event.code for ArrowUp', 'JS keycode reference'.
Price$0.01per request
MethodPOST
Route/v1/ref/keycode
StatusLive
MIME typeapplication/json
Rate limit60/minute
CacheNo cache
refkeycodekeyboardjavascriptkeyboardeventkeywhichdom
API URL
Integration docshttps://x402.hexl.dev/v1/ref/keycodeExample request
{
"query": "Enter"
}Example response
{
"query": "Enter",
"found": true,
"key": "Enter",
"keyCode": 13,
"which": 13,
"code": "Enter",
"location": 0,
"locationName": "standard"
}Input schema
{
"type": "object",
"required": [
"query"
],
"properties": {
"query": {
"type": [
"string",
"number"
],
"examples": [
"Enter",
65,
"KeyA"
]
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}