Function Keys Mapper



The keys can be set to be pressed at the same time or one after another in a sequence. Keys can be remapped when they are short pressed, long pressed or double pressed. A keymap can have a set of. How to configure the Function (Fn) keys to not require use of the Fn key in Windows 8.1, Windows 10. Mapping Proprietary Function Keycodes. The function keys of certain Zebra devices running Windows Mobile, including the WorkAbout Pro 4 and Omnii XT15 (with Windows Embedded Handheld 6.5), return a proprietary set of Unicode values via Windows character messages rather than the values expected from Windows keydown/keyup messages. Python – Mapping key values to Dictionary Last Updated: 22 Apr, 2020 Sometimes, while working with Python records, we can have a problem in which we need to extract key’s value as the dictionary values required.

Disable or Reassign / Remap Function (fn) Key on Your Keyboard
Have any of those Computer or PC with the Function (fn) key on Your Keyboard. This tutorial will assist you to disable the key or remap the key to another key like the Windows Keys.
The Function (fn) key is usually found on all laptops, it assist one to quickly navigate to System Functions available on the Numerical keys.
To do this, we need a tool known as SharpKeys, Click on this link to Download SharpKeys (Note: Install as System Administrator and always run it as System Administrator)

Disable Function (fn) Key on Keyboard

1) After Downloading SharpKeys, Install SharpKeys on Your Computer.


2) After the installation, Launch SharpKeys, it will come with a warning of writing a key to the registry, Click on OK.
3) The SharpKeys Window will open
4) Below, Click on Add (Where Orange box is).
5) Select the Function (fn) Key (From Map this Key Table) and To this Key, You Select Turn Key Off (00_00) ino rder to disable the key, this Click ok OR Click on Type Key and Press the Function (fn) Key For Map from this Table and then select Turn Key Off (00_00) inorder to disable the key, then Click on Ok
6)Then Below on the right hand corner, Click on Write to Registry (Where the Orange Box is)

Remap Function (fn) Key on Keyboard

1) After Downloading SharpKeys, Install SharpKeys on Your Computer.
2) After the installation, Launch SharpKeys, it will come with a warning of writing a key to the registry, Click on OK.
3) The SharpKeys Window will open
4) Below, Click on Add (Where Orange box is).
5) Select the Function (fn) Key (From Map this Key Table) and To this Key, You Select the key you want to remap it to on the list, and then Click on OK OR Click on Type Key and Press the Function (fn) Key For Map from this Table and then Click on Type Key and Press the Key you want to Use the Function (fn) Key for, then Click on Ok
6)Then Below on the right hand corner, Click on Write to Registry (Where the Orange Box is).
Hope with this, you have learnt How to Disable or Remap Function (fn) Key on Your Keyboard.
Please share and like below, also comment below for any problem encountered.

Related Posts:

Overview

Keycodes are constants that uniquely identify the ASCII values of device keypresses (hard or soft). Android apps made with Enterprise Browser 1.4 and higher permit Android keycode values to be assigned from a file when an Enterprise Browser app starts up. Note: The keycodes for keys with multiple values accessed with the shift or other modifier key (such as upper and lower case) might not be capturable. See the KeyCapture API remarks for more information.

Note: EB 2.0 (and higher) also supports page-based actions, which can execute JavaScript code and/or predefined commands based on the contents of a page. See the Page-based Actions guide for more information.

Support Notes

  • These keys CANNOT be remapped to any other action:
    • HOME key
    • RECENT APPS key
    • Brightness key(s)
    • Backlight on/off key
  • The WorkAbout Pro 4 and Omnii XT15 are among a small group of Zebra devices running Windows Mobile that return proprietary keycode values inconsistent with those of other devices and incompatible with Windows. To address this issue, apps made with Enterprise Browser 1.5 or higher can remap those proprietary keycodes to Microsoft standard codes. See the Mapping Proprietary Function Keycodes section below.

Android Keycode Handling

On Android devices, the keycode values of certain keys are sometimes not returned as expected or desired. To ensure control and accuracy of key presses, the desired keycode value(s) can be assigned through the current KeyCapture 4.x API as well as legacy 2.x versions. The steps in this guide apply to all API versions.

The following facts apply generally to Android keycode mapping for Enterprise Browser:

  • Keycode mapping requires Enterprise Browser 1.4 or higher.
  • Mapping requires a KeyCapture API. Read more.
  • Keycode mappings are contained in the keycodemapping.xml file.
  • The keycodemapping.xml file is the same for all versions of the KeyCapture API.
  • The mapping file is read each time Enterprise Browser is launched.
  • Upon app install, a mapping-file template is placed in the EB installation directory, usually sdcard0/android/data/com.symbol.enterprisebrowser.
  • Keycodes not mapped (or left blank in the mapping file) retain their default values.
  • Additional restrictions apply to keycapture and keycode mapping.
  • The keycodemapping.xml file must not be empty nor contain data not formatted according to the guidelines described in this guide.

File Location

The location of the keycodemapping.xml file on the device can be specified in the <keycodemappingxmlfile> tag of the app's Config.xml file using a fully qualified path (or substitution variable) and file name. This allows separate folders to be created for storing key mappings for different apps. If no path is specified, EB's default installation folder is used as the path:

Function keys mapper tutorial
  • file://%INSTALLDIR%/keycodemapping.xml

See the Config.xml reference for more information.

Function Keys Mapper

Mapping Android Keycodes

To assign custom keycodes to Android hard or soft keys, follow these simple steps:

1. Deploy Enterprise Browser to the device.

2. Navigate to the installation directory on the device. This is usually the sdcard0/android/data/com.symbol.enterprisebrowser directory.

Function Keys Mapper

3. Copy the keycodemapping.xml template to a PC and open it for editing.

The template should look similar to the image below:

4. Copy and paste the example KEYCODE tag (omitting the comment tags) as shown:

5. Replace the values (within the quotes) for 'name,' 'from' and 'to' fields, as required.

Note: The 'from' field refers to the key's current keycode value; the 'to' will hold the value that replaces it. In the example above, pressing the '0' key (after mapping) will generate a keycode value of '0x30' instead of its former value of '7.' The 'name' field can hold any value; standard Android key names are recommended.

For help exposing the keycodes, see the Handling Incorrect Keycodes section below.

6. Repeat steps 4 and 5 until all required keycodes are mapped.

For example:

7. Copy the modified keycodemapping.xml file to its original location on the device, replacing the template.

8. Relaunch the Enterprise Browser app and check that its keycodes are mapped as specified.

Mapping Hardware Keys

The hardware keys of Zebra devices can be remapped to perform predefined actions or execute JavaScript code blocks residing on the device or on a server. This feature can be useful for many scenarios:

  • Zoom in and out of app page(s)
  • Show/hide custom buttons or keyboard layouts
  • Show/hide the address bar
  • Quit the EB app and return to the OS
  • Quit the app and return to a login page
  • Reboot the device
  • Enter special character(s) not available on the selected keyboard
  • Enter foreign-language characters not available on the selected keyboard
  • Activate DataWedge and/or the scanner beam
  • Clear cookies and/or the application cache
  • Enable voice input

Predefined Commands

The remapping feature for hardware keys supports only the predefined actions and mapping commands shown below.

Action Commands

Function Keys Mapper

  • back - Navigates to the previous page in the EB app's history.
  • forward - Navigates forward one page in the EB app's history.
  • quit - Exits the EB app, executing any exit commands or actions defined in the Config.xml file.
  • refresh - Reloads the current page.

Mapping Commands

  • key-[KeyEvent] - Sends the Android KeyEvent corresponding to the constant that follows (-) to the field in focus in the underlying app. For example, 'key-11' sends a KeyEvent value of '11' (KEYCODE_4). See the full list of Android KeyEvents, constants and keycode values.
  • runscript-[ScriptIdentifier] - Executes the specified JavaScript code block as defined in the CustomScript.xml file. For example: 'runscript-clearcookiescript' executes the user-defined JavaScript code block in the “cleaarcookiescript” section of the CustomScript.xml file. Learn more about the CustomScript file.
  • uc-[UnicodeValue] - Sends the unicode character corresponding to the code that follows (-) to the field in focus in the underlying app. This is useful for injecting foreign-language or scientific characters or other special symbols. For example, 'uc-03C0' sends the Greek character Pi. See all Unicode characters.

All commands are case-sensitive.

Remapping Hardware Keys

Hardware keys are remapped in the KeyActions section of the KeyCodeMapping.xml file (EB 2.0 and higher only). Use the instructions in the Mapping Android Keycodes section above to modify the file and push it to the device.

Example

Handling Incorrect Keycodes

If it is determined that correct keypresses are generating incorrect keycodes, the incorrect keycode value must be determined before the correct one can be substituted. This process uses JavaScript to expose the keycodes that appear when pressing one or more keys.

The first step is to confirm that Windows keycodes are not being forced as a result of the <isWindowsKey> tag:

1. In the app's Config.xml file, confirm that the <isWindowsKey> tag has a value of 0.

2. Using one of the KeyCapture APIs, reveal the keycodes generated by keypresses to identify incorrect keycode value(s). The test code might look something like this:

3. Map the incorrect keycode values to the correct ones using the same syntax described in the earlier section:

For example, if Step 2 determined that the keycode value being generated is 0x05 and the desired value is 0x06, then the correct mapping statement would be:

where 'KEYCODE_X' = the name of the keycode. Standard Android key names are recommended.

4. Relaunch Enterprise Browser and repeat Step 2 to confirm that correct code(s) are generated.

Function Keys Mapper

Mapping Proprietary Function Keycodes

The function keys of certain Zebra devices running Windows Mobile, including the WorkAbout Pro 4 and Omnii XT15 (with Windows Embedded Handheld 6.5), return a proprietary set of Unicode values via Windows character messages rather than the values expected from Windows keydown/keyup messages. For example, pressing the F1 key returns the hexadecimal value E001 (57345 decimal) rather than the hex value 0x70 (112 decimal) as generally expected. This can lead to compatibility issues for Enterprise Browser apps when running on such devices with Windows Mobile.

For such scenarios, Zebra developed and recommends a means of mapping the proprietary Unicode values of function keys used by an Enterprise Browser application to Microsoft virtual keycode values.

Note: This method should be used only for function keys.

Enable and specify mapping

Mapping the function keys on a qualifying device requires adding a few lines to the app's Config.xml file, creating a file to specify the mapping assignments and copying the file to the device.

To map proprietary function keys:

1. Add the three code lines shown below to the app'sConfig.xmlfile as a child of the <Configuration> parent node:

Note: The maximum number of child tags is 65.

2. Create a file calledEBFunctionKeyMapping.xml, and using one of the templates below, specify the function key(s) to be mapped to Microsoft virtual keycode values.

Template 1- Map a Single Function Key

Use this template to map a single function key to a specific Microsoft keycode value. For example, to map the F1 key to a Microsoft virtual keycode, specify the proprietary Unicode value in hexadecimal (0xE001) first, followed by the Microsoft virtual keycode value in hexadecimal (0x70) as shown below:


Template 2- Map Multiple Function Keys

To map multiple function key to Microsoft keycode values, simply repeat the SET_FUNCTION_KEY_TO_STANDARD_MS_VALUE (child tag) statements above within the FUNCTION_KEY_MAPPING_TO_STANDARD_MS_VALUE root tag. The example below maps the F1 through F5 function keys:

3. Once the EBFunctionKeyMapping.xml mapping file is complete, copy the file to theProgram FilesEnterpriseBrowserdirectory on the device.

The function key(s) will be mapped as specified in the mapping file the next time Enterprise Browser is launched and whenever an EB app is in the foreground.

Contents of the Function Key Mapping File

  • FUNCTION_KEY_MAPPING_TO_STANDARD_MS_VALUE – the root tag
  • SET_FUNCTION_KEY_TO_STANDARD_MS_VALUE - the child tag associated with the root tag
  • IF_CHAR_VALUE - sets the proprietary Unicode value
  • SEND_KEYDOWN_VALUE - sets the Microsoft virtual keyCode value

Rules

  • Proprietary function key mapping is supported on Enterprise Browser 1.5 and later.
  • Maximum number of child tags is 65.
  • Mapped values are used internally by Enterprise Browser apps only.
  • Whenver a function key is pressed, if the value of a Windows character message matches any of the IF_CHAR_VALUE attributes mapped in the EBFunctionKeyMapping.xml file, the set value of the associated SEND_KEYDOWN_VALUE attribute is sent to the Windows keydown message as the Microsoft virtual keycode value.
  • This function key mapping applies only to certain Zebra devices running Windows Mobile only. These include the WorkAbout Pro 4 and Omnii XT15 (with Windows Embedded Handheld 6.5).
  • The format of EBFunctionKeyMapping.xml file should not be altered in any way.
  • Use the table below for Proprietary and Microsoft keycode values for function keys F1 to F24.
Function Keys Proprietary Unicode ValueMicrosoft Virtual Keycode Value
F10xE0010x70
F20xE0020x71
F30xE0030x72
F40xE0040x73
F50xE0050x74
F60xE0060x75
F70xE0070x76
F80xE0080x77
F90xE0090x78
F100xE00A0x79
F110xE00B0x7A
F120xE00C0x7B
F130xE00D0x7C
F140xE00E0x7D
F150xE00F0x7E
F160xE0100x7F
F170xE0110x80
F180xE0120x81
F190xE0130x82
F200xE0140x83
F210xE0150x84
F220xE0160x85
F230xE0170x86
F240xE0180x87

Also See

Function Keys Mapper Tutorial

  • KeyCapture API - how to include the API and use its methods
  • Keys that cannot be captured - including the SHIFT and ALT keys
  • Android KeyEvents documentation - the official list of Android key names