Post Reply 
Common User Keys setup and why?
01-12-2014, 08:27 PM
Post: #1
Common User Keys setup and why?
Hello,

Thanks to Eddie Shores great instructions on setting up HP Prime user keys:

http://edspi31415.blogspot.com/2013/09/h...-keys.html

I have setup a few of my own 3 press User keys (and reason):

- purge() ( lots of CAS variables I need to trash )
- f(x):= (generic start to save a CAS expression or equation - saves presses)
- Function.F1:=f (saves f(x) to Function APP for plotting - saves presses)

Please share a few of the User Keys you have setup (and reason). Maybe we can save each other time or perhaps the HP Prime team can integrate common ones into future firmware updates.

Best,
Carl
Find all posts by this user
Quote this message in a reply
01-12-2014, 09:01 PM
Post: #2
RE: Common User Keys setup and why?
(01-12-2014 08:27 PM)CR Haeger Wrote:  Please share a few of the User Keys you have setup (and reason). Maybe we can save each other time or perhaps the HP Prime team can integrate common ones into future firmware updates.

Best,
Carl

You can also create key definitions that does not rely on the RETURN command. See for instance my toggle for RPN/Textbook entry in http://www.hpmuseum.org/forum/thread-404.html

Cheers, Terje
Find all posts by this user
Quote this message in a reply
01-14-2014, 10:33 PM
Post: #3
RE: Common User Keys setup and why?
Thank you Terje. If I understand your code may be suitable for quickly changing calculator settings without having to click through menus? Cool.

Anyone else using user keys extensively on the Prime?
Find all posts by this user
Quote this message in a reply
01-16-2014, 06:18 PM (This post was last modified: 01-17-2014 01:06 PM by Jeff O..)
Post: #4
RE: Common User Keys setup and why?
(01-12-2014 08:27 PM)CR Haeger Wrote:  Please share a few of the User Keys you have setup (and reason).

Here are the ones I set up:
Code:

//Routines for complex number assembly/
//disassembly from/to reals on stack-1 
//and stack-2, polar to rectangular and
//rectangular to polar conversions on 
//reals in stack-1 and stack-2.

//stack-1 holds real or magnitude
//stack-2 holds imaginary or angle

//Real rectangular to complex - User 4
//Real polar to complex - User 7
//Complex to real rectangular - User 5
//Complex to real polar - User 8
//Real rectangular to real polar -User 6
//Real polar to real rectangular -User 9
//Conjugate of Complex value - User 2

//Complex to real rectangular
KEY K_5()
BEGIN
  "'Z1'▶ IM Z1 RE"
END;

//Complex to real polar
KEY K_8()
BEGIN
  "'Z1'▶ ARG Z1 ABS"
END;

//Real rectangular to complex
KEY K_4()
BEGIN
  "i * + i / CONJ"
END;

//Real polar to complex
KEY K_7()
BEGIN
  "'X'▶ X - + 'Y' ▶ SIN X *
  i * Y COS X * +"
END;

//Real rectangular to real polar
KEY K_6()
BEGIN
  "i * + i / CONJ 'Z1' ▶ ARG Z1 ABS"
END;

//Real polar to real rectangular
KEY K_9()
BEGIN
  " 'X' ▶ X - + 'Y' ▶ SIN X * Y COS X *"
END;

//Conjugate
KEY K_2()
BEGIN
  "CONJ"
END;

All of the above are for use in HOME in RPN mode. In each case, you must press ENTER to complete the operation.

If you cut and paste the above code, wherever the lower case i appears, it would need to be replaced with the italicized "i" character from the Prime keyboard (shift-2). (I tried to make it appear that way, but it appears that I am just not clever enough to figure out how to do so, so I gave up.)

As for the reason for the shortcuts, I suppose it would be stubborn clinging to the past Smile

Dave - My mind is going - I can feel it.
Find all posts by this user
Quote this message in a reply
01-17-2014, 03:47 PM
Post: #5
RE: Common User Keys setup and why?
(01-14-2014 10:33 PM)CR Haeger Wrote:  Thank you Terje. If I understand your code may be suitable for quickly changing calculator settings without having to click through menus? Cool.

Anyone else using user keys extensively on the Prime?

My basic user keys as follows:

User Key programs:
program name FactorExp
KEY K_Power()
BEGIN
RETURN "factor()";
END;

program name eXpandExp
KEY K_Mul()
BEGIN
RETURN"expand()";
END;

program name ZerosExp
KEY K_2()
BEGIN
RETURN"zeros()";
END;

program name CnVrtUnit
KEY K_5()
BEGIN
RETURN "CONVERT()";
END;

program name SolveExp
KEY K_9()
BEGIN
RETURN "solve()";
END;

K_Power: factor(Exp), program FactorExp
K_Mul: expand(Exp), program eXpandExp
K_2: zeros(Exp), program ZerosExp
K_5: CONVERT(value_unit1,1_unit2), program CnVrtUnit
K_9: solve(Exp,[Var]), program SolveExp

define user functions:

Name: Rd->Dg
Function: (X*180)/π
Desc: Convert radians to degrees

Name: Dg->Rd
Function: (X*π)/180
Desc: Convert degrees to radians

Just getting started.
Find all posts by this user
Quote this message in a reply
01-17-2014, 04:33 PM (This post was last modified: 01-17-2014 04:33 PM by Han.)
Post: #6
RE: Common User Keys setup and why?
By program names, do you mean that each of those key definitions reside in their own, separate source file? To reduce the number of entries in the program catalog, you can combine all of them into a single file (or program name, as you seem to call them). For example, in a single source file named USERKEYS you can have:

Code:

KEY K_Power()
BEGIN
RETURN "factor()";
END;


KEY K_Mul()
BEGIN
RETURN"expand()";
END;


KEY K_2()
BEGIN
RETURN"zeros()";
END;


KEY K_5()
BEGIN
RETURN "CONVERT()";
END;


KEY K_9()
BEGIN
RETURN "solve()";
END;

So all your user keys basically live in the same file.

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
01-17-2014, 08:25 PM
Post: #7
RE: Common User Keys setup and why?
Thank you for the advise, I will do as you suggested.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 2 Guest(s)