Post Reply 
In a program how do you program the ENTER key
02-19-2019, 10:27 PM
Post: #1
In a program how do you program the ENTER key
I am trying to write a simple program that changes the number of displayed decimal places on the stack to 3 with the minimum amount of user keystrokes but I cannot work out how to program the "ENTER" key so that you don't need to manually press the ENTER key on the calculator to get the program to run to completion.

The program is:-

Export FIX3()
BEGIN
3 ▶ HDigits
END ;

Any assistance would be greatly appreciated.
Find all posts by this user
Quote this message in a reply
02-20-2019, 10:58 AM (This post was last modified: 02-20-2019 11:00 AM by DrD.)
Post: #2
RE: In a program how do you program the ENTER key
Set the format to "Fixed"

Code:

Export FIX3()
BEGIN
  HFormat:=1;
  HDigits:=3;
END ;
Find all posts by this user
Quote this message in a reply
02-20-2019, 08:21 PM
Post: #3
RE: In a program how do you program the ENTER key
This gives the same result as my original program where FIX3 is displayed on the data entry line and you need to press the ENTER key.

I am trying to eliminate not having to press the ENTER key.
Find all posts by this user
Quote this message in a reply
02-21-2019, 01:31 AM
Post: #4
RE: In a program how do you program the ENTER key
How are you running the program? By typing FIX3 on the keyboard and then pressing Enter? If so, you shouldn't have to press Enter a second time (as you seem to imply, but I can't figure out what you mean). Or are you running it from the Program Catalog? Or from the User Variable list? Please tell us exactly what you're doing and exactly what happens when you do it, to help us help you.

<0|ɸ|0>
-Joe-
Visit this user's website Find all posts by this user
Quote this message in a reply
02-21-2019, 05:04 AM
Post: #5
RE: In a program how do you program the ENTER key
I understand that you are calling the FIX3 function from the toolbox and what you want is that when you select it is not inserted as editable text but that it is executed directly.
If so, this will definitely not be possible, since the function of the toolbox is to bring the identifiers on screen in edit mode.

An alternative is to keep the user keyboard active and assign an action for example to the LOG key

Code:
KEY K_Log()
BEGIN
  HFormat:=NOT HFormat;
  HDigits:=3; 
  -1
END;

[Image: giphy.gif]

Viga C | TD | FB
Visit this user's website Find all posts by this user
Quote this message in a reply
02-21-2019, 06:54 AM
Post: #6
RE: In a program how do you program the ENTER key
The key assignment works - thanks.

Can you please explain what the line " -1 " does.


If I put it in a program starting with EXPORT it causes an error, yet when it is in a key assignment it runs and does something ??
Find all posts by this user
Quote this message in a reply
02-21-2019, 07:29 AM
Post: #7
RE: In a program how do you program the ENTER key
The function should work regardless of whether EXPORT is used.

Apparently not documented in the user manual, but published in the release of FW 13333. The user keyboard can return a string in the edit field (return "string"), can also trigger the behavior of another key (return real+), and finally trigger the default behavior or do nothing (return real-)

(01-31-2018 05:24 PM)Tim Wessman Wrote:  
Quote:Date Released: 2018/01/24

Internal Versions
-----------------
Firmware Version: 2018 01 24 (13333)
...
6. User key defines have been repositioned in the key handling process. They now will be done FIRST before anything else
a. Now all keys can be defined except SHIFT button, OFF and USER key.
b. Returning -1 will do NO operation in user key definition.
c. Returning -2 or less will perform default key behavior.
d. Be careful with your key definitions or you may hide some system functionality unintentionally
...

Viga C | TD | FB
Visit this user's website Find all posts by this user
Quote this message in a reply
02-25-2019, 08:29 AM
Post: #8
RE: In a program how do you program the ENTER key
(02-21-2019 07:29 AM)Carlos295pz Wrote:  The function should work regardless of whether EXPORT is used.

Apparently not documented in the user manual, but published in the release of FW 13333. The user keyboard can return a string in the edit field (return "string"), can also trigger the behavior of another key (return real+), and finally trigger the default behavior or do nothing (return real-)

(01-31-2018 05:24 PM)Tim Wessman Wrote:  

EXAMPLEs, please
Find all posts by this user
Quote this message in a reply
Post Reply 




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