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

How To Change Built-In Menu Key Assignments Using STOKEYS

30 views
Skip to first unread message

Ryan B.

unread,
Dec 25, 2011, 4:53:21 PM12/25/11
to
Please accept my apologies if this is old or otherwise useless
information, but I had a basic problem that I just solved and, not
finding the solution discussed in the archives, thought I would post
in case someone needs it in the future.

I wanted to reassign the behavior of the "CST" key to a different key
in user mode. On the HP48, it is key number 23.1. For the purposes
of illustration, let's say I wanted to reassign the "MTH" key, number
21.1, to execute the "CST" behavior.

Let's assume the CST menu (stored in the CST variable in the current
directory) contains the following:

{ASIN ACOS ATAN}

A cursory look at the relevant manuals would lead one to believe the
correct method for reassigning key 23.1 (CST) to key 21.1 (MTH) would
be (note STOKEY is found under the MODES/KEYS menu):

{ CST 21.1} ENTER STOKEY

If you do this, then enter USER mode, and press key number 21.1 (the
MTH key on the HP48G), you get the following response:

{ASIN ACOS ATAN}

on the stack level 1. It simply regurgitated the CST menu. This is
because, rather than running the menu, the system evaluates the
variable named "CST" and places it on the stack.

In order to get the desired behavior - that is, to have the menu
change to the CST menu when key 21.1 is pressed - we must make use of
the MENU command. We take advantage of the fact that the system
merely evaluates the expression you've stored (assigned) to key 21.1
as follows:

{ << 1 MENU>> 21.1} ENTER STOKEY

Now, when you enter user mode and depress key 21.1 (MTH key), the
system evaluates the expression <<1 MENU>>, which causes the CST menu
to be displayed. (See page 3-187 of the 48G series AUR, which lists
all the built-in menu codes.)

The real reason I ran into this problem was an effort to reprogram
some of the keys on my new HP50G to be more like my HP48G, so I know
the method also works fine on the 50g.

-Ryan
(Note: second posting of this - deleted the first one due to some
unfortunate typos.)

John H Meyers

unread,
Dec 27, 2011, 7:37:58 PM12/27/11
to
On 12/25/2011 3:53 PM, Ryan B. wrote:

> A cursory look at the relevant manuals would lead one to believe the
> correct method for reassigning key 23.1 (CST) to key 21.1 (MTH) would
> be (note STOKEY is found under the MODES/KEYS menu):
>
> { CST 21.1 } ENTER STOKEY

What manual suggests that?

The label on a key (whether CST or CUSTOM in this case)
does not imply that this printed label is the name of any corresponding
function, just as the word ENTER isn't a function either.

Since CST is actually a variable name, and since evaluating that name
merely evaluates the variable's content, and since that content is normally a list,
evaluating 'CST' usually results in a list (or the name 'CST' itself
if no variable of that name is found).

The custom menu number is evidently 1,
so that the program \<< 1 MENU \>> can be used to switch to the custom menu,
as you already noted.

By the way, a single user key assignment may also be made using the ASN command.

[r->] [OFF]

Ryan B.

unread,
Dec 29, 2011, 9:56:30 AM12/29/11
to
On Dec 27, 7:37 pm, John H Meyers <jhmey...@nomail.invalid> wrote:

> What manual suggests that?


I apologize, I'm not exactly the sharpest knife in the drawer, and it
was wrong of me to assume that anyone else would follow the User's
Guide the way I did. I don't know much about the HP48, and I should
not have wasted the group's time with something so obvious. I will be
more careful in the future.

-Ryan
0 new messages