Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: peter@baileynm.com (Peter da Silva)
Subject: Re: ISO VT320 emulator with key-bindings for Oracle Forms
Date: 1999/06/12	[thread overview]
Message-ID: <7ju7ug$nm8@web.nmti.com> (raw)
In-Reply-To: 7jr6lr$4f1$1@newsmaster.cc.columbia.edu

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2064 bytes --]

In article <7jr6lr$4f1$1@newsmaster.cc.columbia.edu>,
Frank da Cruz <fdc@watsun.cc.columbia.edu> wrote:
>But again: in general, there is no API in UNIX to get the keycode of a
>keyboard event.

Assuming that's what you want, no. However there is an API in UNIX to
get a string of one or more characters that represent a keystroke, and
for non-pathological cases that's all you need.

After all, we ARE talking about a terminal emulator. Yes, you can get
escape sequences garbled over communication lines that don't maintain
time information. But there's two cases we need to consider here:

	1. The terminal emulator is "close" to the keyboard.

	Here, time information is preserved, the emulator can reliably
	distinguish keystrokes. This is the case of a PC or a UNIX program
	running on a console or in an X terminal.

	2. The terminal emulator is far from the keyboard.

	Here, it isn't. But remember that the other side of the terminal
	emulator is also generating escape sequences that are subject to
	the same problem... so a PC-based terminal emulator would have
	the same trouble getting ITS escape sequences reliably recognised,
	since it would have to run close to the keyboard and far from the
	application.

The only case I can think of where there's a problem is if the input
escape sequence (from the keyboard to the emulator) is less reliably
recognised then the output one (from the emulator to the application),
or if the emulator is running on a significantly overloaded computer.

If you need to distinguish codes (like shift-alt-F7 versus alt-F7) that 
the OS doesn't provide a hook for, then you have a problem, but this,
like the heavily overloaded computer, is a pretty pathological case.

After all, international PC keyboards give you bigger problems than this.

I haven't figured out how to generate a seperate "~" on some spanish
keyboards, for example.

-- 
In hoc signo hack, Peter da Silva <peter@baileynm.com>
 `-_-'   Ar rug t� barr�g ar do mhact�re inniu? 
  'U`    "Be vewy vewy quiet...I'm hunting Jedi." -- Darth Fudd




  reply	other threads:[~1999-06-12  4:00 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-06-10  4:00 ISO VT320 emulator with key-bindings for Oracle Forms Frank da Cruz
1999-06-10  4:00 ` Frank da Cruz
1999-06-11  4:00   ` Peter da Silva
1999-06-11  4:00     ` T.E.Dickey
1999-06-12  4:00       ` Peter da Silva
1999-06-11  4:00 ` Peter da Silva
1999-06-11  4:00   ` Frank da Cruz
1999-06-12  4:00     ` Peter da Silva [this message]
  -- strict thread matches above, loose matches on Subject: below --
1999-06-01  4:00 Frampton Steve R
1999-06-02  4:00 ` Frank da Cruz
1999-06-02  4:00 ` Walter Harms
1999-06-02  4:00 ` Richard S. Shuford
1999-06-03  4:00   ` Scott G. Hall
1999-06-03  4:00     ` Jeffrey Altman
1999-06-03  4:00     ` Frank da Cruz
1999-06-08  4:00       ` Scott G. Hall
1999-06-08  4:00         ` Frank da Cruz
1999-06-09  4:00           ` Peter da Silva
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox