Post Reply 
User defined key going to straight to a program
05-17-2021, 08:58 PM (This post was last modified: 05-17-2021 09:24 PM by matalog.)
Post: #1
User defined key going to straight to a program
I tired this, to remove the need to press enter, after a key assigning program, returning a program name as a function:
Code:
KEY K_Sin()
BEGIN
 Input(A,"Number","Number: ",0,0);
 Return A;
END;

But it doesn't work as expected. Depending on the number entered in the input box, the program will return different things, I once (with 78 input) got it to return a square symbol with circle inside, and got it to return Sin() (with 238 or something close input. Both times, I had User Input activated, and my program ran upon clicking Sin() key. Inputting 83 will bring up the Lists menu, and 84 will return curly brackets.

What I am describing is in textbook entry mode.

Were user keys assignments not designed to work like this, is it considered a bug?

Is there a correct way to run a user program with a single button press (not followed by Enter), that will allow the Returned number to go on the calculator stack?
Find all posts by this user
Quote this message in a reply
05-18-2021, 08:39 PM (This post was last modified: 05-18-2021 08:44 PM by matalog.)
Post: #2
RE: User defined key going to straight to a program
So, I worked out that exactly is happening here, maybe you all knew already.

The input number is being treated like an instruction to a Key, like Getkey numbers, but extended to Shift keys (51+Input) or Alpha Keys (51+51+Input), Shift+Alpha Keys (51+51+51+Input), so, if you input 134 in this program, then the outcome will be a Q, 185 will be q on screen.

There is a very small chance that something useful could ever come of this, but it is there :-).
Find all posts by this user
Quote this message in a reply
05-18-2021, 09:45 PM
Post: #3
RE: User defined key going to straight to a program
I suppose It may be obvious, when you consider that the whole program was defined in the first line as KEY K_Sin(), effectively making it a Key reading program, not a function or procedure, but then KEY, as a command is not defined anywhere in any of the lists that I have looked at, it was merely mentioned in page 616 of the 2017 version of the Manual that I read.

Maybe it is not defined, because it is not usable anywhere else in a program?

Any advice on the subject would be appreciated.
Find all posts by this user
Quote this message in a reply
05-19-2021, 05:12 AM
Post: #4
RE: User defined key going to straight to a program
(05-18-2021 08:39 PM)matalog Wrote:  There is a very small chance that something useful could ever come of this, but it is there :-).

It was to let a basic user redefine keys into a new location... Smile

TW

Although I work for HP, the views and opinions I post here are my own.
Find all posts by this user
Quote this message in a reply
05-19-2021, 12:48 PM
Post: #5
RE: User defined key going to straight to a program
(05-19-2021 05:12 AM)Tim Wessman Wrote:  
(05-18-2021 08:39 PM)matalog Wrote:  There is a very small chance that something useful could ever come of this, but it is there :-).

It was to let a basic user redefine keys into a new location... Smile

But not to redifine a key to a program, it seems a strange choice. I mean, if there was some ambiguity, give the user both.

Maybe it will come in a later update of firmware.
Find all posts by this user
Quote this message in a reply
Post Reply 




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