T.R | Title | User | Personal Name | Date | Lines |
---|
1818.1 | | SPSEG::PLAISTED | Subspace Gaseous Anomaly | Tue Feb 11 1997 18:04 | 32 |
| Escape sequences have to be done through programs that can interface via $QIO
system services eventually.
Ciao. Grahame
$!
$! See DCL Dictionary DEFINE/KEY for more information on the need
$! for setting the terminal to NOLINE_EDITING
$!
$ LineEditingEnabled = F$GETDVI( "TT:", "TT_EDITING" )
$ If LineEditingEnabled Then Set Terminal/NoLine_Editing
$!
$! If you want the word "SPECIAL_KEY" to echo on the screen, remove
$! the /NoEcho qualifier
$!
$
$ Define/Key/NoLog F13 SPECIAL_KEY/Terminate/NoEcho
$
$
$ Inquire KeyPressed "Special key"
$
$ If KeyPressed .Eqs. "SPECIAL_KEY" Then -
Write Sys$Output "The function key F13 was depressed"
$
$!
$! Restore former setting.
$!
$ If LineEditingEnabled Then Set Terminal/Line_Editing
$
$
$ Exit
|
1818.2 | I really appreciate your reply | KAOFS::P_CHAPLINSKY | | Wed Feb 12 1997 13:34 | 9 |
| Grahame - Thanks, thanks, thanks. It works like a charm.
$ @test
Special key: <depressed the F13 key
The function key F13 was depressed
I would have spent a lot of time trying to resolve this. Thanks again.
PChaplinsky
|
1818.3 | | AUSS::GARSON | DECcharity Program Office | Wed Feb 12 1997 16:38 | 13 |
| re .*
Note that this solution relies on using INQUIRE rather than READ. Using
INQUIRE has two possible disadvantages viz. it is insecure and cannot
be used in command procedures that are captive or intended to be
captive, and text entered is placed in the command recall buffer.
Note also that unconditionally redefining a key is somewhat
anti-social. However I am not sure that there is a clean way of
saving/restoring key definitions.
To process escape sequences sanely in DCL really requires a program.
|
1818.4 | | SPSEG::PLAISTED | Subspace Gaseous Anomaly | Fri Feb 14 1997 12:20 | 4 |
| Ah, yes. Good point. If the recall buffer is an issue, use the /NOECHO. That
will prevent it from getting stuffed in the recall buffer.
Grahame
|
1818.5 | Already done it, details attached | TAV02::HANOCH | Who ? Me Worried ? | Wed Feb 19 1997 02:33 | 13 |
| >
>Escape sequences have to be done through programs that can interface via $QIO
>system services eventually.
>
I've already done the job. Look at HANOCH::GETKEY.BCK It's a saveset
holding 3 files. Run the INSTALL.COM procedure. It will add a new command to
your DCL table, getkey, which its usage is as follows:
$ getkey symbol-name-to-get-value-of-pressed-key prompt-string
Good luck,
Hanoch
|