Rob van der Heij wrote:
On 5/30/07, John Summerfield <[EMAIL PROTECTED]> wrote:

How does one get a 3270 to generate these?

It would be possible to write block-mode applications for Linux, but
current interactive programs expect keys to be presented asynchronously.


One of the tricks I have encountered in the past is using a single
character in an input field combined with one reserved PF-key. And in
the case of Linux the presentation layer does not need the PF-keys,

I'm not sure I follow, but I note that some applications use some
function keys. I tend to not use short-cuts (accelerators) as in the
Linux world they're rarely obvious to me, except when they're
highlighted in a dialogue. As they are in YAST.

How would you go in VI, navigating with hjkl and others? What about
commands such as "dw?" i for insert at cursor, a for insert after
current cursor.

What about mouse-capable character apps such as links, elinks, w3m and pine?


you have some freedom to use more PF-keys for the simulation.
The other one we did (on local terminals) was to repeat "read
modified" to the terminal and pick up the character in the field
before Enter was pressed (pretty expensive hobby).

As we've noted here before, I/O for small amounts of data gets
expensive. To read one character on an original 3270, as best I recall,
one actually reads
AID-<pos><pos>SF<pos><pos><char>
read buffer is, of course, worse.

For those who don't understand this, AID identifies the key - <enter>,
PF1-whatever etc. Then there's the cursor position, in code. Then the SF
identifies the start of a field (more recently there's SFE but I don't
know how that goes), then the field postilion, encoded. Then the field
contents. And them (maybe) more fields.

Note: Action keys - PA1, Cancel etc don't send data.



Whether you would want PF-keys to simulate navigation on a screen with
(cursor) keys is not obvious to me (well, actually it is - but I don't
want to contribute to that fight). Since the current cursor position
is transmitted with Enter of PF-key, I could imagine that moving the
cursor between two AID keys can be passed to the application as if a
few arrow keys were pressed.

One needs to move the cursor, preferably by means other than the TAB
key. Since applications can use PF keys, I don't see how you can use
them for other purposes.


How hard would a 3270 based implementation of ncurses library be? And
would that solve the issues?

There's also SLANG.

I don't see how you can get combinations such as ALT-O, ^Q and PF1 to
the application without doing lots of expensive mucking around and/or
making life difficult for the user. But then, in my time it's been
others making rash promises and then expecting me to fulfill them.

You could write a subset, an analogue of CURSES and/or SLANG and write
to that API, but that would not satisfy much existing code. OTOH it may
well be enough to get one out of the latest pickle. Its functionality
would be somewhat similar to a web interface.

Better, I think, the idea we debated a few months ago, with a new async
device that a peecee could attach to, and that VM can switch between guests.






--

Cheers
John

-- spambait
[EMAIL PROTECTED]  [EMAIL PROTECTED]

Please do not reply off-list

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

Reply via email to