1scancode_to_ascii(3)            Allegro manual            scancode_to_ascii(3)
2
3
4

NAME

6       scancode_to_ascii  - Converts a scancode to an ASCII character. Allegro
7       game programming library.
8

SYNOPSIS

10       #include <allegro.h>
11
12
13       int scancode_to_ascii(int scancode);
14

DESCRIPTION

16       Converts the given scancode to an ASCII character for  that  key  (man‐
17       gling  Unicode  values), returning the unshifted uncapslocked result of
18       pressing the key, or zero if the key isn't a  character-generating  key
19       or  the  lookup  can't be done. The lookup cannot be done for keys like
20       the F1-F12 keys or the cursor keys, and some drivers will  only  return
21       approximate values. Generally, if you want to display the name of a key
22       to the user, you should use the scancode_to_name function.
23
24       Example:
25
26          int ascii;
27          ...
28          ascii = scancode_to_ascii(scancode);
29          allegro_message("You pressed '%c'\n", ascii);
30
31

SEE ALSO

33       scancode_to_name(3)
34
35
36
37Allegro                          version 4.4.3            scancode_to_ascii(3)
Impressum