Difference between revisions of "Keyboard mapping"

From Second Life Wiki
Jump to navigation Jump to search
(Page repair. <xml></xml> replaced with <syntaxhighlight lang="xml"></syntaxhighlight>)
 
(3 intermediate revisions by 3 users not shown)
Line 29: Line 29:


The file has sections that define the key mappings for:
The file has sections that define the key mappings for:
* First-person mode
* First-person mode (known as 'Mouselook View' in SL)
* Third-person mode
* Third-person mode
* Edit mode
* Edit mode
Line 35: Line 35:
* Edit avatar mode
* Edit avatar mode


<keys>
<syntaxhighlight lang="xml">
  <first_person>
<keys>
    ... ''key bindings for first person mode'' ...
    <first_person>
  </first_person>
        ... key bindings for first person mode ...
  <third_person>
    </first_person>
    ... ''key bindings for third person mode'' ...
    <third_person>
  </third_person>
        ... key bindings for third person mode ...
  <edit>
    </third_person>
    ... ''key bindings for edit mode'' ...
    <edit>
  </edit>
        ... key bindings for edit mode ...
  <sitting>
    </edit>
    ... ''key bindings for sitting'' ...
    <sitting>
  </sitting>
        ... key bindings for sitting ...
  <edit_avatar>
    </sitting>
    ... ''key bindings for avatar editing mode'' ...
    <edit_avatar>
  </edit_avatar>
        ... key bindings for avatar editing mode ...
</keys>
    </edit_avatar>
</keys>
</syntaxhighlight>


Each key binding has the following format:
Each key binding has the following format:


  <binding key="''key''" mask="''mask''" command="''command''"/>
<syntaxhighlight lang="xml">
<binding key="{key}" mask="{mask}" command="{command}"/>
</syntaxhighlight>


Where:
Where:
* ''key'' is the physical key
* ''{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
* ''{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.
* ''{command}'' is the command to which the key combination maps.


[[Category:Reference]]
[[Category:Reference]]
[[Category:Controls]]
[[Category:Controls]]

Latest revision as of 03: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.