scancode_to_ascii(3alleg4) Allegro manual scancode_to_ascii(3alleg4)NAME
scancode_to_ascii - Converts a scancode to an ASCII character. Allegro game programming library.
SYNOPSIS
#include <allegro.h>
int scancode_to_ascii(int scancode);
DESCRIPTION
Converts the given scancode to an ASCII character for that key (mangling Unicode values), returning the unshifted uncapslocked result of
pressing the key, or zero if the key isn't a character-generating key or the lookup can't be done. The lookup cannot be done for keys like
the F1-F12 keys or the cursor keys, and some drivers will only return approximate values. Generally, if you want to display the name of a
key to the user, you should use the scancode_to_name function.
Example:
int ascii;
...
ascii = scancode_to_ascii(scancode);
allegro_message("You pressed '%c'
", ascii);
SEE ALSO scancode_to_name(3alleg4)Allegro version 4.4.2 scancode_to_ascii(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)
What is the point of this? Whenever I close my shell it appends to the history file without adding this. I have never seen it overwrite my history file.
# When the shell exits, append to the history file instead of overwriting it
shopt -s histappend (3 Replies)
Greetings,
I'm trying to delete a file with a weird name from within Terminal on a Mac.
It's a very old file (1992) with null characters in the name: ââWord FinderÂŽ Plusâ˘.
Here are some examples of what I've tried:
12FX009:5 dpontius$ ls
ââWord FinderÂŽ Plusâ˘
12FX009:5 dpontius$ rm... (29 Replies)