Sending key events to background script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Sending key events to background script
# 1  
Old 02-20-2011
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 using a keyboard switch. Additionally, I have a scanner (HP Officejet 6500).

Now I want to send scans into a VM. I did not get the scan button to work but I want to achieve a similar solution. I bought a numerical keyboard with USB connector, connected it to the server and fowarded the port into the target VM.
Next there should be a background process listening to that kayboard and running a variety of scanimage scripts when the numbers are pressed.

I found the keyboard device under /dev/input/by-id/... and probably also under /dev/bus/usb/001/00[1-4]. Unfortunately, the output looks very "raw". I guess there must be an other device to connect to?

Thank you for your help,
Snowman
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need help regarding sending sleep to background

Hi, can we print anything, when sleep is running..? like printing dots(.. . . . . . . . .) to indicate that some process is going on...? i mean, can we send sleep to background, proceed with printing, till sleep is going on... in s single step. I have written a funtion to solve this. ... (1 Reply)
Discussion started by: Dpu
1 Replies

2. Programming

Simulating background X11 events

Hi everybody! I've following this forum for a while but now it is my turn to do a question since a did not find the answer anywhere (I've been searching for days and there is no way). I am working on a client-server platform where the server renders 3D models and sends images to the client... (3 Replies)
Discussion started by: benderz
3 Replies

3. Shell Programming and Scripting

Sending Key Presses

Hi. Im wondering if there is a way to output key presses using a script? Something like this: key=down key=down key=up So say if it was sent to Firefox it would make the window scroll down twice then up once. (1 Reply)
Discussion started by: Grizzly
1 Replies

4. Shell Programming and Scripting

sending email as background process

Hi All, Solaris Bash v3x I have a script that accepts an error code, and if the error code is not 0 then an email is sent using mailx to details the error. I want to be able to implement the functiuonlity whereby i can send the email in a background process so the script can continue with... (3 Replies)
Discussion started by: satnamx
3 Replies

5. Programming

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 (1 Reply)
Discussion started by: smahesh2007
1 Replies

6. Shell Programming and Scripting

How to include RETURN KEY with Background process "&" in Shell Script

Hello All, I am a newbie in Shell script programming, and maybe you can help me with my query. I need to write a shell script (mntServer.ksh) that will start a background process and also to be able to run another script. The mntServer.ksh script contains: #!/bin/ksh... (1 Reply)
Discussion started by: racbern
1 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. Programming

Sending INtr key for remote terminal

Hi folks, Just wondering if anyone knows how to send intr/break key to remote tty (shell), a simple example would be great! thx (2 Replies)
Discussion started by: andryk
2 Replies
Login or Register to Ask a Question
uudemon(4)						     Kernel Interfaces Manual							uudemon(4)

NAME
uudemon.admin, uudemon.cleanu, uudemon.hour, uudemon.poll - Administrative shell scripts for polling remote systems, cleaning up spool directories, reporting status to the system administrator, and routine invocations of the uuxqt and uusched daemons SYNOPSIS
These shell scripts reside in the following directory: /usr/lib/uucp DESCRIPTION
All the scripts can be run from the command line or can be run automatically by the cron daemon. To automatically run the scripts, remove the comment character (#) from the beginning of the relevant line in the /var/spool/cron/crontabs/uucp file. This script reports status to the system administrator. It issues the uustat command to find out the status of uucp jobs. It mails the results to the uucp login ID. The script may be modified to send mail to any login ID such as the uucp administrative login ID (uucpa) or root. This script cleans up the /var/spool/uucp and /var/spool/uucppublic directories by running the uucleanup command. The uucleanup com- mand is run with the following parameters: -C7, -D7, X2, -o2, -W1. This script runs the uusched and uuxqt daemons in the background. This script polls the systems listed in the /usr/lib/uucp/Poll file. The uudemon.poll script should be scheduled before the uudemon.hour script. This allows uudemon.poll to create any command files before cron runs the uudemon.hour script. FILES
Contains the uudemon.admin, uudemon.cleanu, uudemon.hour and uudemon.poll files. Contains the uucp file. RELATED INFORMATION
Commands: cron(8), uucleanup(8), uusched(8), uuxqt(1) Files: /usr/lib/uucp delim off uudemon(4)