Using Function and Arrow Keys for Input

Using Function and Arrow Keys for Input

Post by test » Sat, 22 Nov 1997 04:00:00



So no one feels compeled to flame me, please let me correct my mistake
in the previous post. The control-z is normally mapped to "stop" in
unix; the control-c is mapped to "quit". Sorry if I caused any
confusion.
--

The above opinions are mine, not my employer's.

 
 
 

Using Function and Arrow Keys for Input

Post by Uriah Welcom » Sat, 22 Nov 1997 04:00:00


Hello, I am a novice Universe Programmer (6 Months) I am wondering if it is
possible to setup arrow keys and perhaps function keys as and input. Say
there is 4 Scrolling text boxes on a screen and only want to input into the
last on, is there a way to make it so you would just have to hit the right
arrow key 4 times.. thanks for any help

Uriah

 
 
 

Using Function and Arrow Keys for Input

Post by test » Sat, 22 Nov 1997 04:00:00


[Mailed and Posted]


> Hello, I am a novice Universe Programmer (6 Months) I am wondering if it is
> possible to setup arrow keys and perhaps function keys as and input. Say
> there is 4 Scrolling text boxes on a screen and only want to input into the
> last on, is there a way to make it so you would just have to hit the right
> arrow key 4 times.. thanks for any help

> Uriah

Yes, it is possible. However, you have to keep the following in sync:

 - Unix tty parameters
 - Unix Terminfo/Termcap definitions
 - Universe PTERM settings
 - The Keyboard definition for the Terminal emulator (if using a PC)

For example, on our system we use a vt220 emulation, but use the arrow
keys from an AddsVeiwpoint (hardcoded into the app. Not good I know).
The UP ARROW on an AddsViewpoint is a Control-Z.  In Unix, this is
usually mapped to the 'quit' signal. So on our our system, the 'stty
quit' is mapped to a control-E in the .profile.

The terminfo file for the vt220 has the up-arrow mapped to a control-Z.
To do this, you first change the terminfo.src entry (found in a
directory under the uv dir) and then run (in unix) the uvtic program to
copy the changes to the /usr/lib/terminfo files for unix.

Next, the change the PTERM setting in Universe to turn off quit, in case
someone uses another term type anyway. And finally, our terminal
emulator has the arrow key coming in from the PC remapped to a
control-Z.

Hope this helps.
--

The above opinions are mine, not my employer's.

 
 
 

1. Using arrow keys as input...

Ok, here's what I would like to do:

    I am trying to make a nice interface for the users when they are selecting
a certain date out of several.  Basically, I would like to open a window that
displays 3 of the dates (in chronological order) with the center one
highlighted.  If the user doesn't want the one which is highlighted, he/she
can simply press the arrow keys on their keyboard, and the dates will scroll
up and down in the window, until the date that is desired is in the
highlighted area.  Then the user presses <ENTER>, and the highlighted date is
chosen.

What I have done:

    So far, I have done all the easy stuff such as opening a cursor for the
dates, presenting them in the window nice and fine, all of that kind of stuff.
What I can't figure out how to do, is to have the user press on the arrow
keys, and have that trigger some code to act.  I would like something like the
INPUT...ON KEY idea, but I would prefer not to use a screen form.  I would
like to detect that the user hit the arrow key, and then scroll through the
dates (via the cursor) corresponding to which arrow key was hit.

What I am doing this with:

    Informix 4gl, 5.0 Engine, 4.1 Tools.

Any suggestions???


Thanks for any help you can give.

john...

2. BeginTrans and Commits

3. HELP: arrow keys and INPUT

4. Creat SQL script from a recodeset?

5. UniData arrow and function keys

6. Foxprow (2.6) report to wp

7. Using arrow keys in Informix...Followup

8. Notifying more than one operator

9. Odd behaviour of cursor when using arrow keys in Pdox4.5 for win

10. Using Arrows as Hot Keys

11. dBase: Using the arrow keys

12. back space key and arrows keys

13. Function Keys and Input