Logitech Keyboard F-Lock Default Behavior

F-Lock key is always OFF by default

The Logitech Elite is a very nice and ergonomic keyboard.  But for some unexplicable design reason, Logitech decided to turn OFF the F-Lock (Function Lock) key by default.  This means, whenever you boot up your computer, the F-Lock is OFF.

What happens when the F-Lock is OFF?

When the F-Lock key is OFF, NONE of the Function keys (F1, F2, etc.) on the Logitech Elite would behave as expected.  This is because with the F-Lock key OFF, Logitech remaps these keys to other pre-programmed functions, such as “New” for F1, “Reply” for F2, “Forward” for F3.

In order to use the Function keys on the Logitech keyboard, you MUST turn ON the F-Lock key.

How can we make this happen by default?

I have found a work-around solution for you.  This article is intended for advanced users only.

Windows System Registry Hack

By doing a few edits in your System Registry, you can remap the Function keys to behave as if the F-Lock is ON even when the F-Lock is OFF. 

DISCLAIMER:  Be sure to make a backup of your System Registry before attempting any changes.  Edit the System Registry at your own risk!

  1. Launch RegEdit.exe
  2. Look for the following branch in the System Registry
HKEY_LOCAL_MACHINE\
SYSTEM\
CurrentControlSet\
Control\
Keyboard Layout

IMPORTANT: There is also a Keyboard Layouts (notice the plural form) under the Control key, but that key should not be modified!

In the Keyboard Layout key, we will be adding the Scancode Map value. This value is of type REG_BINARY and has the data format specified in the following table.

Start offset (in bytes) Size (in bytes) Data
0 4 Header: Version Information
4 4 Header: Flags
8 4 Header: Number of Mappings
12 4 Individual Mappings
Last 4 bytes 4 Null Terminator (0x00000000)

The first and second DWORDS store header information and should be set to all zeroes for the current version of the Scan Code Mapper. The third DWORD entry holds a count of the total number of mappings that follow, including the null terminating mapping. The minimum count would therefore be 1 (no mappings specified). The individual mappings follow the header. Each mapping is one DWORD in length and is divided into two WORD length fields. Each WORD field stores the scan code for a key to be mapped.

Once the map is stored in the registry, the system must be rebooted for the mappings to take effect. Note that if the mapping of a scan code is necessary on a keypress, the step is performed in user mode just before the scan code is converted to a virtual key. Doing this conversion in user mode can present certain limitations, such as mapping not working correctly when running under Terminal Services.

The following presents an example. To swap the left CTRL key with the CAPS LOCK key, use a registry editor (preferably Regedt32.exe) to modify the registry key described earlier. The following value is stored in the Scancode Map key:

00000000 00000000 03000000 3A001D00 1D003A00 00000000

It is important to remember that entries stored in the registry are always in little Endian format. The following table contains these entries broken into DWORD fields and the bytes swapped.

Value Interpretation
0x00000000 Header: Version. Set to all zeroes.
0x00000000 Header: Flags. Set to all zeroes.
0x00000003 Three entries in the map (including null entry).
0x001D003A Left CTRL key –> CAPS LOCK (0x1D –> 0x3A).
0x003A001D CAPS LOCK –> Left CTRL key (0x3A –> 0x1D).
0x00000000 Null terminator.

To remove these mappings, the following registry value must be deleted and then the system must be rebooted:

HKEY_LOCAL_MACHINE\
SYSTEM\
CurrentControlSet\
Control\
Keyboard Layout\
Scancode Map

It is also possible to add a key not generally available on a keyboard or to remove a key that is never used. The following example shows the value stored in Scancode Map to remove the right CTRL key and change the functionality of the right ALT key to work as a mute key:

00000000 00000000 03000000 00001DE0 20E038E0 00000000
Value Interpretation
0x00000000 Header: Version. Set to all zeroes.
0x00000000 Header: Flags. Set to all zeroes.
0x00000003 Three entries in the map (including null entry).
0xE01D0000 Remove the right CTRL key (0xE01D –> 0x00).
0xE038E020 Right ALT key –> Mute key (0xE038 –> 0xE020).
0x00000000 Null terminator.

After the necessary data is generated, it can be inserted into the registry in several ways.

  • A .reg file can be generated that can be easily incorporated into the system registry using a registry editor such as Regedit.exe.
  • An .ini file can be created that contains the necessary information to be added to the registry using Regini.exe.
  • An .inf file can also be created with an [AddReg] section that contains the registry information to be added.
  • Regedt32.exe can be used to manually add the information to the registry.

The Scan Code Mapper has several advantages and disadvantages.

The advantages include:

  • The Mapper can be used as an easy fix to correct firmware errors.
  • Frequently used keys can be added to the keyboard by modifying the map in registry. Keys that aren’t often used (for example, right CTRL key) can be mapped to null (removed) or exchanged for other keys.
  • Key locations can be altered easily. Users can easily customize the location of frequently used keys for their benefit.

The disadvantages include:

  • Once the map is stored in the registry, a system reboot is required to activate it.
  • The mappings stored in the registry work at system level and apply to all users. These mappings cannot be set to work differently depending on the current user.
  • The current implementation restricts the functionality of the map such that mappings always apply to all keyboards connected to the system. It is not currently possible to create a map on a per-keyboard basis.

Logitech Function Key Scancodes

As an exercise for you, you will continue to remap the keys as listed in the following tables.  After you have completed all the entries, reboot your system.  The Function keys will now work as expected even when the F-Lock is OFF by default.

Key Scancode Before Scancode After
F-Lock OFF
F1 E0 3B 3B
F2 E0 3C 3C
F3 E0 3D 3D
F4 E0 3E 3E
F5 E0 3F 3F
F6 E0 40 40
F7 E0 41 41
F8 E0 42 42
F9 E0 43 43
F10 E0 44 44
F11 E0 57 57
F12 E0 58 58
 
F-Lock ON
F1 3B E0 3B
F2 3C E0 3C
F3 3D E0 3D
F4 3E E0 3E
F5 3F E0 3F
F6 40 E0 40
F7 41 E0 41
F8 42 E0 42
F9 43 E0 43
F10 44 E0 44
F11 57 E0 57
F12 58 E0 58
 
iNav
Scroll Up E0 48 E0 75
Scroll Down E0 50 E0 72
Back E0 6A  
Go E0 69  
 
Media
Rewind E0 10  
F-Forward E0 19  
Play E0 22  
Stop E0 24  
Media E0 6D  
Mute E0 20  
Volume Up E0 30  
Volume Down E0 2E  
 
Other
User E0 5F  
Email E0 6C  
Messenger E0 11  
Webcam E0 12  
 
iTouch E0 13  
Search E0 65  
Shopping E0 14  
Favorites E0 66  
My Home E0 32  
Advertisements
Published in: on January 9, 2011 at 5:29 pm  Comments (7)  

The URI to TrackBack this entry is: https://blackbeltreview.wordpress.com/2011/01/09/logitech-elite-keyboard-default-f-lock-behavior/trackback/

RSS feed for comments on this post.

7 CommentsLeave a comment

  1. great site. Keep doing

  2. Dude … best keyboard ever : http://www.microsoft.com/hardware/mouseandkeyboard/productdetails.aspx?pid=043

  3. I was very pleased to find this site.I wanted to thank you for this great read!! I definitely enjoying every little bit of it and I have you bookmarked to check out new stuff you post.

  4. Perfect work!

  5. Your Site Is Great!

  6. Incredible site!

  7. Awesome article.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: