01-11-2014, 05:22 PM
Hi,
Having read the manual (p 516/517) I was under the impression that all key assignments would do was to return a function or other text using the RETURN command. I played around using this command, but found it very difficult to make any key assignments of much use. Then when reading another message on the forum I was directed to an article on the comp.sys.hp48 where a person called Toby had made a short key assignment to scroll through Textbook, Algebra and RPN input settings.
To my surprise his method did not rely on the RETURN command at all, and still worked fine. As I have not found this being discussed elsewhere on the forum, I thought it worthwhile to mention, also that you can have several key assignments in one program file.
Below is an example key assignment file, that allows toggling between RPN and Textbook (I have not had occasion to use the Algebra setting at all so far) and also between Radians and Degrees, both in Home view.
I have kept the code in a file called User Keys
Cheers, Terje
Having read the manual (p 516/517) I was under the impression that all key assignments would do was to return a function or other text using the RETURN command. I played around using this command, but found it very difficult to make any key assignments of much use. Then when reading another message on the forum I was directed to an article on the comp.sys.hp48 where a person called Toby had made a short key assignment to scroll through Textbook, Algebra and RPN input settings.
To my surprise his method did not rely on the RETURN command at all, and still worked fine. As I have not found this being discussed elsewhere on the forum, I thought it worthwhile to mention, also that you can have several key assignments in one program file.
Below is an example key assignment file, that allows toggling between RPN and Textbook (I have not had occasion to use the Algebra setting at all so far) and also between Radians and Degrees, both in Home view.
I have kept the code in a file called User Keys
Code:
// Toggle switch RPN/Textbook
KEY K_On()
BEGIN
IF Entry == 0
THEN Entry:=2
ELSE Entry:=0;
END;
//Trick to refresh screen
STARTVIEW(−8,1);
STARTVIEW(−1,1);
END;
// Toggle switch Deg/Radians in Home view
KEY K_Eex()
BEGIN
IF HAngle == 0
THEN HAngle:=1
ELSE HAngle:=0;
END;
//Trick to refresh screen
STARTVIEW(−8,1);
STARTVIEW(−1,1);
END;
Cheers, Terje