Up/Down Arrow selection
In cache I am looking for a user to, from read prompt, hit control F and be able, from a list, use the up and down arrow and select an item from a list.User would hit Control-F and then a list would pop up they can up and down arrow through and select it and it return to the read variable
It would be similar to this.
![]()
Product version: Caché 2017.1
$ZV: 2017.1.3 (Build 317_5_19102)
It depends on two things,
a) the (user) interface, your user uses and (telnet, web, an application, etc)
b) where your inputs are handled (on server, on users device)
This would just be a simple telnet VT100 session
OK, somehow I miss the question. Do you need the VT100 escape sequences (see here, Table 3-6) or something else?
Please bear with me as I only write in cache object script. We use ontario FACS collection system, we have been writing custom scripts to do things that our end users can't in our main frame.
That screen shot I showed is our main frame going to a read prompt, then end user can hit control F and bring a menu up of "keys" (1st node in a global) they can up and down arrow through that list and hit enter to select one and it returns it to the read prompt.
I want to be able to accomplish this.
- At a read prompt, a user can hit Control-F, a list of items pops up they can select from.
- The end user can use the up and down arrows to find the "key" hit enter and it populates that key to the "read variable" and moves on.
Usually, when using old VT100 sessions (CHUI) then there is a "main" function that can handle all special chars (e.g. PF1-4, ESC, HOME, CTRL-F) in one central place that is being called from all screens.
I would recommend using the following a technique:
Read *a Set zb=$zb,key=$key
Then, you may examine those variables zb and key to capture special keys.