Hello,
I want to know the best solution to manage in Visual Designer an F4 on an input area ...
Thank you in advance.
F4 on an input area ..
-
- Profound User
- Posts: 20
- Joined: Mon Feb 04, 2019 10:56 am
- First Name: stephane
- Last Name: villeminot
- Company Name: alcyon france
- Country: France
- Contact:
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: F4 on an input area ..
You can define F4 under the 'shortcut key' property of a button. Then, pressing F4 on the keyboard will have the same effect as clicking the button.
-
- Profound User
- Posts: 20
- Joined: Mon Feb 04, 2019 10:56 am
- First Name: stephane
- Last Name: villeminot
- Company Name: alcyon france
- Country: France
- Contact:
Re: F4 on an input area ..
In fact it's not on a button but on an input area that I have to do the f4
I try to put a button to simulate the f4 on my area via
Edit Onclick Event:
changeElementValue(XWFLDN,'FMCUNO');
pressKey("F4");
)..
but it works moderately it's ok if I click on it directly but if I click on another area of my screen and then I click on it then the f4 does it but not on the right zone
in debug I realize that after my click my zone XWFLDN does not contain 'FMCUNO' but the name of another zone screen ....
I hope I am clear in my explanations!!
I try to put a button to simulate the f4 on my area via
Edit Onclick Event:
changeElementValue(XWFLDN,'FMCUNO');
pressKey("F4");
)..
but it works moderately it's ok if I click on it directly but if I click on another area of my screen and then I click on it then the f4 does it but not on the right zone
in debug I realize that after my click my zone XWFLDN does not contain 'FMCUNO' but the name of another zone screen ....
I hope I am clear in my explanations!!
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: F4 on an input area ..
Ah, I see... so you don't want it to work like a green-screen (where the F4 applies to the entire screen) but instead you want to write separate code for each widget's F4 key?
To do that, write JavaScript code that runs in the widget's "onkeydown" (when the key is pushed down) or "onkeyup" (when it is released).
For example, in the onkeydown event of a textbox, code the following:
When the user presses F4 in that textbox, it will pop up an alert saying "F4 pressed". Replace that "alert" code with whatever code you wish to perform when the F4 key is pressed. This will only run in the widget you define it under (and will not affect other widgets.)
To do that, write JavaScript code that runs in the widget's "onkeydown" (when the key is pushed down) or "onkeyup" (when it is released).
For example, in the onkeydown event of a textbox, code the following:
Code: Select all
function myFunc(event) {
if (event.keyCode===115 && !event.shiftKey) {
alert("F4 pressed");
preventEvent(event);
}
}
myFunc
-
- Profound User
- Posts: 20
- Joined: Mon Feb 04, 2019 10:56 am
- First Name: stephane
- Last Name: villeminot
- Company Name: alcyon france
- Country: France
- Contact:
Re: F4 on an input area ..
thank you !!
Who is online
Users browsing this forum: No registered users and 0 guests