GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  UREADKEY (3)

NAME

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

CONTENTS

Synopsis
Description
See Also

SYNOPSIS

#include <allegro.h>

int ureadkey(int *scancode);

DESCRIPTION

Returns the next character from the keyboard buffer, in Unicode format. If the buffer is empty, it waits until a key is pressed. You can see if there are queued keypresses with keypressed(). The return value contains the Unicode value of the key, and if not NULL, the pointer argument will be set to the scancode. Unlike readkey(), this function is able to return character values greater than 255. Example:

   int val, scancode;
   ...
   val = ureadkey(&scancode);
   if (val == 0x00F1)
      allegro_message("You pressed n with tilde\n");
  
   if (val == 0x00DF)
      allegro_message("You pressed sharp s\n");
  

You should be able to find Unicode character maps at http://www.unicode.org/. Remember that on DOS you must specify a custom keyboard map (like those found in ‘keyboard.dat’) usually with the help of a configuration file specifying the language mapping (keyboard variable in system section of ‘allegro.cfg’), or you will get the default US keyboard mapping.

SEE ALSO

install_keyboard(3), readkey(3), keypressed(3), clear_keybuf(3), simulate_ukeypress(3), exkeys(3)
Search for    or go to Top of page |  Section 3 |  Main Index


Allegro UREADKEY (3) version 4.4.2

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.