The Museum of HP Calculators

HP Forum Archive 21

[ Return to Index | Top of Index ]

Unable to reassign K_Abc (a b/c) key
Message #1 Posted by Andy Gryc on 9 Nov 2013, 4:15 p.m.

To make the Prime keyboard a little more programmer-friendly, I've been trying to assign a function to a key like so:

KEY K_Abc()
BEGIN
 RETURN "CYCLEBASE";
END;

EXPORT CYCLEBASE() BEGIN LOCAL v; Base:=(Base+1) MOD 4; v:={2,8,10,16}; RETURN v[Base+1]; END;

Based on research in the message archives, I know I can't actually execute a function when the key is pressed. (I've tried putting in a "\n" into the string on a hunch, but no luck.) So I'll have to settle just for inserting the function call into the command line.

But what I think is unusual is that the key I am least likely to use (a b/c) would be perfect for me to reassign, but it seems to be a key that doesn't want to be reassigned. That is, the above code doesn't do anything if in user key mode and ABC key is pressed. If I replace it with K_SIN or K_Templ, it works okay.

Is this a known issue? Is the key name (despite being returned by the "Create user key" menu option) wrong and hence unrecognized? I ask this because it seems that any arbitrary string can follow the KEY keyword without causing a syntax error. (I've tried K_ABC as well, but no luck.)

      
Re: Unable to reassign K_Abc (a b/c) key
Message #2 Posted by Han on 9 Nov 2013, 5:02 p.m.,
in response to message #1 by Andy Gryc

It's a known issue. In fact, a lot of keys cannot be redefined (including keys in combination with alpha or shift or both)


[ Return to Index | Top of Index ]

Go back to the main exhibit hall