capture key board events using C program


 
Thread Tools Search this Thread
Top Forums Programming capture key board events using C program
# 1  
Old 03-23-2009
Computer capture key board events using C program

hi

This is mahesh

please can any one post source of 'c'. to capture key board events.

thank u
# 2  
Old 03-23-2009
Basic UNIX is not windows - you have be in a windowing envrionment to get "events" from the keyboard.

curses is likely what you want.
http://heather.cs.ucdavis.edu/~matlo...age/Curses.pdf
Open the "two examples" section for code examples.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to invoke external program and capture its output

Hi all, I am using an external binary to view memory starting from a specific address and i want to automate this via PERL however there are problems. Hope you can help me ..thx The output of the programme is like below: bash-3.2$ mem_disp 12B21D20 100 Opening RO Data Memory File scp.ro... (4 Replies)
Discussion started by: ekckabatop
4 Replies

2. Shell Programming and Scripting

Sending key events to background script

Hi, short summary: I need to send keystrokes from USB keyboard to background (bash-)script. I guess I have to use read on the right devive board but how and which? My details: I got a small home server with some VMs using KVM/Qemu, all are suse 11.3. But in general I work on a client... (0 Replies)
Discussion started by: Snowman
0 Replies

3. Shell Programming and Scripting

How to capture C program return values in Kshell

I have a K shell script (ksh) that needs to return an email address. A C program was written (prog1) to now access the email address off of an oracle table. The call to the program in the ksh is prog1 -p parm1 Based on Parm1 the program will read an oracle table and retrieve the email... (2 Replies)
Discussion started by: jclanc8
2 Replies

4. Shell Programming and Scripting

How to capture RC from SAS Program into K-shell

I am running a SAS program within K-shell. This SAS program gives me return code of 3000. However, when I check return code in my K-shell, it displays RC=2. Can someone tell me how to capture RC from SAS to K-shell? Thanks. Pramodini (2 Replies)
Discussion started by: Pramodini Rode
2 Replies

5. Shell Programming and Scripting

How does BASH handle KEY BOARD "up arrow"??

hello sir, I am studying the BASH shell. I was wondering how the BASH is able to handle the "up arrow" key to give the commands that were previously typed by us. Can you please tell me the code to do such an operation. I want to handle more such keys and put KEY BOARD short cuts to the BASH shell. (1 Reply)
Discussion started by: nsharath
1 Replies

6. Programming

How to get capture input events from keyboard and mouse

Hi, Is there any way to capture/record the input events from keyboard, as well as from mouse using C. Thanks in advance (4 Replies)
Discussion started by: yhacks
4 Replies

7. UNIX for Dummies Questions & Answers

Creating keymaps/key events

Hi all, Total newbie here so sorry for any offence caused... Anyway totally a windows slave, only ever used that, closest i got to programming was in DOS and HTML, yeah i know doesn't compare but just setting up the background. Have installed Cygwin and have learned a bit about Unix and... (0 Replies)
Discussion started by: newbiex25
0 Replies

8. Shell Programming and Scripting

Capture output of program to file with limited filesize

I'm working on a script that will perform a backup, save a log of said backup and send the output to me in an email. Everything is working fine so far except that I can't figure out how to specify a maximum file size for the log file. I don't want a runaway log file jamming up the server.... (7 Replies)
Discussion started by: spectre_240sx
7 Replies

9. UNIX for Dummies Questions & Answers

Capture an empty key press...

I am trying to test input from the user, if they press enter with out an Y or N. I have the characheter thing sorted but when it comes to a blank or empty key press I am having trouble. if ; then clear echo "Sorry, that is an invalid choice!" exit fi I am using a KSH script in... (3 Replies)
Discussion started by: jagannatha
3 Replies
Login or Register to Ask a Question