Showing results for 
Search instead for 
Did you mean: 
New member
4 1 0 0
Message 1 of 2
Flag Post

User mode. Automaticly execute routine prompted by user key?

HP Recommended
HP Prime

Though I've used HP calculators for more than 4 decades, the Prime is the first to program with HP PPL vs. simply mimicking keystrokes.  The language is very new to me.  I have two questions related to the User Keyboard.


1.  When an assigned key is pressed, the desired command is entered on the command line. Enter must be pressed to execute the command.  Is there a way to have command execute automatically when the assigned key is pressed, without having to press the Enter key?


2.  A separate program was written with key assignment commands. When in user mode, the assigned commands were entered with key presses even though I don’t believe the assignment program was ever formally executed.  I would like to assign different functions to user keys depending which program is being executed.  Would it be appropriate enter key assignments within the body of each program, making the assignments specific to that program only?


Thank you,



0 Kudos
Level 6
Level 6
252 251 42 77
Message 2 of 2
Flag Post
HP Recommended



Can you please post code snipets from your program to show us what you have done?


Here is an example of a program with a key assignement:


KEY K_Sin()
  local a;
  for a:=0 to 100000 do
    rect_p(0, 0, 200, 16, #FFFFFF);
    textout_p(a, 0, 0);

enter it and press on the sin key and you will see that the program is executed (you will see the loop counter displayed) before the done is entered on the command line?



I am an HP Employee
0 Kudos
† The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation