-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathkeycode
More file actions
23 lines (17 loc) · 927 Bytes
/
keycode
File metadata and controls
23 lines (17 loc) · 927 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<!-- vi:syntax=html
<body onload="['down','press','up'].map(x=>eval(`onkey${x}=e=>b.innerHTML+='<p>key${x} '+e.which`))"id=b>
<body onload='eval("down;press;up".replace(/\w+/g,"onkey$&=e=>b.innerHTML+=`<p>key$& `+e.which"))'id=b>
<body onload='eval("down;press;up".replace(/\w+/g,"onkey$&=e=>b.innerText+=`\nkey$& `+e.which"))'id=b>
<body onload="for(a in b)b[a[4]>'w'&&a]=e=>b.innerHTML+=`<p>${e.type} `+e.which"id=b>
<body onload="for(a in b)b[a[4]>'x'&&a]=e=>b.innerText+=`\n${e.type} `+e.which"id=b>
<body onload="for(a in b)b[a[4]>'x'&&a]=e=>b.innerText+=`
${e.type} `+e.which"id=b>
<body onload="for(a in b)b[a[4]>'x'&&a]=e=>b.innerText+=`
`+[e.type,e.which]"id=b>
<body onload="for(let a in b)b[a[4]>'x'&&a]=e=>b.innerText+=`
`+[a,e.which]"id=b>
<body onload="for(let a in b)b[a[4]>'x'&&a]=e=>b.innerText+=[a,e.which]+`
`"id=b>
-->
<body onload="for(let a in b)b[a[4]>'x'&&a]=e=>b.innerText+=[a,e.which]+`
`"id=b>