HP Forums
Extra set of User defined Keys? - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: Extra set of User defined Keys? (/thread-18892.html)



Extra set of User defined Keys? - matalog - 09-27-2022 06:57 PM

Is there any way to create a 2nd (or indeed 3rd etc) set of user defined keys on the HP Prime?

Is there a file somewhere that stores them that could be instructed to switch the user defined keys over from a Notes file for example?


RE: Extra set of User defined Keys? - pinkman - 09-27-2022 09:55 PM

Key definitions are programs. I don’t think you can do exactly what you need, but there are solutions:

1- Elegant
Use a global variable to store the “page” you want to be active.
Then, for each key you need to be defined differently according to the page, create a function with a CASE statement on the global variable.

Code:

EXPORT kPage;

KEY K_Sin()
BEGIN
 CASE
  IF kPage = 0 THEN RETURN "ABC()"; END;
  IF kPage = 1 THEN RETURN "DEF()"; END;
 DEFAULT
  RETURN "GHI()";
 END;
END;

Of course you can assign the change of the value of your global variable to a key Wink

2- Lazy
The key definitions are read in the last edited program containing some. So just create as many program files as you want, and when you need to change the key page you just have to open the program editor for the designed program file.


RE: Extra set of User defined Keys? - matalog - 09-28-2022 09:51 PM

(09-27-2022 09:55 PM)pinkman Wrote:  Key definitions are programs.

That is enough to do anything with. Thank you.