HP Forums

Full Version: Unable to reassign K_Abc (a b/c) key
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

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.)

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