converts ascii code to key
| 484 | |
| 485 | // converts ascii code to key |
| 486 | int ddio_AsciiToKey(int ascii) { |
| 487 | if (ascii < 0 || ascii >= 128) |
| 488 | return 0; |
| 489 | |
| 490 | if (ascii >= 'A' && ascii <= 'Z') { |
| 491 | // I'm lazy |
| 492 | return (SHK + keycode_table[ascii]); |
| 493 | } else { |
| 494 | return keycode_table[ascii]; |
| 495 | } |
| 496 | } |