Sponsored Content
Full Discussion: keypress signals
Top Forums Programming keypress signals Post 32812 by Perderabo on Saturday 7th of December 2002 03:04:03 PM
Old 12-07-2002
I'm not sure that I understand your question. But if you want to read each keystroke as it happens, see this post.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

keypress event in shell script

Hi All, How can I trap a character press in the shell script. For eg:- I have a script runinng a infinite loops , I will need to dispay menu asking for run process of to stop process and process stauts like we do in glance I have seen the traping the signal in glance command, (8 Replies)
Discussion started by: arvindng
8 Replies

2. Shell Programming and Scripting

How to trap a user keypress

Yo, I program Unix for fun- except when editing my website removed by reborg - and wanted to learn how to track, trap, and use to my advantage a user keypress. I know there is a built-in JS function that can do that, but Javascript is a client-side language, therefore not usable in Unix, and... (2 Replies)
Discussion started by: signebedi
2 Replies

3. Shell Programming and Scripting

override mysqladmin drop table asking for keypress

I am trying to run this code from script. mysqladmin -u root --password='******' --socket=/tmp/mysql.sock drop ROAD_HAULAGE_TEMP Though it does what i want it asks for me to click 'y' then enter. This is not appropriate because i want it to run from cron. Can i get mysqladmin to drop a... (1 Reply)
Discussion started by: timgolding
1 Replies

4. UNIX for Dummies Questions & Answers

How do i detect a keypress such as Page-Down ?

Hi, New user here, I have googled this but found nothing that helps me. I have a file of data and want to display it to a user from within a "frame/window/screen" that allows the user to pageup/pagedown through the data. I can do this mostly, but I cannot detect the pressing of the... (6 Replies)
Discussion started by: gcraill
6 Replies

5. Shell Programming and Scripting

Bash KeyPress (or Read Single Character)

Hi, I'm sorry if this has already been posted somewhere but I can't seem to find it on the forums (or anywhere on google :( ) I am writing a script where a user must enter a single character to perform an action. For example, Press Q to Quit or R to Refresh Basically I am stuggling... (5 Replies)
Discussion started by: Ste_Moore01
5 Replies

6. Programming

get keypress c++Qt

Hi i need to get the key pressed from the keyboard without focus on the application. i work under CentOS 5.5 with QtC++ 4.7 and Python Script (0 Replies)
Discussion started by: HanyM.Magdy
0 Replies

7. Shell Programming and Scripting

Trying to Bind a keypress to a function

I've been trying to re-think an old problem that didn't get answered. I know this is possible, but I'm having trouble getting it to run. I just want to call a function with a key-press or key combination. I looked and saw bind can be used to run functions and other scripts this way. Here's what... (2 Replies)
Discussion started by: Azrael
2 Replies

8. Programming

Simulate keypress inside a non-x application...

Hey guys, I'm looking for a solution to simulate a key-combo (tab+q) inside an amiga-emulator. I've tried it with uinput and python without any success. Any help would be great. Cheers McCarthy (5 Replies)
Discussion started by: mccarthy83
5 Replies

9. Shell Programming and Scripting

Bash loop hording keypress input

I have a bash loop that waits for a single key press, then does $something depending on what $key is pressed before refreshing the screen with updated data. The problem I have is that the script will store additional key presses and chain them together causing the screen to redraw and the script... (1 Reply)
Discussion started by: DarkPhoenix
1 Replies

10. UNIX for Beginners Questions & Answers

Simulate keypress in bash

Hello everybody, I am using Windows 10 and cygwin/bash. I need to write a script in bash which simulates opening of a program and then press some keys such as F5, ENTER and ALT+F4. I have written a VBScript which does the job Set WshShell = WScript.CreateObject("WScript.Shell")... (9 Replies)
Discussion started by: supernono06
9 Replies
SIGWAIT(2)						      BSD System Calls Manual							SIGWAIT(2)

NAME
sigwait -- select a set of signals LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <signal.h> int sigwait(const sigset_t * restrict set, int * restrict sig); DESCRIPTION
The sigwait() system call selects a set of signals, specified by set. If none of the selected signals are pending, sigwait() waits until one or more of the selected signals has been generated. Then sigwait() atomically clears one of the selected signals from the set of pending signals for the process and sets the location pointed to by sig to the signal number that was cleared. The signals specified by set should be blocked at the time of the call to sigwait(). If more than one thread is using sigwait() to wait for the same signal, no more than one of these threads will return from sigwait() with the signal number. If more than a single thread is blocked in sigwait() for a signal when that signal is generated for the process, it is unspecified which of the waiting threads returns from sigwait(). If the signal is generated for a specific thread, as by pthread_kill(), only that thread will return. Should any of the multiple pending signals in the range SIGRTMIN to SIGRTMAX be selected, it will be the lowest numbered one. The selection order between realtime and non-realtime signals, or between multiple pending non-realtime signals, is unspecified. RETURN VALUES
If successful, sigwait() returns 0 and sets the location pointed to by sig to the cleared signal number. Otherwise, an error number is returned. ERRORS
The sigwait() system call will fail if: [EINVAL] The set argument specifies one or more invalid signal numbers. [EFAULT] Any arguments point outside the allocated address space or there is a memory protection fault. SEE ALSO
sigaction(2), sigpending(2), sigqueue(2), sigsuspend(2), sigtimedwait(2), sigwaitinfo(2), pause(3), pthread_sigmask(3) STANDARDS
The sigwait() function conforms to ISO/IEC 9945-1:1996 (``POSIX.1''). BSD
November 11, 2005 BSD
All times are GMT -4. The time now is 03:21 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy