home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!Germany.EU.net!news.Hamburg.Germany.EU.net!mwhh!dmhh.hanse.de!detlef
- From: detlef@dmhh.hanse.de (Detlef Mueller)
- Newsgroups: comp.sys.hp48
- Subject: Re: Emulating a keypress in sys_RPL???
- Distribution: world
- Message-ID: <721942676detlef.detlef@dmhh.hanse.de>
- Sender: detlef@dmhh.hanse.de
- Date: Mon, 16 Nov 92 19:37:56 GMT
- References: <1992Nov16.090229.12183@waikato.ac.nz>
- Lines: 54
-
- In article <1992Nov16.090229.12183@waikato.ac.nz> fee@waikato.ac.nz writes:
-
- >How do I emulate a key-press in sys_RPL?
- >
- >That is, if I have a keycode in level 2 and a key plane in level 1,
-
- As BINTs ?!
-
- >giving the location of a key that is always a menu key, how do I
- >get the 48 to believe that key has been pressed and evaluate whatever
- >function is assigned to the menu key at the time?
- >
- >What I have tried are the sequences: Key>StdKeyOb DoKeyOb
- > and: Key>StdKeyOb EVAL
- >
- >I have had limited success with these. If the menukey has some global
- >user variable name, such as that of a directory, a program or a list
- >both the above sequences work fine.
-
- This should work in general, but I would suggest to use the former sequence
- (let DoKeyOb evaluating a keyob) with PTR 3F9FD instead of Key>StdKeyOb -
- PTR 3F9FD checks for special conditions (ParOuterLoop running, USER enabled
- etc.).
-
- >However, if the menukey is for some built-in function, like PICT, the 48
- >will hang on trying either of the above sequences. Things that make you
- >go mmmmmmhhhh...
- > [..]
- >Any ideas for how to achieve a reliable key press emulation? Why are
- >built-in objects causing trouble?
-
- I didn't have any trouble when running the following program with menu 13.01
- being active; pressing the [A] key returns PICT into the stack (I also
- checked it with Key>StdKeyOb - same result):
-
-
- %%HP: T(3);
- "::
- CK0NOLASTWD
- BlankDA2
- $ "Perform a keystroce\031"
- DISPROW5
- WaitForKey ( \-> #kc #pl )
- PTR 3F9FD ( \-> keyOb )
- DoKeyOb
- ;"
-
- Hope that helps,
- 8-Detlef
- --
- +------------------------------------+--------------------------------------+
- |`What a depressingly stupid machine'| Detlef Mueller |
- | -- Marvin | detlef@dmhh.hanse.de |
- +------------------------------------+--------------------------------------+
-