# HP Forums

Full Version: Custom Menu Using a User Key
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Steps:

1. Create a new program. Press [ Shift ], [ Esc ] (Clear) to clear the default text.
2. Press [ Menu ] and select 4. Create User Key. Press a key combination.
3. Use a CHOOSE command to create a pop up menu. Enclose commands in a string. For mathematical expressions, use parenthesis. You may need to test commands.
4. Use the RETURN command to return a user's choice.

To use the custom menu:
Press [ Shift ], [ Help ] (User), < your user key>

Template:

BEGIN
...
CHOOSE(var, "Custom Menu", list of commands)
RETURN list(var);
END;

The following is an example menu with the following commands:

1. DDAYS - days between dates (yyyy.mmdd)
2. DATEADD - add number of days to a base date
3. QPI - find an exact representation of a floating number
4. approx - approximate an exact number
5. B→R - base number to real number
6. R→B - real number to base number
7. *(π/180) - convert from degrees to radians
8. *(180/π) - convert from radians to degrees
9. rectangular_coordinates - convert polar coordinates to rectangular coordinates (Geometry app). Use a vector or a complex number.
A. polar_coordinates - convert rectangular coordinates to polar coordinates (Geometry app). Use a vector a complex number. The angle symbol is found by [ Shift ], [ × ]

HP Prime PPL Program: CUSTOMMENU

I use the Toolbox key.

Code:
```KEY K_Math() BEGIN LOCAL LM, I; LM:={"DDAYS()","DATEADD()", "QPI()","approx()","B→R()","R→B()", "*(π/180)","*(180/π)", "rectangular_coordinates()", "polar_coordinates()"}; CHOOSE(I,"Custom Menu",LM); RETURN LM(I); END;```
Reference URL's
• HP Forums: https://www.hpmuseum.org/forum/index.php
• :