For quite some time, I have been frustrated by not being able to
handle arrow keys, page-up, page down etc.  I know that the XGF
library has been written to handle this.  But I have never been able
to get it to work.  And the DEMO^XGF code doesn't work on my system
for some reason either.  I would love for someone to post some code
that does the same thing as below with the XGF library that I could
try.

But I have found the the VPE library has a good keyboard handler.
Here is a screen shot of this code:


TestKB
        new KEY,VK
        for  do  quit:(VK="<ESC>")
        . S KEY=$$READ^%ZVEMKRN("",1,1)
        . S VK=VEE("K")
        . write "KEY=",KEY,"   VK=",VK,!
        quit

GTM>do TestKB^TMGTEST
KEY=a   VK=    <-- standard keys
KEY=b   VK=
KEY=c   VK=
KEY=   VK=<AU>   <---- arrow up
KEY=   VK=<AL>   <---- arrow left etc.
KEY=   VK=<AR>
KEY=   VK=<AD>
KEY=   VK=<PGUP>
KEY=   VK=<PGDN>
KEY=   VK=<HOME>
KEY=   VK=<DEL>
KEY=   VK=<F1A>   <--- [F1]+a
KEY=   VK=<BS>
KEY=   VK=<ESCJ>    <----Alt+J

[ESC][ESC] will abort the loop.

Hope this helps someone.

Kevin

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Hardhats-members mailing list
Hardhats-members@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hardhats-members

Reply via email to