Anda di halaman 1dari 6

20/12/2010 https://support.oracle.

com/CSP/main/…

How to Change / Customize the Key Mappings for Webforms? [ID 209671.1]

Modified 11-AUG-2009 Type BULLETIN Status PUBLISHED

PURPOSE
---------------

To explain resource file functionality with regards to Oracle Forms deployed


over the web. For example, how to change / customize, edit key mappings.

SCOPE & APPLICATION


-------------------

Developer Forms 1.6.1 through to 6i / 9i/10.1.x

Customising Resourse Files/ Key Mappings in Forms Deployed Over the Web
=========================================================
How to Specify the Location and Name of the Resource file?
---------------------------------------------------------------------------------------

Oracle Forms deployed over the web by default picks up a resource file called
fmrweb.res located in e.g:

UNIX: $ORACLE_HOME/forms60/admin/resource/US
$ORACLE_HOME/forms90/admin/resource/US

Windows:$ORACLE_HOME\forms60
$ORACLE_HOME\forms90
$ORACLE_HOME\forms

Note: If running with different NLS_LANG settings a different resource file


will be used.

e.g. NLS_LANG=GERMAN_GERMANY=WE8ISO8859P1

fmrwebd.res file will be used.


There is a resource file for each supported language

To override this pass parameter term=fullpath\filename.res to the


Oracle Forms Web Runtime process.

It is possible to pass this parameter in several ways:

a. Directly Within URL

Example:

'http://hostname/dev60cgi/ifcgi60.exe?Form=test.fmx&term=fullpath\filename.res'
'http://hostname/forms90/f90servlet?Form=test.fmx&term=fullpath\filename.res'

b. In formsweb.cfg file

Example of part of formsweb.cfg:


..
Rate this document
otherParams=term=fullpath\filename.res
..
c. In baseXXX.htm file

Example of part of baseconf_resfile1.htm file(modified basejini.htm):

MS Internet Explorer section:


...
<PARAM NAME="serverArgs"
VALUE="module=%form% userid=%userid% term=fullpath\filename.res">

support.oracle.com/CSP/main/article?… 1/6
20/12/2010 https://support.oracle.com/CSP/main/…
....

Netscape section ( after <EMBED SRC...) :


..
serverArgs="module=%form% userid=%userid% term=fullpath\filename.res"
...

Customising the Resource File


---------------------------------------------

The resource file, fmrweb.res is a text file which can edited via a simple editor such
as vi on Unix or Notepad/ Wordpad on MS Windows.

Oracle Terminal editor is NO longer required. The text file contains documentation
and is relatively self explanatory.

Note: the customisation is limited, particularly compared to character mode forms.

An simple example change: Swapping Enter and Execute mappings around:

# JFN : JMN : URKS : FFN : URFD (whitespace ignored)


#
# JFN = Java function number
# JMN = Java modifiers number
# URKS = User-readable key sequence (double-quoted)
# FFN = Forms function number
# URFD = User-readable function description (double-quoted)
#
# JAVA FUNCTION NUMBER
# 33 = PageUp
# 34 = PageDown
# 35 = End
# 36 = Home
# 37 = LeftArrow
# 38 = UpArrow
# 39 = RightArrow
# 40 = DownArrow
# 65 - 90 = Ctrl+A thru Ctrl+Z (These will always have the control
# modifier explicitly included, as well as any other
# modifiers that might be used.)

# 112 - 123 = F1 thru F12


# 9 = Tab (Ctrl+I, without the control modifier)
# 10 = Return (Ctrl+J, without the control modifier)

#
# JAVA MODIFIERS NUMBER
# Equal to the sum of the values for the modifier keys:
# 0 = None
# 1 = Shift
# 2 = Control
# 4 = Meta
# 8 = Alt
#
# FORMS FUNCTION NUMBER
# The Forms function numbers match the function numbers found in a
# typical Forms key binding file.
#
# USER-READABLE STRINGS
# The double-quoted strings appear when users click [Show Keys], and
# are used for this purpose only. These strings can be translated as
# needed. Note that the strings do not affect what actually happens
# when end users press a particular key sequence.
#
..
122 : 0 : "F11" : 76 : "Enter Query"
122 : 2 : "Ctrl+F11" : 77 : "Execute Query"

Change to:

support.oracle.com/CSP/main/article?… 2/6
20/12/2010 https://support.oracle.com/CSP/main/…
122 : 2 : "Ctrl+F11" : 76 : "Enter Query"
122 : 0 : "F11" : 77 : "Execute Query"

Note: By default fmrweb.res does NOT reflect the MS Windows client-server keyboard
mappings. Rather it reflects the key mapping if running client-server on Unix X-Windows/ Motif.

A file called fmrpcweb.res has also been provided which does give the MS Windows
client-server keyboard mappings. To use this file, rename fmrweb.res e.g to fmrweb_orig.res,
and copy fmrpcweb.res to fmrweb.res. Alternatively use the term parameter as described above.

Exceptions/ Special Key Mappings


--------------------------------------------------

A: Mapping F2

Change the default entry for F2, "List Tab Pages", to another key.

Here is an example of the default entry:


113: 0 : "F2" : 95 : "List Tab Pages"

This must be explicitly changed to another key mapping such as the following:
113: 8 : "F2" : 95 : "List Tab Pages"

To map the F2 function to the F2 key, comment out the lines that
begin with "113 : 0" and "113 : 8" with a # symbol and add the following lines
to the bottom of the resource file.

113: 0 : "F2" : 84 : "Function 2"


113: 8 : " " : 95 : " "

Explanation:

A new function has been added which uses F2 by default It is necessary to explicitly
map this new function to something else in order to map the F2 key." This function
was added to allow for keyboard navigation between the tab canvas pages and it
defaults to F2. Even if it is commented out and not assigned to F2, the F2 key
cannot be mapped unless this function, Forms Function Number 95, is mapped to
another key.

B: Mapping for ENTER to fire KEY-ENTER-TRIGGER over the Web

By default, whether deploying client-server or over the web pressing


the ENTER key takes the cursor to the next navigable item in the block.
To override this default behaviour it is necessary to modify the forms
resource file to revise the key mapping details.

Modify FMRWEB.RES and change the Forms Function Number (FFN) from
27 to 75 for the Return Key. The line should be changed to the
following:

10 : 0 : "Return" : 75 : "Return"

By default, the line is displayed with an FFN of 27 and looks as


follows:

10 : 0 : "Return" : 27 : "Return"

This line should NOT fire the Key-Enter trigger since the Return
or Enter key is actually returning the Return function represented
by the FFN of 27. The FFN of 75 represents the Enter function and
will fire the Key-Enter trigger.

C: Number Keys

The objective is to map CTRL+<number> keys in fmrweb.res for numbers 0 to 9


and there are no Java Function keys mentioned for the numbers in fmrweb.res .

support.oracle.com/CSP/main/article?… 3/6
20/12/2010 https://support.oracle.com/CSP/main/…
The steps to be performed along with an example
that shows the steps needed to map CTRL+1 to 'Next Record'

(1) lists the java function key numbers that


could be implemented in fmrweb.res file for the Key Mapping.
For example,
public static final int VK_1 = 0x31;

(2) The hexadecimal values have to be converted to their decimal


equivalents before their use in fmrweb.res .

In step (1), 0x31 is a hexadecimal value that has to be converted


to its decimal equivalent. (Note:1019580.6)

e.g.
SQL> select hextodec('31') from dual;

HEXTODEC('31')
--------------
49

(3) Use this decimal value for mapping the number key 1 in fmrweb.res
For example, CTRL+1 can be mapped to 'Next Record' as
49 : 2 : "CTRL+1" : 67 : "Next Record"

D: Mapping for Esc Key to exit out of a Web Form

Make a backup copy of fmrweb.res


Open the fmrweb.res file present in the path <ORACLE_HOME>/FORMSNN
and add the following entry in it

27 : 0 : "Esc" : 32 : "Exit"

Ensure that you comment or delete the old entry

#115 : 0 : "F4" : 32 : "Exit"

The first number (115) might differe on different versions or platforms.

When you run the Web Form and press the Esc key, then
the Form will exit.

Java Function Number Values


===========================
To get the Forms Function number, go into Oracle Terminal and look up
the number in the mappings section for the function you want. For the
Java Function number, use the above given values. For any values that
you cannot find, refer to the following of values that can be converted
from Hexadecimal to Decimal or use the Decimal values :

Decimal Value
public static final int VK_ENTER = '\n';
public static final int VK_BACK_SPACE = '\b';
public static final int VK_TAB = '\t';
public static final int VK_CANCEL = 0x03; 3
public static final int VK_CLEAR = 0x0C; 12
public static final int VK_SHIFT = 0x10; 16
public static final int VK_CONTROL = 0x11; 17
public static final int VK_ALT = 0x12; 18
public static final int VK_PAUSE = 0x13; 19
public static final int VK_CAPS_LOCK = 0x14; 20
public static final int VK_ESCAPE = 0x1B; 27
public static final int VK_SPACE = 0x20; 32
public static final int VK_PAGE_UP = 0x21; 33
public static final int VK_PAGE_DOWN = 0x22; 34
public static final int VK_END = 0x23; 35
support.oracle.com/CSP/main/article?… 4/6
20/12/2010 https://support.oracle.com/CSP/main/…
public static final int VK_HOME = 0x24; 36
public static final int VK_LEFT = 0x25; 37
public static final int VK_UP = 0x26; 38
public static final int VK_RIGHT = 0x27; 39
public static final int VK_DOWN = 0x28; 40
public static final int VK_COMMA = 0x2C; 44
public static final int VK_PERIOD = 0x2E; 46
public static final int VK_SLASH = 0x2F; 47

/** VK_0 thru VK_9 are the same as ASCII '0' thru '9' (0x30 - 0x39) */
public static final int VK_0 = 0x30; 48
public static final int VK_1 = 0x31; 49
public static final int VK_2 = 0x32; 50
public static final int VK_3 = 0x33; 51
public static final int VK_4 = 0x34; 52
public static final int VK_5 = 0x35; 53
public static final int VK_6 = 0x36; 54
public static final int VK_7 = 0x37; 55
public static final int VK_8 = 0x38; 56
public static final int VK_9 = 0x39; 57
public static final int VK_SEMICOLON = 0x3B; 59
public static final int VK_EQUALS = 0x3D; 61

/** VK_A thru VK_Z are the same as ASCII 'A' thru 'Z' (0x41 - 0x5A) */
public static final int VK_A = 0x41; 65
public static final int VK_B = 0x42; 66
public static final int VK_C = 0x43; 67
public static final int VK_D = 0x44; 68
public static final int VK_E = 0x45; 69
public static final int VK_F = 0x46; 70
public static final int VK_G = 0x47; 71
public static final int VK_H = 0x48; 72
public static final int VK_I = 0x49; 73
public static final int VK_J = 0x4A; 74
public static final int VK_K = 0x4B; 75
public static final int VK_L = 0x4C; 76
public static final int VK_M = 0x4D; 77
public static final int VK_N = 0x4E; 78
public static final int VK_O = 0x4F; 79
public static final int VK_P = 0x50; 80
public static final int VK_Q = 0x51; 81
public static final int VK_R = 0x52; 82
public static final int VK_S = 0x53; 83
public static final int VK_T = 0x54; 84
public static final int VK_U = 0x55; 85
public static final int VK_V = 0x56; 86
public static final int VK_W = 0x57; 87
public static final int VK_X = 0x58; 88
public static final int VK_Y = 0x59; 89
public static final int VK_Z = 0x5A; 90
public static final int VK_OPEN_BRACKET = 0x5B; 91
public static final int VK_BACK_SLASH = 0x5C; 92
public static final int VK_CLOSE_BRACKET = 0x5D; 93
public static final int VK_NUMPAD0 = 0x60; 96
public static final int VK_NUMPAD1 = 0x61; 97
public static final int VK_NUMPAD2 = 0x62; 98
public static final int VK_NUMPAD3 = 0x63; 99
public static final int VK_NUMPAD4 = 0x64; 100
public static final int VK_NUMPAD5 = 0x65; 101
public static final int VK_NUMPAD6 = 0x66; 102
public static final int VK_NUMPAD7 = 0x67; 103
public static final int VK_NUMPAD8 = 0x68; 104
public static final int VK_NUMPAD9 = 0x69; 105
public static final int VK_MULTIPLY = 0x6A; 106
public static final int VK_ADD = 0x6B; 107
public static final int VK_SEPARATER = 0x6C; 108
public static final int VK_SUBTRACT = 0x6D; 109
public static final int VK_DECIMAL = 0x6E; 110
public static final int VK_DIVIDE = 0x6F; 111
public static final int VK_F1 = 0x70; 112
support.oracle.com/CSP/main/article?… 5/6
20/12/2010 https://support.oracle.com/CSP/main/…
public static final int VK_F2 = 0x71; 113
public static final int VK_F3 = 0x72; 114
public static final int VK_F4 = 0x73; 115
public static final int VK_F5 = 0x74; 116
public static final int VK_F6 = 0x75; 117
public static final int VK_F7 = 0x76; 118
public static final int VK_F8 = 0x77; 119
public static final int VK_F9 = 0x78; 120
public static final int VK_F10 = 0x79; 121
public static final int VK_F11 = 0x7A; 122
public static final int VK_F12 = 0x7B; 123
public static final int VK_DELETE = 0x7F; 127 /* ASCII DEL */
public static final int VK_NUM_LOCK = 0x90; 144
public static final int VK_SCROLL_LOCK = 0x91; 145
public static final int VK_PRINTSCREEN = 0x9A; 154
public static final int VK_INSERT = 0x9B; 155
public static final int VK_HELP = 0x9C; 156
public static final int VK_META = 0x9D; 157
public static final int VK_BACK_QUOTE = 0xC0; 192
public static final int VK_QUOTE = 0xDE; 222

Keywords
========
6i 9i forms9i forms6i migration migrate upgrade oraterm terminal
formsweb.cfg mapping key custom customise 6.0.8 9.0.2 resource map
web webforms forms PC keyboard match 10.1.2

Related

Products

Middleware > Developer Tools > Database & PLSQL > Oracle Forms

Keywords

ORATERM

Back to top

support.oracle.com/CSP/main/article?… 6/6

Anda mungkin juga menyukai