Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Mumps V1 and function keys...

70 views
Skip to first unread message

Sam Habiel

unread,
May 24, 2013, 12:07:55 PM5/24/13
to
Function keys are F1, F2, etc.

F1 sends to the terminal escape O P.

Here's how I test it on GT.M:
U $P:(NOTERMINATORS) R X:5 F I=1:1:$L(X) W !,$A(X,I)_" " U $P:(TERMINATORS="")

I tried doing the same on MV1, and I am not getting any success.

U $P:("TERMINATOR="_$C(0)) R X:5 F I=1:1:$L(X) W !,$A(X,I)_" " U $P:("TERMINATOR="_$C(13,10,27))

Fileman uses these a lot.

Help?

Sam

cais....@gmail.com

unread,
May 24, 2013, 4:17:44 PM5/24/13
to
Sam

This test routine detecting the function (or other) key-codes on MV1. Important checking the emulation mode/type of terminal software . The 3 ASCII code is general DEC mode , but ex.: Linux Gnome terminal default is 4 ASCII scan-code !

===============================================================

INP ;Input ESCAPE sequence MUMPS V1 test
U 0:("ESCAPE")
L W "Press a escape seq.key process ....(Q-quit)",!
R ANS:2 Q:ANS="Q"
S K=$KEY,K1=$A($E(K,1)),K2=$A($E(K,2)),K3=$A($E(K,3)),K4=$A($E(K,4))
W !,"Key sequnce : $C("_K1_","_K2_","_K3_","_K4_")",!
S K1C=$C(K1),K2C=$C(K2),K3C=$C(K3),K4C=$C(K4) S:K1=27 K1C="ESC"
W "Key macro : "_K1C_" "_K2C_" "_K3C_" "_K4C,!
G L
Q

=============================================================

Josef

cais....@gmail.com

unread,
May 24, 2013, 4:40:41 PM5/24/13
to
Sam

The MV1 formula is :

U $P:("TERMINATOR="_$C(0)) R X:5 F I=1:1:$L($KEY) W !,$A($KEY,I)_" " U $P:("TERMINATOR="_$C(13,10,27))

Josef

Ray Newman

unread,
May 24, 2013, 6:23:41 PM5/24/13
to
I use: 0 U 0:("ESCAPE":"ECHO":"NOCONTROLC":"DELETE=BOTH":"TERMINATOR="_$C(1,2,4,5,6,7,
8,9,10,11,12,13,14,16,18,20,21,22,23,24,25,26,28,29,30,31)) Q
;This code is DOne to USE 0 correctly
Then $KEY (after an ESCAPE sequence entered contains <ESC><O><P> for F1 for example.

Ray Newman
0 new messages