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

NAME

6       ureadkey - Returns the next unicode character from the keyboard buffer.
7       Allegro game programming library.
8

SYNOPSIS

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

DESCRIPTION

16       Returns the next character from the keyboard buffer, in Unicode format.
17       If the buffer is empty, it waits until a key is pressed. You can see if
18       there are queued keypresses with keypressed(). The  return  value  con‐
19       tains  the Unicode value of the key, and if not NULL, the pointer argu‐
20       ment will be set to the scancode. Unlike readkey(),  this  function  is
21       able to return character values greater than 255. Example:
22
23          int val, scancode;
24          ...
25          val = ureadkey(&scancode);
26          if (val == 0x00F1)
27             allegro_message("You pressed n with tilde\n");
28
29          if (val == 0x00DF)
30             allegro_message("You pressed sharp s\n");
31
32       You  should  be  able to find Unicode character maps at http://www.uni
33       code.org/. Remember that on DOS you must specify a custom keyboard  map
34       (like those found in `keyboard.dat') usually with the help of a config‐
35       uration file specifying the language mapping (keyboard variable in sys‐
36       tem  section of `allegro.cfg'), or you will get the default US keyboard
37       mapping.
38
39

SEE ALSO

41       install_keyboard(3), readkey(3), keypressed(3), clear_keybuf(3),  simu‐
42       late_ukeypress(3), exkeys(3)
43
44
45
46Allegro                          version 4.4.3                     ureadkey(3)
Impressum