Bonjour,
Quel trigger dois-je utiliser pour détecter l'activation de la touche ENTER.
Je veux effectuer un traitement si l'utilisateur presse cette touche.
J'ai utilisé KEY-ENTER mais ça n'a pas été concluant.
Merci d'avance
Bonjour,
Quel trigger dois-je utiliser pour détecter l'activation de la touche ENTER.
Je veux effectuer un traitement si l'utilisateur presse cette touche.
J'ai utilisé KEY-ENTER mais ça n'a pas été concluant.
Merci d'avance
Une idée serait de créer un bouton qui serait le bouton par defaut, et lorsque le user presse la touche enter, le trigger attaché au bouton when-button-pressed est exécuté en réponse.
J'ai pas testé, mais bon, ça devrait le faire.
.
Voila une note metalink (1071521.6) qui devrait répondre à ta question, à moins que Oracle Terminal ne soit pas installé chez toi :
PURPOSE
=======
To explain how to map the ENTER key on the keyboard to trigger
user-defined triggers/actions within the Forms.
SCOPE
=====
Novice to intermediate skills
Developers and application deployers
This article is specific to Oracle Terminal on Windows Platforms.
How to Fire the Key-Enter Trigger for Forms Deployed Client-Server (Windows)?
=============================================================================
By default, pressing the ENTER key takes the cursor to the next navigable item
in the block. To override this default it is necessary to edit the forms
resource file containing the key mapping details.
Thus the following instructions illustrate how to use the Oracle Terminal
utility supplied with Oracle Developer (IDS) to enable the KEY-ENTER trigger
to be invoked when an end user presses enter or return on the keyboard.
1) Close all Developer Applications.
2) Assuming it has been installed from the base Developer 6i R2 media,
Invoke Oracle Terminal
(From Start-->Programs-->Oracle Forms and Reports 6i--> Oracle Terminal).
3) Edit the file oracle_home/forms60/fmrusw.res.
4) Go into Key Mapping Binder.
5) Click on the Product Actions.
6) Double click the circle above the Runform.
7) Insert a new row by clicking Insert Row.
8) Put the word ENTER in the Action, 75 for Code, and enter a
Description.
Failure to enter a description may result in crash i.e Dr Watson/ Access
Violation / General Protection Fault
Reference:
Bug 620586 Abstract: DR WATSON GENERATING ORACLE TERMINAL RESOURSE FILE
9) Click OK, OK.
10) Go to NORMAL under Runform, and remove any existing key bindings
for RETURN.
11) Insert a new row with Action as ENTER and Binding as Return.
12) Click OK, OK.
13) Generate and Save.
14) Create a simple form with one non-db block and one text item.
15) Create a KEY-ENTER Trigger at the Item Level under the Text item
and keep message('yes').
16) Run the form, navigate to text item, and press the ENTER keys;
the message appears.
Known Problems
===============
You followed instructions in Oracle Terminal tutorial bulletin for mapping
the "Enter" action so that he could use a key-enter trigger in his form.
However, the key-enter trigger is still not working.
Solution:
After adding the "Enter" action with code 75 in Product Actions, you need to
edit key bindings to delete the binding of Return to Return, and add the binding
of Enter to Return (see BUL#105688.021 for instructions).
If you add the "Enter to Return" key binding at the top of the list, it will
not work. It needs to be added in approximately the same place where the
"Return to Return" key binding was located.
To easily accomplish this, click on the "Return to Return" key mapping and
press the "Delete Row" button. Then immediately press the "Insert Row" button
to add the mapping of "Enter" to "Return"
Generate the key bindings, save the file, and run the form where a key-enter
trigger is defined, using the resource file just created.
Partager