Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

poll_keyboard(3alleg4) [osx man page]

poll_keyboard(3alleg4)						  Allegro manual					    poll_keyboard(3alleg4)

NAME
poll_keyboard - Polls the keyboard. Allegro game programming library. SYNOPSIS
#include <allegro.h> int poll_keyboard(); DESCRIPTION
Wherever possible, Allegro will read the keyboard input asynchronously (ie. from inside an interrupt handler), but on some platforms that may not be possible, in which case you must call this routine at regular intervals to update the keyboard state variables. To help you test your keyboard polling code even if you are programming on a platform that doesn't require it, after the first time that you call this function Allegro will switch into polling mode, so from that point onwards you will have to call this routine in order to get any keyboard input at all, regardless of whether the current driver actually needs to be polled or not. The keypressed(), readkey(), and ureadkey() functions call poll_keyboard() automatically, so you only need to use this function when accessing the key[] array and key_shifts variable. RETURN VALUE
Returns zero on success, or a negative number on failure (ie. no keyboard driver installed). SEE ALSO
keyboard_needs_poll(3alleg4), install_keyboard(3alleg4), key(3alleg4), key_shifts(3alleg4), excamera(3alleg4), exsample(3alleg4), exs- tars(3alleg4) Allegro version 4.4.2 poll_keyboard(3alleg4)

Check Out this Related Man Page

poll_keyboard(3alleg4)						  Allegro manual					    poll_keyboard(3alleg4)

NAME
poll_keyboard - Polls the keyboard. Allegro game programming library. SYNOPSIS
#include <allegro.h> int poll_keyboard(); DESCRIPTION
Wherever possible, Allegro will read the keyboard input asynchronously (ie. from inside an interrupt handler), but on some platforms that may not be possible, in which case you must call this routine at regular intervals to update the keyboard state variables. To help you test your keyboard polling code even if you are programming on a platform that doesn't require it, after the first time that you call this function Allegro will switch into polling mode, so from that point onwards you will have to call this routine in order to get any keyboard input at all, regardless of whether the current driver actually needs to be polled or not. The keypressed(), readkey(), and ureadkey() functions call poll_keyboard() automatically, so you only need to use this function when accessing the key[] array and key_shifts variable. RETURN VALUE
Returns zero on success, or a negative number on failure (ie. no keyboard driver installed). SEE ALSO
keyboard_needs_poll(3alleg4), install_keyboard(3alleg4), key(3alleg4), key_shifts(3alleg4), excamera(3alleg4), exsample(3alleg4), exs- tars(3alleg4) Allegro version 4.4.2 poll_keyboard(3alleg4)
Man Page

9 More Discussions You Might Find Interesting

1. Programming

Scanf problem under LINUX...

I have a problem reading characters from keyboard with the scanf function. Here there is a little piece of code: #include <stdio.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> /* The last 3 libraries are included because in the real program I use some... (4 Replies)
Discussion started by: robotronic
4 Replies

2. Programming

keyboard type

hi I am using a GUI language (based on C/C++) for my application. Now i need to identify the "Again" key in the Sun keyboard. I tried to do this by getting the ascii value (4155)of it . it was fine. but it is clashing with F12, whose ascii is 4155 in normal keyboards. Due to this either one of... (0 Replies)
Discussion started by: nimishm
0 Replies

3. Programming

pliz look at this

hi, i a beginner in unix system. I am trying to write a program in which the input from keyboard instead of printing (default) i would like to take the input from buffer directly to some text file. and leave the screen blank as if nothing was typed. this happens when i log in to telnet... (0 Replies)
Discussion started by: dipendra_regmi
0 Replies

4. Programming

Keyboard Input

Does anyone know how do you determine the user idle time of STDIN in order to log the user out for being idle too long. I would like to write a c program to do this but I it is not clear upon how to determine idle time from keyboard input. I have found that the "who.c" source file uses the last... (4 Replies)
Discussion started by: cpaquette
4 Replies

5. UNIX for Advanced & Expert Users

How to write a keyboard driver?

How to write a keyboard driver with interrupt driven? the platform is ARM and the interface is SRAMC with I/O mapped. What should my handler and read fucntions contains? and I want to know how to map the memory by using the ioremap() function? when exactly we have to use mmap()can you please help... (0 Replies)
Discussion started by: rkkcorleone
0 Replies

6. UNIX for Dummies Questions & Answers

How to write a keyboard driver?

(0 Replies)
Discussion started by: rkkcorleone
0 Replies

7. Programming

Access keyboard driver

(USING FEDORA 16) I am using following command: cat `pwd`/pci-0000:00:1d.0-usb-0:1.3:1.0-event-kbd to access the keyboard driver to make a key logger ,but what i am getting is just some hash code ,please help me decrypt it. Thanks. (1 Reply)
Discussion started by: jayeshsharma52
1 Replies

8. Programming

Signal function

Hello I want to know how can i use signal function in c for keyboard interrupt handling. what i exactly want is : my program is processing and if i press any key while processing , the program should call the interrupt and displays/prints that key and now goes back to processing. I added the... (5 Replies)
Discussion started by: Jahanzeb
5 Replies

9. Programming

Simple capturing of keyboard input without interruption

I would like to make a function or command that checks for keyboard input without interrupting the program and exits the program when a key is pressed (perhaps the 'q' key). The program below monitors and prints/executes commands upon a change in primary (mouse selection) or clipboard buffer. If... (4 Replies)
Discussion started by: bedtime
4 Replies