Hi ,
I do the following :
]echo "Do you want to say yes or no ?(y/n):\c"
read ans
here 'n' is the default value.that means if the user press ENTER key then it should be 'n' .
Now how do i know that the user has pressed ENTER key.What will be stored in my variable 'ans'. (4 Replies)
without pressing the enter key ..manually...
how can we read the enter key ..from the shell script..so that the script termintes automatically.
eg:
telnet a.b.c.d xxxx
now " how to read the enter key" tho terminate the script (1 Reply)
Using SCO 5, Ksh here
I am trying to automate some process that i am doing manually.
During some point of time, I will have to press enter to clear away some messages.
This is how I do manually.
*one command*
r
r
r
r
r
I enter the command once, then press enter key 1 more... (6 Replies)
Hello All,
i have a script to get input from the user like bellow,
read -p "Do you want to continue (y/n) : " status
i want to identify the pressing of Enter Key with out giving any value for the above statement and i want get the status if we press Enter key during run time.
How to... (0 Replies)
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)
My problem is that i have to connect Linux server. I can connect it with SSH but because of the software of the Linux server, i need to press enter and after ctrl+D. Therefore, I need to write a script that should press enter and ctrl+D. How can i write it in KSH shell script. HELP ME! (7 Replies)
Hi Experts,
I have a script in which I want to disable the "Enter" key press. Actually my script executes some process in background. So, till that background process is running, I don't want "Enter" key to be pressed by user. Is this can be achieved using trap command? (6 Replies)
I'm working in a UNIX box that's owned by a vendor. They have it set up by State, meaning when I need to program script related to certain States, I type in, for example, "CA", it goes to a whole other terminal:
ddqsw:pts/2:login
miller CA
TERM = ( vt100 )
When I do this I have to hit... (7 Replies)
Discussion started by: shorty
7 Replies
LEARN ABOUT FREEBSD
setkeycodes
SETKEYCODES(8) Keyboard Support SETKEYCODES(8)NAME
setkeycodes - load kernel scancode-to-keycode mapping table entries
SYNOPSIS
setkeycodes scancode keycode ...
DESCRIPTION
The setkeycodes command reads its arguments two at a time, each pair of arguments consisting of a scancode (given in hexadecimal) and a
keycode (given in decimal). For each such pair, it tells the kernel keyboard driver to map the specified scancode to the specified keycode.
This command is useful only for people with slightly unusual keyboards, that have a few keys which produce scancodes that the kernel does
not recognize.
THEORY
The usual PC keyboard produces a series of scancodes for each key press and key release. (Scancodes are shown by showkey -s, see
showkey(1).) The kernel parses this stream of scancodes, and converts it to a stream of keycodes (key press/release events). (Keycodes
are shown by showkey.) Apart from a few scancodes with special meaning, and apart from the sequence produced by the Pause key, and apart
from shiftstate related scancodes, and apart from the key up/down bit, the stream of scancodes consists of unescaped scancodes xx (7 bits)
and escaped scancodes e0 xx (8+7 bits). To these scancodes or scancode pairs, a corresponding keycode can be assigned (in the range
1-127). For example, if you have a Macro key that produces e0 6f according to showkey(1), the command
setkeycodes e06f 112
will assign the keycode 112 to it, and then loadkeys(1) can be used to define the function of this key.
Some older kernels might hardwire a low scancode range to the equivalent keycodes; setkeycodes will fail when you try to remap these.
2.6 KERNELS
In 2.6 kernels key codes lie in the range 1-255, instead of 1-127. (It might be best to confine oneself to the range 1-239.)
In 2.6 kernels raw mode, or scancode mode, is not very raw at all. The code returned by showkey -s will change after use of setkeycodes.
A kernel bug. See also showkey(1).
OPTIONS
None.
BUGS
The keycodes of X have nothing to do with those of Linux. Unusual keys can be made visible under Linux, but not under X.
SEE ALSO
dumpkeys (1), loadkeys (1), showkey (1), getkeycodes (8)
Local 8 Nov 1994 SETKEYCODES(8)