I got some complaints that when the forums switched my old post was deleted and since I had a backup I figured I might repost.
This is a guide on how to manually edit lotro.keymap in order
to customize keybindings beyond what the standard user interface
allows or supports.
This guide does not cover the Lotro Client Alias/Shorcut abilities
although they are very handy in combination with custom key bindings.
You can find fine guides at the following websites:
http://lotrovault.ign.com/View.php?v...s.Detail&id=37
http://forums.lotro.com/showthread.p...Target-Macros)
There is only one set of key bindings for all your characters in LOTRO and these bindings are loaded from lotro.keymap which is located in "My Documents/Lord of the Rings Online" folder.
If you want to have different key bindings for each of your characters you can either use different operating system users for each character or you can replace/switch the file before starting the game and every time you want to change characters. The game will not reload the file or read any changes until it's restarted, it does however write to lotro.keymap straight away if changes are done through the options UI.
If you load the client and it is unable to parse the lotro.keymap file it will be overwritten with a default file, for this reason you should always back up your changed file after any changes or risk loosing them.
If you have changed the structure, order or made an invalid binding the client will attempt to "correct" the file, this means that any clean up is futile since it will be scrambled the next time the client loads.
The basic structure of the file is:
Devices - An ordered list of all input devices available, keyboard, mouse, etc
MetaKeys - Function keys that work as modifiers on other keys, shift, alt, ctrl, etc
Bindings - The part of the file that binds keys to actions
Main - The main UI, all combat actions, selections, etc
EditControls - Key bindings for editing text fields, like chat window and such
SelectionUI - Bindings for instantly pointing your character in the direction of the view
MusicUI - Bindings for playing music in game
MapPanel - Bindings when in map view
VendorBuyUI - Bindings when in vendor purchase view, stack purchase, volume purchase, etc
ScrollableControls - Bindings connected to any scrollwheel?
ScrollableControls_Mouse - Bindings connected to scrollwheel on mouse
CopyAndPasteControls - Controls for copying/pasting text
DialogBoxes - Controls for dialog boxes?
DebugConsole - Bindings for the debug console
StringTokenDebugger - Bindings for the String token debugger (only used by dev/test)
The sections we are concerned with are Devices, MetaKeys, Main, SelectionUI and ScrollableControls_Mouse.
Keys are represented by keyboard device constants as defined by Microsoft, for a full definition see:
http://msdn.microsoft.com/en-us/libr...8VS.85%29.aspx
Typically this just means that it's prefixed with DIK_, examples:
DIK_0
DIK_F1
DIK_S
The more obscure keys are represented by their name such as:
DIK_DELETE
DIK_ESCAPE
DIK_NUMPAD0
DIK_LCONTROL
DIK_LSHIFT
DIK_LMENU
Devices:
A list of all the devices used for input into lotro, typically you are only concerned with the first two entries and won't have to change this file at all. The first two entries define the keyboard and mouse as devices 0 and 1 as shown here:
Keyboard [ GUID_SysKeyboard ]
Mouse [ GUID_SysMouse ]
MetaKeys:
This is where you define meta keys, you might already be familiar with some of the default meta keys used by Lotro like SHIFT and CTRL, by defining a key as a meta key it becomes
possible to bind an action that is only performed if the meta key and another key are pressed
at the same time. You can bind multiple keys to perform the same meta function, for example
so that either left or right shift can be pressed and then another button. You can define up
to 32 functions with multiple meta keys for each.
Here is an example where both left and right shift are defined as meta keys for function 1:
1 [ 0 DIK_LSHIFT ]
1 [ 0 DIK_RSHIFT ]
The First number in that example is the function ID, the second number is the device ID from
the Devices section, the third parameter is the name of the key constant.
You can also use mouse buttons as meta keys as shown here:
1 [ 1 DIMOFS_BUTTON3 ]
2 [ 1 DIMOFS_BUTTON4 ]
3 [ 1 DIMOFS_BUTTON0 ]
4 [ 1 DIMOFS_BUTTON1 ]
Button 0 is the left mouse button
Button 1 is the right mouse button
Button 2 is the scrollwheel
Button 3 is the back side button
Button 4 is the front side button
Each of the function id's is now enumerated in bits (binary) and represented in hex.
What this means is that when using the function with key bindings you will be using their
hex codes, here is an example config and the corresponding hex codes.
MetaKeys
[
1 [ 0 DIK_LSHIFT ]
1 [ 0 DIK_RSHIFT ]
2 [ 0 DIK_LCONTROL ]
2 [ 0 DIK_RCONTROL ]
3 [ 0 DIK_LMENU ]
3 [ 0 DIK_RALT ]
4 [ 0 DIK_LWIN ]
4 [ 0 DIK_RWIN ]
]
The corresponding hex codes for the functions, 1-4 and 0 by default being none:
0x00000000 - None
0x00000001 - Shift
0x00000002 - Ctrl
0x00000004 - Alt
0x00000010 - Win
The hex codes continue doubling as:
0x00000020
0x00000040
0x00000080
What this means is that you can define key bindings which require multiple meta keys
to be pressed by adding the hex codes, for example here is a binding that requires
Ctrl, Alt and Shift to be pressed along with the "S" key.
QUICKSLOT_1 [ User [ 0 DIK_S ] 0x0000007 ]
Here is another binding that only requires the Win and S keys to be pressed togeather:
QUICKSLOT_2 [ User [ 0 DIK_S ] 0x00000010 ]
Main:
This is where most of the key bindings are located and almost all of the ones you will
want to edit, there are a couple of things to keep in mind.
The order of the key bindings is fixed, the client requires the keys to be defined
in the default order and even if you are not using a key you still need to define it
if it's one of the original keys.
Key mappings come in two varieties, original "Old" ones and user created, example:
MovementLongJump [ Old [ 0 DIK_SPACE ] ]
ToggleJournalPanel [ User [ 0 DIK_P ] ]
The first binding is a default binding and as such is marked "Old", the second one is
a custom binding and is therefor marked "User", it's important to mark any changed lines
to "User" or the client will overwrite them with the default binding.
If you want to remove a default binding without replacing it with something else you
need to put in a DoNothing line, example:
DoNothing [ User [ 0 DIK_DOWNARROW ] ]
Key bindings can also include a Meta Key defined in the MetaKeys section, here is an
example of a default "Old" binding that uses function 1 as a MetaKey, in this case
it's the LootAll binding which is by default bound to shift/right mouse button.
AutoLootAll [ Old [ 1 DIMOFS_BUTTON1 ] 0x00000001 ]
In addition to the Meta Key you can define a Modifier, a modifier enables you to
define the type/part of a keypress to bind an action to, the common modifiers are:
Up, Down, DblClick and Tap. Up and Down correspond to when the key is pressed and
release, doubleclick means two clicks within about 200ms and tap means that the
button is depressed for less than c.a. 100ms. You can also specify the keyword Nearby which
blocks a doubleclick from being detected if the mouse moves to far between clicks.
Each combination of Key, MetaKey and Modifier can only be bound to one action but
by binding two separate actions to the Up and Down modifiers you can peform two
actions in one keystroke. Here is an example:
ChatModeReply [ User [ 0 DIK_LWIN ] 0x00000000 Tap ]
VOICECHAT_TALK [ User [ 0 DIK_LWIN ] 0x00000000 Down ]
Here is another handy example, this example performes activates two quickslots, one could
for example be an ingame alias/shortcut to notify the group that ;target is being buffed
and the other quickslot could perform the actual buff.
QUICKSLOT_12 [ User [ 0 DIK_2 ] 0x00000040 Tap ]
QUICKSLOT_62 [ User [ 0 DIK_2 ] 0x00000040 Down ]
This example binds two actions to the Left Windows button, chat reply and voicechat talk,
if the user just taps the key it's considered a chat reply, if the button is held down
it's considered a voicechat push to talk button.
I won't cover all the keys and bindings, these should all be present by default and the naming is self explanatory.
SelectionUI:
All this section defines is a button that instantly points your character in the direction
that the camera is facing, not that this is very handy when kiting mobs.
ScrollableControls_Mouse:
This section deals with the scroll ability of the scroll wheel on your mouse, you can bind these
to do custom actions, one good example would be bindings to use it for next/previous targets as
shown in this example:
SELECTION_NEXT_FOE [ User [ 1 DIMOFS_Z AxisPositive ] ]
SELECTION_PREVIOUS_FOE [ User [ 1 DIMOFS_Z AxisNegative ] ]
That's it, I recommend you also read the header of the default lotro.keymap, it's very useful when you have some background to understand it.
For reference here is a link to my personal lotro.keymap that can be used as a template/reference along with a screenshot explaining it:
http://dallur.com/fileadmin/user_upload/lotro.keymap
http://dallur.com/fileadmin/user_upload/ScreenShot.jpg
If you have found this guide helpful you might want to check out my Logitech G15/G19 LotroLCD application and my Logitech G15 keyboard profile.
http://dallur.com/fileadmin/user_upl...stallerX86.msi (32 bit)
http://dallur.com/fileadmin/user_upl...stallerX64.msi (64 bit)
http://dallur.com/fileadmin/user_upl...troProfile.lgp
Feel free to drop me an email or in game msg with comments or just to chat.