10-16-2011
Thanks for the tip, very useful but not for my problem.
I think i didn`t wrote what i mean precisely. The problem is when i push button on keyboard and stay pressed i get only one letter. I want to set auto repeat of pressed character to get for example pressing a letter 'aaaaaaaaaaaaaa' instead 'a' only.
Thats only in console or CDE teminal. When i use putty to get into system it`s ok.
5 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
I would like to increase the speed that characters repeat when a key is held. My older machines had a BIOS setting to control speed.
I am using SCO Openserver. (1 Reply)
Discussion started by: tecss
1 Replies
2. Programming
Hi everyone,
Is scan code of every key fixed in all keyboard or
different keyboard has different scan code for every key?
Thank you in advance! (2 Replies)
Discussion started by: liuyan03
2 Replies
3. UNIX for Dummies Questions & Answers
Hi, I've got a bit of a ridiculous problem and wasn't sure where to post it.
I need to use the vertical bar for piping in Bash but, as per the title, am using a UK layout on a US (physical) keyboard which doesn't have a key for it in the place I'd expect. I've tried using xbindkeys and Unicode... (7 Replies)
Discussion started by: crunchgargoyle
7 Replies
4. Hardware
Hi team,
I have an old fashion (product of 1989) keyboard which is Northgate OMNI Key/PLus Keyboard I got the adapters ps2 and usb, but I still can't run it, I googled some stuff concerning the settings of the 8 dips in the back of the keyboard but couldn't find any helpful stuff. However, if... (0 Replies)
Discussion started by: leo_ultra_leo
0 Replies
5. Windows & DOS: Issues & Discussions
Dear All,
I want to run a shell script with out logging to putty but configuring it to a keyboard short cut it windows PC. Can this be done? I want this to rename a log in a specified folder in a system
Thanks (8 Replies)
Discussion started by: Chi_SL
8 Replies
readkey(3alleg4) Allegro manual readkey(3alleg4)
NAME
readkey - Returns the next character from the keyboard buffer. Allegro game programming library.
SYNOPSIS
#include <allegro.h>
int readkey();
DESCRIPTION
Returns the next character from the keyboard buffer, in ASCII format. If the buffer is empty, it waits until a key is pressed. You can see
if there are queued keypresses with keypressed().
The low byte of the return value contains the ASCII code of the key, and the high byte the scancode. The scancode remains the same whatever
the state of the shift, ctrl and alt keys, while the ASCII code is affected by shift and ctrl in the normal way (shift changes case,
ctrl+letter gives the position of that letter in the alphabet, eg. ctrl+A = 1, ctrl+B = 2, etc). Pressing alt+key returns only the scan-
code, with a zero ASCII code in the low byte. For example:
int val;
...
val = readkey();
if ((val & 0xff) == 'd') /* by ASCII code */
allegro_message("You pressed 'd'
");
if ((val >> 8) == KEY_SPACE) /* by scancode */
allegro_message("You pressed Space
");
if ((val & 0xff) == 3) /* ctrl+letter */
allegro_message("You pressed Control+C
");
if (val == (KEY_X << 8)) /* alt+letter */
allegro_message("You pressed Alt+X
");
This function cannot return character values greater than 255. If you need to read Unicode input, use ureadkey() instead.
SEE ALSO
install_keyboard(3alleg4), ureadkey(3alleg4), keypressed(3alleg4), clear_keybuf(3alleg4), simulate_keypress(3alleg4)
Allegro version 4.4.2 readkey(3alleg4)