Sponsored Content
Top Forums Programming Detecting Keyboard Input without return Post 302117014 by porter on Thursday 10th of May 2007 02:37:11 AM
Old 05-10-2007
I suggest you look up terminal functions such as 'cfmakeraw()'.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

suppressing keyboard input

Setup Info: This User Id and Password mention below are being used with the ISQL command to connect to a sybase database so they are likely to not be the same as those that were signed on from the session. Situation: Using a korn shell, the shell prompts for a User Id and Password. During the... (1 Reply)
Discussion started by: anthreedhr
1 Replies

2. 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

3. Programming

Detecting if command is waiting for input

Hi, After doing a fork and executing a shell, we execute (third party) commands which are essentially non-interactive. But some of them ask for input, under some (unforeseeable) circumstances. When this happens we go on waiting for output. Their is timeout, of course, but we don't seem to know... (5 Replies)
Discussion started by: slash_blog
5 Replies

4. UNIX for Dummies Questions & Answers

Testing for correct user input from keyboard

What script can I use to catch errors in a shell script if user inputs alpha numeric characters instead on integers from the keyboard? (0 Replies)
Discussion started by: Pauline mugisha
0 Replies

5. Shell Programming and Scripting

Keyboard input question

How would I change up a script that currently has something like: bash script echo what's 1 2 3 4? then using read 1 2 3 4 I type 1 2 3 4. so in the script i can do stuff like echo $1 $2 $3 $4 and such... i was just doing echo "1 2 3 4"|bash script But was wondering how could I... (5 Replies)
Discussion started by: biopulse
5 Replies

6. Shell Programming and Scripting

sed execution with input from keyboard

> sed '' Hello hi Hello output How hi output ^D How > sed should take each line as input, process and output the result. In the above scenario the input is passed from keyboard and the output of 'Hello' as you can see is displayed on the screen after 'hi' is passed as input but not as... (1 Reply)
Discussion started by: loggedin.ksh
1 Replies

7. Shell Programming and Scripting

Input keyboard keys upon program launch

Hey guys, first post! I want to write a script that will wait 1 second and then input the keys CTRL+ALT+J to the application i just opened. The program is dosbox, and thay key combination starts video recording :) I have no idea how to program this, can anyone help please? thanks in advance! (2 Replies)
Discussion started by: brunobliss
2 Replies

8. Shell Programming and Scripting

How to get input from keyboard with watch?

Hello, i`m trying to create an network monitoring script and i dont know how to make affect that script by pressing an key from keyboard and that script runs not in while or for or any other loop, but with bash command watch for example: i have created an file (for example check) with content... (0 Replies)
Discussion started by: bacarrdy
0 Replies

9. Shell Programming and Scripting

Read input from Keyboard, do not proceed if no input

Hi, I am working on a script, which requests users to enter input. Ex: read -p "Please enter your email id:" email I don't want users skipping this entry, this has to be mandatory.I dont want to proceed without input. I can do a check if variable $email is empty and proceed if not.But, i... (7 Replies)
Discussion started by: aravindadla
7 Replies

10. 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
notimeout(3XCURSES)					  X/Open Curses Library Functions				       notimeout(3XCURSES)

NAME
notimeout, timeout, wtimeout - set timed blocking or non-blocking read SYNOPSIS
cc [ flag... ] file... -I /usr/xpg4/include -L /usr/xpg4/lib -R /usr/xpg4/lib -lcurses [ library... ] c89 [ flag... ] file... -lcurses [ library... ] #include <curses.h> int notimeout(WINDOW *win, bool bf); void timeout(int delay); void wtimeout(WINDOW win, int delay); PARAMETERS
win Is a pointer to the window in which to set the timed blocking. bf Is a Boolean expression. delay Is the number of milliseconds to block or wait for input. DESCRIPTION
If bool is TRUE, the notimeout() function disables a timer used by getch(3XCURSES) when handling multibyte function key sequences. When bool is FALSE and keypad handling is enabled, a timer is set by getch() to handle bytes received that could be the beginning of a function key (for example, ESC). If the remainder of the sequence is not received before the time expires, the first byte is returned; otherwise, the value of the function key is returned. Subsequent calls to the getch() function will return the other bytes received for the incomplete key sequence. The timeout() and wtimeout() functions set the length of time getch() waits for input for windows stdscr and win, respectively. These functions are similar to nodelay(3XCURSES) except the time to block or wait for input can be specified. A negative delay causes the program to wait indefinitely for input; a delay of 0 returns ERR if no input is ready; and a positive delay blocks until input arrives or the time specified expires, (in which case, ERR is returned). RETURN VALUES
On success, the notimeout() function returns OK. Otherwise, it returns ERR. The timeout() and wtimeout() functions do not return a value. ERRORS
None. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ |MT-Level |Unsafe | +-----------------------------+-----------------------------+ SEE ALSO
getch(3XCURSES), halfdelay(3XCURSES), libcurses(3XCURSES), nodelay(3XCURSES), attributes(5), standards(5) SunOS 5.10 5 Jun 2002 notimeout(3XCURSES)
All times are GMT -4. The time now is 09:45 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy