12-06-2010
my problem is, I am going to set the cursor using 'tput cup' command after this background process completes. so, my problem is the cursor moves to the next line if enter key have been pressed during this period. I want to protect that thing only. otherwise my program run very smoothly.
10 More Discussions You Might Find Interesting
1. Programming
hi
i´m making a program, and i would like to know how can i know what key was pressed. i'm using Sun5.7 and C.
is there a keypress/keypressed function in C?
how can i know recognize the keys (enter, tab, shift, etc.)?
can i recognize two keys ? (shift+A, ctrl+C, etc)
any idea.. thanks (4 Replies)
Discussion started by: DebianJ
4 Replies
2. UNIX for Dummies Questions & Answers
Hi,
Whenever i press the backspace key, a new line appears, i.e. it works like a enter key. :confused:
Thanks (2 Replies)
Discussion started by: vibhor_agarwali
2 Replies
3. Shell Programming and Scripting
I want my program(ksh) to execute further only if the return key is pressed.
Please help.
i have already tried "\n", "\r", "^M" .
Thanks in advance (2 Replies)
Discussion started by: AiK
2 Replies
4. UNIX for Dummies Questions & Answers
hi folks,
i am using sun solaris, when i press escape key in putty/netterm screen will blink for a second, plese let me know where this setting is done by my admin, what i feel is my admin must have set some control key for this so that screen will refresh each time i press escape key. please let... (1 Reply)
Discussion started by: sudheer157
1 Replies
5. Shell Programming and Scripting
Hi,
When I run script on Sun Solaris (sassetup), it prompts to "Press Enter To Continue".
Now I want to automate this, ie put sassetup in a script file. So, when I run this file, it should be executed automatically without waiting for anyone to press Enter Key.
I have tried the following... (1 Reply)
Discussion started by: sajjunaqvi
1 Replies
6. Shell Programming and Scripting
Hi All,
I have bash script, so what is sintax script in bash for Enable and Disable Tab Key. Thanks for your help.:(
Thanks,
Rico (1 Reply)
Discussion started by: carnegiex
1 Replies
7. Shell Programming and Scripting
Hello everyone.
I'm trying to create a script that waits a given amount of time unless a given key is pressed. I found a very useful thread here
https://www.unix.com/shell-programming-scripting/59605-trap-key-press-script.html
however, I cannot figure out a way of avoiding the keypress if the... (2 Replies)
Discussion started by: cue
2 Replies
8. Shell Programming and Scripting
Hi all,
I need to know how to test a pressed key is arrowup or arrowdown and etc..
I found that the "echo" won't print anything if i enter the arrowup in the below code:
read
echo "you pressed $REPLY"
Then i find a way to achieve my goal.
1 #! /bin/bash
2
3 ARROWUP='\;then... (4 Replies)
Discussion started by: homeboy
4 Replies
9. Red Hat
Hi,
I have to get into BIOS and disable onbaord NICS for an IBM server, can someone please help me out.
I tried hitting F1 when reboot to get into BIOS, but it seems like a setup screen and I dont see any option to disable NICS?
Thanks
Sam (0 Replies)
Discussion started by: sam4919
0 Replies
10. Shell Programming and Scripting
I have a popup window that appears on every boot up.
I would like to have it dismissed automatically each time instead of having to hit the enter key.
I thought I could write a script that would execute on startup.
I tried this
xdotool key return
andy@7_~/Downloads$ xdotool key ... (7 Replies)
Discussion started by: drew77
7 Replies
LEARN ABOUT LINUX
keyboard_translatekeys
keyboard_translatekeys(3) Svgalib User Manual keyboard_translatekeys(3)
NAME
keyboard_translatekeys - modify scancode mappings in raw keyboard mode
SYNOPSIS
#include <vgakeyboard.h>
void keyboard_translatekeys(int mask);
DESCRIPTION
This function sets several flags which control how certain scancodes are mapped. At startup a mask value of 0 is active.
mask must be a logical or of zero or more of the following #predefined integers to turn the features listed on:
TRANSLATE_CURSORKEYS
Translate the scancodes of the SCANCODE_CURSORBLOCK* keys to those of the cursor keys on the number pad, s.t. keyboard_getstate(3)
and keyboard_keypressed(3) report a keypress of the corresponding number pad cursor key and not the one on the cursor block.
TRANSLATE_DIAGONAL
Translates the scancodes of diagonal cursor keys (keypad 7, 9, 1, 3) to presses of two of the ordinary up, down, left, right keys.
For example, instead of reporting a press of SCANCODE_CURSORUPRIGHT keyboard_getstate(3) and keyboard_keypressed(3) report a simul-
taneous press of SCANCODE_CURSORUP and SCANCODE_CURSORRIGHT.
TRANSLATE_KEYPADENTER
The scancode of the keypad enter key is mapped to that of the ordinary enter key, s.t. keyboard_getstate(3) and keyboard_key-
pressed(3) report a press of SCANCODE_ENTER regardless if keypad enter or ordinary enter is pressed.
DONT_CATCH_CTRLC
Pressing <Ctrl>-C does not raise a SIGINT. On contrary to the other flags this has also effect when a user defined keyboard event
handler is used. Svgalib will always process <Alt>-F1 - <Alt>-F10 and perform console switches accordingly.
BUGS
The TRANSLATE_* options above do really do simple scancode translations. For example, when TRANSLATE_KEYPADENTER is active and the user
presses both enter and keypad enter. Then, if he releases one of them (say keypad enter), it's release event will clear the common keyboard
state, s.t. no keypress is reported even though enter is still pressed.
Similarly, if TRANSLATE_DIAGONAL is active, the user holds cursor upleft (keypad 7) down and then presses and release cursor up (keypad 8),
svgalib will only report a pressed cursor left but the simulated cursor up will be lost. You can easily try this with the keytest(6) demo
to make the effect more clear to you.
SEE ALSO
svgalib(7), vgagl(7), libvga.config(5), keytest(6), eventtest(6), keyboard_seteventhandler(3), keyboard_init(3), key-
board_init_return_fd(3), keyboard_close(3), keyboard_update(3), keyboard_waitforupdate(3), keyboard_setdefaulteventhandler(3), key-
board_getstate(3), keyboard_clearstate(3), keyboard_keypressed(3), vga_waitevent(3)
AUTHOR
This manual page was edited by Michael Weller <eowmob@exp-math.uni-essen.de>. The exact source of the referenced function as well as of the
original documentation is unknown.
It is very likely that both are at least to some extent are due to Harm Hanemaayer <H.Hanemaayer@inter.nl.net>.
Occasionally this might be wrong. I hereby asked to be excused by the original author and will happily accept any additions or corrections
to this first version of the svgalib manual.
Svgalib (>= 1.2.11) 29 July 1997 keyboard_translatekeys(3)