ureadkey(3alleg4) Allegro manual ureadkey(3alleg4)NAME
ureadkey - Returns the next unicode character from the keyboard buffer. Allegro game programming library.
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
");
if (val == 0x00DF)
allegro_message("You pressed sharp s
");
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(3alleg4), readkey(3alleg4), keypressed(3alleg4), clear_keybuf(3alleg4), simulate_ukeypress(3alleg4), exkeys(3alleg4)Allegro version 4.4.2 ureadkey(3alleg4)
Check Out this Related Man Page
ureadkey(3alleg4) Allegro manual ureadkey(3alleg4)NAME
ureadkey - Returns the next unicode character from the keyboard buffer. Allegro game programming library.
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
");
if (val == 0x00DF)
allegro_message("You pressed sharp s
");
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(3alleg4), readkey(3alleg4), keypressed(3alleg4), clear_keybuf(3alleg4), simulate_ukeypress(3alleg4), exkeys(3alleg4)Allegro version 4.4.2 ureadkey(3alleg4)
Hi,
I need to set Unix I/O terminal such as once key "," is pressed charcter "." is shown. Do you have any suggesion? The best to me is to accomplish this feauture with an environment variabile if it is possible.
Michele Ferrero (3 Replies)
Hi all,
I got trouble with reading and writing ( to standard input/output, file, socket whatever...).
I will briefly describe it by giving this example. I want to read a long string from keyboard but i don't know how long it is b4. So i need to know the number of character i will read first.... (6 Replies)
I am writing a bash shell menu and would like to get a char immediately after a key is pressed. This script does not work but should give you an idea of what I am trying to do....
Thanks for the help
#! /bin/bash
ANSWER=""
echo -en "Choose item...\n"
until
do
$ANSWER = $STDIN
... (2 Replies)
This has got me stumped and no solution on the WWW or here either that I can see.
I suspect this can't be done... ;o(
My requirement is to hold a _random_ key down and run a single command.
Easy EXCEPT the keyboard keeps adding that same keystroke into a type ahead buffer somewhere and does... (17 Replies)