Home » Developer & Programmer » Forms » Mapping Functional Keys in Forms 6i
Mapping Functional Keys in Forms 6i [message #84973] Sun, 16 May 2004 20:54 Go to next message
Rahul Desai
Messages: 26
Registered: March 2002
Junior Member
Hi All,

How do you map functional keys in forms 6i. For instance, if i press key F3 then it should print the screen.

I found out that, FMRPCWEB.RES or FMRWEB.RES files has to be modified as required in order to use keys as hotkeys in an application. But i couldnot find these files at my end should i search in the server?

Im using forms 6i in windows 2000 machine.

I found fmrusw.res file which has some key functions like scroll up..scroll down etc...mentioned . can i modify this? if yes how will i do this. i am not used to this ASCII formatted file.

Waiting for reply.
Thanks

Rahul
Re: Mapping Functional Keys in Forms 6i [message #84976 is a reply to message #84973] Sun, 16 May 2004 22:31 Go to previous messageGo to next message
Himanshu
Messages: 457
Registered: December 2001
Senior Member
Hi,
FMRPCWEB.RES or FMRWEB.RES are meant to modify Access key of Forms running on the BWE while fmrusw.res is meant for Client-Server version.

Make use of Oracle Terminal to open and Modify this file as per your Requirement.

Regards
Himanshu
Re: Mapping Functional Keys in Forms 6i [message #84979 is a reply to message #84976] Mon, 17 May 2004 04:17 Go to previous messageGo to next message
Rahul Desai
Messages: 26
Registered: March 2002
Junior Member
Hi
Thanks for your suggestion. I opened the terminal and assigned user Defined key 1 with function key F2. but when i open runtime it is showing Undefined key even though the key function is shown in Show keys(ctrl+F1).

What should i do?
Thanks

Rahul
Re: Mapping Functional Keys in Forms 6i [message #84981 is a reply to message #84979] Mon, 17 May 2004 06:00 Go to previous messageGo to next message
Himanshu
Messages: 457
Registered: December 2001
Senior Member
Hi,
I am psoting some Information which will help you to correctly map your Keys.
I hope you have added Key-F2 Trigger in your Form and alos chnaged the Key-Others trigger?

Regards
Himanshu

KEY MAPPINGS
Key mappings are implemented hierarchically.
Open the Oracle Forms resource file "FMRPC.RES" in Oracle Terminal, click on the "key bindings" icon (the first one), and look at the diagram in the window this creates.
You should see a diagram with one circle on the left, many circles on the right, some more circles in between, and lines connecting them like a tree. The "root" of the tree, on the left-hand side, represents the most general abstract "class" that Oracle Forms uses.
This is called "windows-sqlforms" Double-click on the circle there, and a window will appear listing some actions and the keys that are bound to them; these are the "universal" key bindings that apply whenever you are running Oracle Forms, either the designer or the runtime, no matter where you are in a forms application. Close that key bindings list, and look at the key bindings lists for "runform" and "designer".
You'll see that they have no key bindings defined on themselves; this means that they inherit all of their bindings from the "windows-sqlforms" level. This means that whenever you're in the designer, some keys will have the same functions as they do when you're in the runtime. Double-click on the circle above "listvalues" on the "runform" part of the tree. The information there tells you that when you are looking at a list- of-values in Oracle Forms Runtime, some additional keys are available for additional functions. These keys are available only when you're in a list- of-values; when you leave the list, they do not have those functions any more. If you want to change the key bindings at any level, click on a circle and press "Edit Key Bindings".
If you are looking at a list-of-values in Runform and you press a key, then Oracle Forms will look for that key's binding at the "listvalues" level of its resource file; and if it can't find the binding there it will search up through the tree for the binding until it reaches the top. If it cannot find it there then Forms will give you an "invalid function key" error. Here is an example showing how to add a key mapping to Oracle Forms, so the F3 function key on your keyboard will do an EXIT (just like Control-Q already does):
1) If you have the Forms Designer, Generator, or Runtime running right now, then quit out of them, or else Oracle Terminal will not be able to open the Forms resource file.
2) We will be editing the FMRPC.RES file, so make a backup copy of it before we begin. (You could just edit that file and save your changes as a new .RES file, except that there is a bug in Forms 4.0.12 that prevents it from using any terminal file other than FMRPC.RES.) This file is in ORAWINFORMS40.
3) Start up Oracle Terminal by double-clicking on its icon, or running "OT.EXE" from the "File Run" menu selection. When it asks you to open a file, navigate to ORAWINFORMS40 and choose "FMRPC.RES".
4) Open the key binding editor by either clicking on the "K key" icon, picking the "Functions Edit keys" menu selection, or pressing Control-M.
5) Double-click on the circle above "windows-sqlforms (at the left edge of the window), or click once on it and press "Edit Key Bindings". This brings up a window showing you the keys that are universally mapped across all of the Oracle Forms tools (since you are showing the key mappings list for the highest level of the hierarchy).
6) Click on the "Insert Row" button. This adds another line for you to put a new key binding on. 7) Enter the word "Exit" on your new row in the Action column (you must type it with a capital "E" and lower-case "xit"), and enter "F3" in the "Binding" column.
8) Click "OK" to return to the key binding editor.
9) Make sure that the F3 key is not mapped to something else lower in the hierarchy, by double-clicking on each of the circles to the right of "windows-sqlforms" and making sure that F3 is not shown in the list of key bindings. If you do find it in the key bindings for another level, then delete it with the "Delete Row" button.
10) Click "OK" to dismiss the key binding editor when you are finished with it.

Now that you've added a new key binding, you need to generate and save it before you can use it:
1) Click on the "generate" button (the meat grinder, the rightmost icon), pick the "Functions Generate" menu selection, or press Control-G. If it asks you if you want to save your changes before you generate, then choose "yes". After it generates, it should display a dialog box telling you that the generate completed successfully.
2) Save your changes by picking the "File Save" menu selection, and exit Oracle Terminal by picking "File Exit". Note: Both of the save actions mentioned above (before the generate and after the generate) are necessary; the first action saves the structire changes which are necessary to perform the generate successfully, and the second save saves the fully generated, complete file. Now try starting up Forms Runtime, and pressing F3 to see if it successfully exits the application. F3 should also appear when you tell Forms to "Show Keys". You can map many keystrokes all to the same action, but you cannot map one specific keystroke to more than one action.

PRODUCT ACTIONS
You can only bind a keypress to an action that's available at a given level of Oracle Forms. Sometimes you will want to define a key for an action that does not already exist at that level, so you will have to add the action. A list at the end of this bulletin shows many of the actions that Oracle Forms recognizes and can respond to. You can add these actions to any level of the Oracle Forms tools and bind keys to them to make them useable. Here is an example of how to define the "User Defined Key 2" action in Oracle Forms Runtime, and bind it to the F2 key:
1) Close any Oracle Forms tools (Designer, Generate, Runtime) that you might have running, so you can modify their resource file without getting any "file already open" errors.
2) You will be editing ORAWINFORMS40FMRPC.RES, so make a backup copy of it for safekeeping.
3) Run Oracle Terminal, and open FMRPC.RES.
4) Go into the key binding editor, and click on the "Product Actions" button. This brings up the Product Actions Editor, which looks like the Key Bindings Editor.
5) Double-click on the circle above the word "runform". This brings you to the Product Action definition screen.
6) Insert a new row by clicking on the "Insert Row" button.
7) Put the phrase "User Defined Key 2" in the Action column, and put 84 in the Code column.
8) Click "OK" to dismiss the Product Action dialog, then click "OK" in the Product Action Editor to dismiss it too.
Now you have made that action available for the level you are editing. All that remains is to bind a key to it, to make it useful.

Here's a summary of the instructions given above for how to add a key binding:
1) In the Key Binding Editor, double-click on the "runform" circle.
2) Press the "Insert Row" button, and define a new binding with action "User Defined Key 2" and binding "F2". Click "OK" to close the Key Binding Definition window.
3) Make sure that the "F2" key is not bound at any other level below "runform" by checking the Key Binding Definition entries for all circles connected to "runform" to the right of it.
4) Press the "OK" button to dismiss the Key Binding Editor, and generate the new key bindings by clicking on the Generate icon in the FMRPC.RES window. Save your new bindings by selecting "Save" from the File menu.
5) Exit Oracle Terminal, and test this new action by putting a KEY-F2 trigger in a form and using Runform to make sure that it works.

Regards
Himanshu
Re: Mapping Functional Keys in Forms 6i [message #85102 is a reply to message #84981] Wed, 02 June 2004 00:34 Go to previous messageGo to next message
name
Messages: 6
Registered: June 2004
Junior Member
how to start oracle terminal
i am not found ot.exe file in my system

i am using oracle 8i and win'2000 os

regards
chandu
Re: Mapping Functional Keys in Forms 6i [message #85139 is a reply to message #84981] Fri, 04 June 2004 04:21 Go to previous messageGo to next message
name
Messages: 6
Registered: June 2004
Junior Member
how to get ot.exe file i have forms6i but i am not having ot.exe file in my system

chandu
Re: Mapping Functional Keys in Forms 6i [message #119818 is a reply to message #84973] Mon, 16 May 2005 03:04 Go to previous messageGo to next message
Sabeen
Messages: 25
Registered: March 2005
Location: Pakistan
Junior Member
how to open oracle temrinal. i mean i m unable to understand what do u meant by oracle terminal.
Re: Mapping Functional Keys in Forms 6i [message #120384 is a reply to message #119818] Thu, 19 May 2005 07:26 Go to previous messageGo to next message
fahedakhter
Messages: 39
Registered: March 2005
Location: Pakistan
Member

Oracle Terminal is a oracle tool which cannot be install during typical installation for oracle developer.If you not have install it by oracle developer cd.This tool help to map the functions key.For example on run time you want to exit when press ESCAPE key this work is possible through oracle terminal.We could restrict keys also same as Visual basic KEYPRESS trigger.Follow the steps of Himanshu if any problem told me I send you brief information.
Re: Mapping Functional Keys in Forms 6i [message #120523 is a reply to message #120384] Fri, 20 May 2005 05:50 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
You can also hard-code your function keys in your form. There are key-f0 through key-f9, but only for those keys that are not programmed.

For those that are defined for another purpose which you can find by pressing ctrl-K or Ctrl-F1 or calling the show_keys command, just over-ride that purpose with your own code.

David
Mapping Functional Keys in Forms 6i [message #292486 is a reply to message #84981] Wed, 09 January 2008 01:10 Go to previous messageGo to next message
Qaiser.Bashir
Messages: 32
Registered: July 2007
Location: Rawalpindi
Member

Dear Himanshu

Thank you very much bcz your Key Mapping information is to clear ...but i am facing the problem that i am unable to find the "FMRPC.RES" file on my personnel Computer....i have installed 10g on my personnel computer...and not find any file named as "FMRPC.RES" only the simillar files i found is "FMRPCWEB.RES" and "FMRPCweb_UTF8.RES" , "FMRUSW.RES" ,"FMRWEB.RES"
plz tell me which file i have to used to mape the key...
Re: Mapping Functional Keys in Forms 6i [message #292775 is a reply to message #292486] Wed, 09 January 2008 19:12 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
I have five 'fmr*.res' files on my PC in "C:\DevSuiteHome_1\forms". They are: fmrpcweb.res, fmrpcweb_utf8.res, fmrusw.res, fmrweb.res, and fmrweb_utf8.res.

The files fmrpcweb.res and fmrpcweb_utf8.res are identical.

The files fmrweb.res and fmrweb_utf8.res are identical.

The file fmrusw.res is not a 'text' file that looks 'open' to the edited.

I compared fmrpcweb.res and fmrweb.res and they have differences but I am currently not in a position to test these differences. I will have to leave it up to you for the moment.

I suggest you select a single line to be compared in the key help pop-up, for example, line 72 which contains:
in fmrpcweb.res
114 : 0 : "F3" : 73 : "Duplicate Item"
and
in fmrweb.res
116 : 1 : "Shift+F5" : 73 : "Duplicate Field"
and see whether your session displays 'Duplicate Item' or 'Duplicate Field'.

Then select a single line to be tested, for example, line 74 which contains:
in fmrpcweb.res
118 : 0 : "F7" : 76 : "Enter Query"
and
in fmrweb.res
122 : 0 : "F11" : 76 : "Enter Query"
and see which function key is used for 'Enter Query' and the behaviour you can invoke by changing the numbers.

You will probably have to restart either the browser or OC4J session or both each time you change something.

David
Re: Mapping Functional Keys in Forms 6i [message #389559 is a reply to message #292775] Mon, 02 March 2009 11:47 Go to previous messageGo to next message
oikhleif
Messages: 4
Registered: January 2007
Location: Benghazi
Junior Member
How do you map Keypad(-) as Exit Form and Keypad(+) as Commit form.

I ahve have tried different way but it didn't work for me.

Thak you
Re: Mapping Functional Keys in Forms 6i [message #436226 is a reply to message #292775] Tue, 22 December 2009 04:03 Go to previous messageGo to next message
shekhar.salunkhe
Messages: 154
Registered: January 2008
Location: Pune
Senior Member
Is it possible to catch which key is pressed on form level trigger?
If it is please tell me
Thanks
Re: Mapping Functional Keys in Forms 6i [message #437738 is a reply to message #436226] Tue, 05 January 2010 22:03 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Did http://www.orafaq.com/forum/mv/msg/153376/437122/67467/#msg_437122 solve your problem?

David
Previous Topic: Call forms on Short Keys
Next Topic: how to call a web service from forms6i
Goto Forum:
  


Current Time: Tue Jul 02 17:38:25 CDT 2024