hp calculators 
 
HP 50g The User Keyboard 
 
hp calculators - 2 - HP 50g The User Keyboard 
Key Assignments and User Mode 
 
The HP50g has far more functions than can be shown on the keyboard. Access to these functions is through menus and the CAT 
(Catalog) command. It can be very useful to add some of these functions to the keyboard. The ASN and STOKEYS commands 
assign functions to keys. This lets you build up your own User Keyboard, with keys doing what you assign to them. Pressing 
!Ì sets User Mode and gives access to the User Keyboard. 
 
Assigning a variable name to a key 
 
As an example, assign the variable name LENGTH to a key and see how to use it. For this example to work, you must not yet have a 
variable called LENGTH, if you have one, use a different name here. Use the Xkey for this assignment. This key is in row 6 
down from the top, and in column 3 across from the left, so its keycode is 63. If you are using Algebraic mode you need to type 
ASN(LENGTH,63) so press the keys ~~asn!Ülength…í63`. Making an 
assignment does not create an object as a result, so the HP50g gives the result NOVAL. 
 
If you are working in RPN mode type ~~length`63`~~asn`. 
 
Now you can use this key assignment as shorthand for the variable name. To store the number 873.21 in this variable, in algebraic 
mode, type 873.21K!ÌX`. 
 
In RPN mode, type 873.21!ÌXK. 
 
Now you can use the key assignment to get the variable name or the variable value. Press !Ì to activate the User Keyboard, 
then press Xto get the variable value, 873.21, in a calculation, or to get the variable name LEN when you are writing an 
expression or a program. 
 
Locking the User Keyboard 
 
When you press !Ì to activate the User Keyboard, it works very much like an additional shift key. Instead of the right-shift or 
left-shift symbol, you see 1US at the top of the display. This tells you that the User Keyboard has been activated for one keystroke, 
and then you will be returned to the normal keyboard. If you want the User Keyboard to remain active, press !Ì!Ì, in 
other words press the keys twice. The letters USR will be seen at the top, showing that the User Keyboard is active all the time until 
you press !Ì again. 
 
Assigning the Factorial Function to a Key 
 
To assign a command or a function built into the HP50g to a key, use the command STOKEYS instead of ASN. Try using this to 
assign the factorial command to the right-shifted Xkey. As before, the key number is 63 because Xis the third key in the 
sixth row, but this time the keycode to use is 63.3 because .3 specifies that the key is right shifted. If you are not using RPN mode, 
do HW@@OK@@ first to set RPN mode. Now press the keys !ä (Note:these are the “curly brackets” on the left-shifted +
key, not the round brackets above the -key). Then continue by pressing ~~fact#63.3` 
~~stokeys`. To return to Algebraic mode, if you wish, press HW@@OK@@ again. 
 
To try the new assignment press !Ì…X and you will see the FACT function displayed. In RPN mode, the function is 
executed at once, first type the number whose factorial you want. 
 
In this way the USER key acts as an extra shift key, giving you even more commands on the keyboard, through the User Keyboard. 
Assignments can be made to ALPHA keys and shifted ALPHA keys too.