Difference between revisions of "Keyboard mapping"

From Second Life Wiki
Jump to navigation Jump to search
(New page: {| width="600" cellpadding="3" | Image:icons_parature_warning.jpg | <font size="1">'''Warning: '''By using the following procedure, you are changing critical Second Life initialization...)
 
(Page repair. <xml></xml> replaced with <syntaxhighlight lang="xml"></syntaxhighlight>)
 
(30 intermediate revisions by 12 users not shown)
Line 1: Line 1:
{| width="600" cellpadding="3"
<noinclude>{{KBmaster}}</noinclude>
|
[[Image:icons_parature_warning.jpg]]
| <font size="1">'''Warning: '''By using the following procedure, you are changing critical Second Life initialization files on your own computer.  Proceed at your own risk; Linden Lab is not able to provide support for problems that arise as a result of changed initialization files.</font>
|}


If you are using a non-QWERTY keyboard setup, some of Second Life's controls may seem confusing or inconvenient.  In these extreme cases, you may rebind Second Life's keyboard controls by editing the keys.ini file:
''Keyboard mapping'' refers to the Second Life Viewer's shortcut keys that you use to move, change your view, and so on.


#Navigate to '''<Second Life install directory>\app_settings''' (Second Life installs to C:\Program Files\Second Life by default on Windows systems)
You may want to change the default keyboard mapping for the Second Life Viewer, for example if:
#Make a backup copy of '''keys.ini'''.  If something goes terribly wrong with your edits, you will need to restore the original configuration.
#Open '''keys.ini''' in a text editor, like Notepad
#Read the primer at the beginning of the file; it will help you understand how to make your edits
#When you feel comfortable with the format of the file, edit the second column to change key bindings.  Keep in mind that you will need to change the same control for each mode (FIRST_PERSON, THIRD_PERSON, etc) for the binding to be fully effective.
#Save and close '''keys.ini'''.
#Restart Second Life, and test your new controls!


'''Remember:''' if your controls don't turn out the way you wanted them, you can restore Second Life's original keyboard configuration by restoring your backup of '''keys.ini'''.
* You're using a non-QWERTY keyboard.
* You want to change how keys respond in {{xref|mouselook}} (first-person view).
 
 
{{KBwarning| Changing the Viewer's initialization files can result in unexpected behavior or loss of functionality in Second Life. Proceed at your own risk; Linden Lab will ''not'' support issues that arise as a result of altered program files. ''Always'' make a backup copy before making edits.}}
 
== Procedure ==
To change the default keyboard mappings, edit the Viewer's <code>keys.xml</code> file. 
 
Follow these steps:
 
# Find the Second Life <code>app_settings</code> directory:
#* On Windows, it is <code>C:\Program Files\SecondLifeViewer2\app_settings</code> by default (<code>C:\Program Files (x86)\SecondLifeViewer2\app_settings</code> on 64-bit Windows).
#* On Mac OS, right-click the Second Life application package and choose '''Show Package Contents'''. Then, open <code>Contents > Resources > app_settings</code>.
# '''IMPORTANT''': Make a backup copy of <code>keys.xml</code>. so you can restore the original configuration if something goes wrong.
# Open <code>keys.xml</code> in a text editor. 
# Change the keyboard mappings as desired.
#* If you want a binding to be consistent between third-person and first-person views, you need to change the same control for both modes.
# Save and close <code>keys.xml</code>.
# Restart the Viewer and test your new controls!
 
== Format of keys.xml ==
 
The file has sections that define the key mappings for:
* First-person mode (known as 'Mouselook View' in SL)
* Third-person mode
* Edit mode
* Sitting
* Edit avatar mode
 
<syntaxhighlight lang="xml">
<keys>
    <first_person>
        ... key bindings for first person mode ...
    </first_person>
    <third_person>
        ... key bindings for third person mode ...
    </third_person>
    <edit>
        ... key bindings for edit mode ...
    </edit>
    <sitting>
        ... key bindings for sitting ...
    </sitting>
    <edit_avatar>
        ... key bindings for avatar editing mode ...
    </edit_avatar>
</keys>
</syntaxhighlight>
 
Each key binding has the following format:
 
<syntaxhighlight lang="xml">
<binding key="{key}" mask="{mask}" command="{command}"/>
</syntaxhighlight>
 
Where:
* ''{key}'' is the physical key ([[options]])
* ''{mask}'' is the modifier key:  NONE, SHIFT, CTL, ALT, CTL_ALT, CTL_ALT_SHIFT, CTL_SHIFT, or ALT_SHIFT
* ''{command}'' is the command to which the key combination maps.
 
[[Category:Reference]]
[[Category:Controls]]

Latest revision as of 04:52, 19 April 2016

Keyboard mapping refers to the Second Life Viewer's shortcut keys that you use to move, change your view, and so on.

You may want to change the default keyboard mapping for the Second Life Viewer, for example if:

  • You're using a non-QWERTY keyboard.
  • You want to change how keys respond in mouselook (first-person view).


KBwarning.png Warning: Changing the Viewer's initialization files can result in unexpected behavior or loss of functionality in Second Life. Proceed at your own risk; Linden Lab will not support issues that arise as a result of altered program files. Always make a backup copy before making edits.

Procedure

To change the default keyboard mappings, edit the Viewer's keys.xml file.

Follow these steps:

  1. Find the Second Life app_settings directory:
    • On Windows, it is C:\Program Files\SecondLifeViewer2\app_settings by default (C:\Program Files (x86)\SecondLifeViewer2\app_settings on 64-bit Windows).
    • On Mac OS, right-click the Second Life application package and choose Show Package Contents. Then, open Contents > Resources > app_settings.
  2. IMPORTANT: Make a backup copy of keys.xml. so you can restore the original configuration if something goes wrong.
  3. Open keys.xml in a text editor.
  4. Change the keyboard mappings as desired.
    • If you want a binding to be consistent between third-person and first-person views, you need to change the same control for both modes.
  5. Save and close keys.xml.
  6. Restart the Viewer and test your new controls!

Format of keys.xml

The file has sections that define the key mappings for:

  • First-person mode (known as 'Mouselook View' in SL)
  • Third-person mode
  • Edit mode
  • Sitting
  • Edit avatar mode
<keys>
    <first_person>
        ... key bindings for first person mode ...
    </first_person>
    <third_person>
        ... key bindings for third person mode ...
    </third_person>
    <edit>
        ... key bindings for edit mode ...
    </edit>
    <sitting>
        ... key bindings for sitting ...
    </sitting>
    <edit_avatar>
        ... key bindings for avatar editing mode ...
    </edit_avatar>
</keys>

Each key binding has the following format:

<binding key="{key}" mask="{mask}" command="{command}"/>

Where:

  • {key} is the physical key (options)
  • {mask} is the modifier key: NONE, SHIFT, CTL, ALT, CTL_ALT, CTL_ALT_SHIFT, CTL_SHIFT, or ALT_SHIFT
  • {command} is the command to which the key combination maps.