11-30-2001
Trapping Arrow keys
Hey Guys ,
How do we trap the arrow keys in shell programming.
Or atleast can we read the ascii code of the arrow keys.
I want to read the arrow keys pressed by the user
and accordingly highlight the corresponding menu option.
Is it possible in shell to do so ??
Thanks,
Nagesh.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
how do i trap enter command entered by a user.
actually i am throwing a screen this screen has no input but this screen should be displayes unless and until the user presses the enter key. as the user presses enter key the command prompt should come.
how do i achieve this (1 Reply)
Discussion started by: sunil bajaj
1 Replies
2. UNIX for Dummies Questions & Answers
how to use the arrow keys in shell scripting. is there any special synatax / command for this.
i just want to use the arrow keys for navigation.
replies appreciated
raguram R (3 Replies)
Discussion started by: raguramtgr
3 Replies
3. Shell Programming and Scripting
I would like to get a script to respond to arrow key presses to scroll up and down a menu.
The platform is CDLinux which uses a prehistoric version of bash, version 1.14.7.
I would like to do something like "read -sn 1 keyin" but the "read" command is so primative that it only has the -r... (1 Reply)
Discussion started by: simonb
1 Replies
4. Solaris
Hello,
I am unable to use the arrow keys in some applications. For example, in bash, I am able to use the arrow keys to to go back and forth characters in current line and search the history--I can do everything you'd expect to be able to do with the arrow keys. However, in bc, I cannot use... (4 Replies)
Discussion started by: cooldude
4 Replies
5. UNIX and Linux Applications
hi,
can anyone tell me how to enable arrow keys to scroll thru the commands on command prompt.
I am using C shell ( I know, in k shell, set -o vi would enable vi command history, but set -o doesnte exist in c shell) (4 Replies)
Discussion started by: hemangi13
4 Replies
6. UNIX for Dummies Questions & Answers
Hi
I am working on SunOS 5.10 from remote terminal using putty.
Also
echo $TERM
xterm
In vi editor when in insert mode arrow keys are not working for cursor movement instead they print A B C and D.
Please help.
thanks
ravs (7 Replies)
Discussion started by: ravashingravi
7 Replies
7. Shell Programming and Scripting
I recently needed to collect arrow keys (and function keys etc.) in a shell script so that I could run a text graphics-style data entry system (with text entry fields, drop-down list boxes, progress bars and the like). Yes you can do all this in shell, and portably too if you're careful.
I've... (4 Replies)
Discussion started by: cambridge
4 Replies
8. Shell Programming and Scripting
hello everybody,
as many, I have a problem with a script...
I wrote a shell script in which I want to read a variable value. the problem is that I can't use the arrow keys.
Here is the script I use :
#!/bin/bash
stty erase ^H
read foune
echo "$foune"
exit 0;
the problem is... (2 Replies)
Discussion started by: Moumou
2 Replies
9. UNIX for Dummies Questions & Answers
I would like to configure the key combination Tux-J (Win-J) as Down Arrow, and the rest of the VIM-style movement keys as well (HKL). What is the best way to do this so that it will work in all applications? I thought about editing the keyboard layout but I'm not sure how to do that for Tux-key... (2 Replies)
Discussion started by: dotancohen
2 Replies
10. UNIX for Dummies Questions & Answers
Would somebody advise how arrow keys could be binded in AIX v5.3?
I could not find reasonable information online related to AIX.
I've meat advises to define:
alias __A=$'\020' # or the same: alias __A=$(echo "\020")
alias __B=$'\016'
alias __C=$'\006'
alias __D=$'\002'
But it does... (2 Replies)
Discussion started by: alex_5161
2 Replies
YASR(1) General Commands Manual YASR(1)
NAME
yasr (Yet Another Screen Reader) - is an attempt at a lightweight, portable screen reader.
SYNOPSIS
yasr [ -C config file ] [ -c ] [ -s synthesizer ] [ -p synthesizer port ] [ program arg1 arg2 ... argN ]
DESCRIPTION
yasr is a lightweight, portable screen reader. It works by opening a shell in a pty and intercepting all user input/output, maintaining a
window of what should be on the screen by looking at the codes and text sent to the screen. It only requires that the user be able to
access the text to speech (TTS) device.
yasr was originally designed in conjunction with a Speak-out TTS device. Yasr also attempts to support DEC-Talk, DoubleTalk, Apollo, and
ViaVoice Outloud, but more work is needed to get these to work fully. It may be able to work with Emacspeak servers, however.
Currently yasr has two sets of keymaps, one for "review mode" (ie, reviewing the screen) and one for the standard mode. Keys defined for
the standard mode are checked irrespective of whether the user is in review mode or standard mode, but the review mode keymap is checked
first in the former case.
OPTIONS
-C config file
The configuration file that yasr should use.
-c Attempts to emulate bash's -c command. It runs /bin/sh, passing it the arguments that were passed to yasr.
-s synthesizer
The TTS synthesizer to use in conjunction with yasr.
-p synthesizer port
The port that the TTS synthesizer is connected to.
yasr will also fork and exec a program to run, if it (and any optional command line arguments it needs) are given as the last command line
arguments.
KEYBOARD SETTINGS
Review mode
spacebar
Say review cursor position.
^ Move to the first character on the line, and say word.
$ Move to the last character on the line, and say word.
b Say previous character.
c Say character.
d Say next character.
e Read from cursor to bottom of screen.
f Search for text on the screen.
< Search from cursor to top of screen, using the previously-entered search string.
> Search from cursor to bottom of screen, using the previously-entered search string.
k Move up a line and read the line (currently same as up arrow).
l Say current line.
m Move down a line and read the line (currently same as down arrow).
n Bypass (send directly to the application).
t Read from top to cursor.
w Read entire screen.
z Move to beginning of previous word and read the word.
x Move to beginning of next word and read the word.
up arrow
Move to previous line and read the line.
down arrow
Move to next line and read the line.
left arrow
Move back one character and read the character.
right arrow
Move ahead one character and read the character.
( Go to previous paragraph.
) Go to next paragraph.
alt-i Reinitialize the synthesizer.
` Read the ASCII value of the current character.
Standard mode These keys also work in review mode.
ctrl-a Say application cursor position.
ctrl-l Say line.
ctrl-n Bypass.
ctrl-x Flush speech buffer.
alt-b Say previous character.
alt-c Say chracter.
alt-d Say word.
alt-e Read cursor to bottom of screen.
alt-k Say previous line.
alt-l Read line.
alt-m Read next line.
alt-r Toggle review mode.
alt-t Read top to cursor.
alt-w Read entire screen.
alt-x Silence speech. Like ctrl-x but will continue to be silent until a key is pressed (pressing alt-x a second time will start speech
again, for example).
ctrl-alt-k
Keyboard wizard. Allows the user to move, copy, or delete keybindings from within yasr.
ctrl-alt-o
Options menu. Allows the user to set options from within yasr.
ctrl-alt-s
Save configuration to disk.
alt-enter
Disable yasr. Yasr is silent and ignores all keys when disabled. Press again to re-enable. Note: this key is defined in the
[options] section as "DisableKey"
FILES
/usr/local/share/yasr/yasr.conf
yasr configuration file.
AUTHOR
Michael P. Gorse <mgorse@users.sourceforge.net>
16 August 2002 YASR(1)