Keys - The Compy Project
In this page you can find codes for keys, used to program in Compy.
Key codes
These are the codes returned by sc.input(), etc.| Key pressed | Returned code |
|---|---|
| 0 | 48 |
| 1 | 49 |
| 2 | 50 |
| 3 | 51 |
| 4 | 52 |
| 5 | 53 |
| 6 | 54 |
| 7 | 55 |
| 8 | 56 |
| 9 | 57 |
| A | 65 |
| B | 66 |
| C | 67 |
| D | 68 |
| E | 69 |
| F | 70 |
| G | 71 |
| H | 72 |
| I | 73 |
| J | 74 |
| K | 75 |
| L | 76 |
| M | 77 |
| N | 78 |
| O | 79 |
| P | 80 |
| Q | 81 |
| R | 82 |
| S | 83 |
| T | 84 |
| U | 85 |
| V | 86 |
| W | 87 |
| X | 88 |
| Y | 89 |
| Z | 90 |
| < | 60 |
| , | 44 |
| . | 46 |
| - | 45 |
| + | 43 |
| ' | 39 |
| left arrow | 314 |
| up arrow | 315 |
| right arrow | 316 |
| down arrow | 317 |
| enter | 13 |
| space | 32 |
| ctrl | 396 |
| upper | 306 |
| alt | 307 |
| command | 308 |
| backspace | 8 |