Remapping function keys for SAP ITSMobile
These instructions describe how to map keys in CETerm so that they will activate actions in the ITSMobile web page. These techniques are only required on a Windows Mobile device because CETerm on Windows CE devices natively supports ITSMobile key actions. However, these techniques may also be useful on a Windows CE device to tailor the behavior for special cases.
In general, function keys in CETerm are mapped to activate CETerm scripts. The CETerm scripts examine the current HTML page and submit the page to the host. The page is examined to determine if a submit is already in progress. Later versions of ITSMobile have a more robust technique for preventing multiple submits.
There are 4 steps to configure the CETerm key mapping:
1. On Windows Mobile OS platform devices, check they option "Disable Windows Action Keys" on the tab
Session -> Configure -> Options -> Configure Keybars and Keys -> Select Keymap
This prevents the Windows Mobile OS shell from intercepting some keys such as F1, F6, and F7.
2. Import the script "CETermITSMobile.txt" into CETerm and mark it "Load at Startup". This can be imported into any available slot, but it may be best to put it in "Script 15" to avoid conflicts with Step 4.
3. Remap function (or other) keys in the "HTML Keymap" of CETerm to run scripts with the Action: "Script xx". Configuration details are under
Session -> Configure -> Options -> Configure Keybars and Keys -> Edit Keymap -> HTML Keymap. Detailed steps on remapping keys to scripts are in this article
4. Enter a small script for each key remapped in Step 3. Go to
Session -> Configure -> Options -> Configure Scripting -> Scripts and remap key as shown in table below.
|Key||Key Action||Script Content|
|F1||Script 1||setFKey( 1 );|
|F2||Script 2||setFKey( 2 );|
|F3||Script 3||setFKey( 3 );|
|F4||Script 4||setFKey( 4 );|
|F5||Script 5||setFKey( 5 );|
|F6||Script 6||setFKey( 6 );|
|F7||Script 7||setFKey( 7 );|
|F8||Script 8||setFKey( 8 );||// see tip 3|
|F9||Script 9||setFKey( 9 );|
|F10||Script 10||setFKey( 10 );|
|F11||Script 11||setFKey( 11 );|
|F12||Script 12||setFKey( 12 );|
5. Hit OK all the way out and test your remapped keys.
1. CETerm is basically simulating the "processKeyEvent()" method found in "mobile.js" or "mobile_menu.js" because under Windows Mobile, some key events are not generated.
2. If you want another key action, look for the behavior in "mobile.js" or "mobile_menu.js" on your SAP server and assign a CETerm key and script with the same behavior.
3. Some users may find that actions in mobile.js and mobile_menu.js are different for the same key. In this case you can have CETerm directly call "processKeyEvent()" to work for multiple ITSMobile applications.
4. The key actions and scripts are listed in order in the table above, but there is no requirement to use these script slots. Any script slot can be used and the key re-mapped to activate the selected slot. For example, F9 could be mapped to Action "Script 23" and Script 23 could contain "setFKey( 9 );".
5. Do *not* mark any of the key action scripts "Load at Startup".
6. Be sure to put all key mappings into the "HTML Keymap".
The best approach is to review the "mobile.js" or "mobile_menu.js" scripts used by the page and select the corresponding actions in the CETermITSMobile.js functions.
In some cases you may need to modify the functions in CETermITSMobile.js to get the desired behavior.