Anubhav Hanjura wrote:
> I wrote earlier regarding this but most of the solutions were
> generalised and didn't meet my expectations. The problem is that I want
> to trap the ALT key combinations through a C program. I am running my
> programs on Solaris 2.5 and want that I can trap any ALT key combination
> preferably a combination of two keys only ie. ALT-A , ALT-G, ALT-K .....
It doesn't matter how many times you ask this question; the answer
isn't going to change.
Terminal-driven programs can only detect Alt-<key> combinations if the
terminal actually checks the Alt key and sends something to indicate
that the Alt key was pressed.
The two most common mechanisms are to:
a) send the keycode plus 0x80, and
b) send Escape (0x1B) followed by the keycode.
Unless your terminal does something like this, there is absolutely no
way that you can detect whether the Alt key was pressed.
--
Glynn Clements <[EMAIL PROTECTED]>