New Firmware for HP Prime and HP15c CE. Also Firmware preinstalled on HP15c CE

Published on 10/20/2014 11:22 PM by JGD

HP Prime user keys

Some clever shortcuts for HP Prime

The user keyboard in the HP Prime gives us great flexibility in configuring our calculator. Those that had used the HP50g and HP41c were used to this feature (I can’t remember now if the keyboard was fully configurable with the HP42s. Other calculators only had function keys, that, while useful, is a completely different thing)

Unless you’re a student with very wide subjects to cover, you will have several tasks that you perform very often, and you’ll want to automate them as much as possible. I have my HP41cl fully customized to my liking - no wonder it is still my preferred calculator. While others serve me well, this is the one that has everything I want at my fingertips. Now it makes sense to do the same thing with the HP Prime.

The key assignment procedure is covered in page 516, but the way it is described, it looks like you only can program it to return a text. In fact, if you try to make it do anything else, it will give you a syntax error.

You need to write short programs for each of your key assignments. Don’t worry: it is extremely simple and you have a template for it, that can be launched from the template soft key in the program screen.

I have created a program file called “Keys” where I store all the key definitions I use. Putting them in more places will only result in a mess when changing the configuration. Only creating the little program and activating the user keyboard (either for a single key or permanently) is enough to enable the assigned key (I need to check whether you can restrict the application of the key definitions, by locating its program within a specific app)

The syntax is very easy, and, as said before, it can be launched from a template, as seen on the picture beside. I use a lot of percentage comparisons, and, on the other hand, very few trigonometric functions, so I mapped all three typical percentage functions (already existing in the Prime) to the three trigonometric keys, on their main unshifted meaning:

KEY K_Sin()

BEGIN

RETURN “%”;

END;

KEY K_Cos()

BEGIN

RETURN “%CHANGE()”;

END;

KEY K_Tan()

BEGIN

RETURN “%TOTAL()”;

END;

What does it does? It writes at the cursor position the text between inverted commas. It does not separate it from the previous number, but we’ll see shortly after that it does not matter.

Note that if you want to reprogram shifted keys, you may do it as well, by changing the key prefix:

K_ stands for main key

KS_ is for shifted keys

KA_ is for alphanumeric

KSA_ is for shifted alphanumeric

The coding of each particular key is shown in page 518 of the manual. (The full manual can be shown in the Windows Prime emulator, in the help menu)

How does it work? The rest of the discussion assumes entry mode is RPN.

Imagine you want to calculate 25% of 235. You write 235, enter, 25, press the SIN key, it appends a “%” character to the 25, now press enter, and you have the result. Note that you did not have to separate the % from the number - but it didn’t look bad anyway.

Now try this: you want to see the % change between 235 and 200. You press 235, enter, 200, COS, and you see on the screen:

235

200%CHANGE()

Now that looks ugly. You can, of course, press enter after the 200, then press COS, then press enter again. But that’s one key pressed too much! Same for entering an space before COS

Just try like above. It works!

As it works like that, I would not enter a space in the program itself - who knows if it can wreak havoc in other situations!