Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: ISO VT320 emulator with key-bindings for Oracle Forms
In article <7jr6lr$4f1$1_at_newsmaster.cc.columbia.edu>,
Frank da Cruz <fdc_at_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:
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_at_baileynm.com>
`-_-' Ar rug tú barróg ar do mhactíre inniu?
'U` "Be vewy vewy quiet...I'm hunting Jedi." -- Darth Fudd
Received on Sat Jun 12 1999 - 13:12:32 CDT