48

Is there a place where I can find all the keycodes for keys on a keyboard? (For example, the key up may be #114)

I can't seem to find one no matter what I search :(

Thanks!

David Snabel-Caunt
  • 57,804
  • 13
  • 114
  • 132
PHPNooblet
  • 687
  • 1
  • 7
  • 15
  • 7
    From where are you receiving these numbers? What language is this program written in? – Adam Paynter Oct 26 '09 at 23:40
  • All previous answers to this question are incomplete or misleading and the question is closed for some reason. Without knowing which codes you are looking for exactly it is hard to give an accurate or complete answer. JS codes are not the same as windows key codes are not the same as ASCII, hardware, etc. Either way you or some future reader may be looking for these, which took me a while to find on Google: https://wiki.osdev.org/PS/2_Keyboard – paperclip optimizer Jul 17 '22 at 23:18

3 Answers3

55

Here's a list of keycodes that includes a way to look them up interactively.

Pablo
  • 1,053
  • 9
  • 10
8

I know this was asked awhile back, but I found a comprehensive list of the virtual keyboard key codes right in MSDN, for use in C/C++. This also includes the mouse events. Note it is different than the javascript key codes (I noticed it around the VK_OEM section).

Here's the link:
http://msdn.microsoft.com/en-us/library/windows/desktop/dd375731(v=vs.85).aspx

Codesmith
  • 5,779
  • 5
  • 38
  • 50
2

You don't mention what language you want to track these in, but I found two for javascript:

http://www.cambiaresearch.com/c4/702b8cd1-e5b0-42e6-83ac-25f0306e3e25/Javascript-Char-Codes-Key-Codes.aspx

Elaskanator
  • 1,135
  • 10
  • 28
broschb
  • 4,976
  • 4
  • 35
  • 52