Esempio n. 1
0
        virtual void    RestoreDefaultKeyMappings( void )
        {
            if( fControlMap != nil )
            {
                fControlMap->UnmapAllBindings();
#ifndef PLASMA_EXTERNAL_RELEASE
            fControlMap->BindKey(plCtrlKeyCombo( KEY_TILDE ) , B_SET_CONSOLE_MODE );
#endif
            }
        }
void    plAvatarInputInterface::RestoreDefaultKeyMappings( void )
{
    if( fControlMap == nil )
        return;

    fControlMap->UnmapAllBindings();

#ifndef LIMIT_VOICE_CHAT
    fControlMap->BindKey( KEY_TAB,                      S_PUSH_TO_TALK );
#endif
    fControlMap->BindKey( KEY_F1,                       S_SET_FIRST_PERSON_MODE );
    fControlMap->BindKey( plCtrlKeyCombo( KEY_F ),      S_SET_FIRST_PERSON_MODE );
    fControlMap->BindKey( KEY_BACKSPACE,                B_CONTROL_EXIT_MODE );
    fControlMap->BindKey( KEY_ESCAPE,                   B_CONTROL_EXIT_MODE );

    fControlMap->BindKey( KEY_NUMPAD_ADD,               B_CAMERA_ZOOM_IN );
    fControlMap->BindKey( KEY_NUMPAD_SUBTRACT,          B_CAMERA_ZOOM_OUT );

    fControlMap->BindKey( KEY_SHIFT,                    B_CONTROL_MODIFIER_FAST );
    fControlMap->BindKey( KEY_Z,                        B_CONTROL_MODIFIER_STRAFE );
    fControlMap->BindKey( KEY_UP,                       B_CONTROL_MOVE_FORWARD );
    fControlMap->BindKey( KEY_DOWN,                     B_CONTROL_MOVE_BACKWARD );
    fControlMap->BindKey( KEY_LEFT,                     B_CONTROL_ROTATE_LEFT );
    fControlMap->BindKey( KEY_RIGHT,                    B_CONTROL_ROTATE_RIGHT );
    fControlMap->BindKey( KEY_COMMA,                    B_CONTROL_STRAFE_LEFT );
    fControlMap->BindKey( KEY_PERIOD,                   B_CONTROL_STRAFE_RIGHT );

// This is now hard-coded to capslock
//  fControlMap->BindKey( KEY_CAPSLOCK,                 B_CONTROL_ALWAYS_RUN );

    fControlMap->BindKey( KEY_SPACE,                    B_CONTROL_JUMP );
//  fControlMap->BindKey( KEY_D,                        B_CONTROL_DIVE );
    fControlMap->BindKey( KEY_DELETE,                   B_CONTROL_IGNORE_AVATARS );

    fControlMap->BindKeyToConsoleCmd( plCtrlKeyCombo( KEY_1 ),  "Game.Emote.wave" );
    fControlMap->BindKeyToConsoleCmd( plCtrlKeyCombo( KEY_2 ),  "Game.Emote.laugh" );
    fControlMap->BindKeyToConsoleCmd( plCtrlKeyCombo( KEY_3 ),  "Game.Emote.clap" );
    fControlMap->BindKeyToConsoleCmd( plCtrlKeyCombo( KEY_4 ),  "Game.Emote.dance" );
    fControlMap->BindKeyToConsoleCmd( plCtrlKeyCombo( KEY_5 ),  "Game.Emote.talk" );
    fControlMap->BindKeyToConsoleCmd( plCtrlKeyCombo( KEY_6 ),  "Game.Emote.sneeze" );
    fControlMap->BindKeyToConsoleCmd( plCtrlKeyCombo( KEY_7 ),  "Game.Emote.sit" );

    fControlMap->BindKeyToConsoleCmd( plCtrlShiftKeyCombo( KEY_0 ), "Keyboard.ResetBindings" );
    
    // KI shortcut keyboard commands
    fControlMap->BindKeyToConsoleCmd( KEY_F2,                                   "Game.KIOpenKI" );
    fControlMap->BindKeyToConsoleCmd( KEY_F3,                                   "Game.KIOpenYeeshaBook" );
    fControlMap->BindKeyToConsoleCmd( KEY_F4,                                   "Game.KIHelp" );
    fControlMap->BindKeyToConsoleCmd( plCtrlKeyCombo( KEY_HOME ),               "Game.KIToggleMini" );
    fControlMap->BindKeyToConsoleCmd( plCtrlKeyCombo( KEY_END ),                "Game.KIPutAway" );
    fControlMap->BindKeyToConsoleCmd( KEY_PAGEUP,                               "Game.KIChatPageUp" );
    fControlMap->BindKeyToConsoleCmd( KEY_PAGEDOWN,                             "Game.KIChatPageDown" );
    fControlMap->BindKeyToConsoleCmd( KEY_HOME,                                 "Game.KIChatToStart" );
    fControlMap->BindKeyToConsoleCmd( KEY_END,                                  "Game.KIChatToEnd" );
    fControlMap->BindKeyToConsoleCmd( plCtrlKeyCombo( KEY_NUMPAD_ADD ),         "Game.KIUpSizeFont" );
    fControlMap->BindKeyToConsoleCmd( plCtrlKeyCombo( KEY_NUMPAD_SUBTRACT ),    "Game.KIDownSizeFont" );
    fControlMap->BindKeyToConsoleCmd( KEY_F5,                                   "Game.KITakePicture" );
    fControlMap->BindKeyToConsoleCmd( KEY_F6,                                   "Game.KICreateJournal" );
    fControlMap->BindKeyToConsoleCmd( KEY_F7,                                   "Game.KICreateMarker" );
    fControlMap->BindKeyToConsoleCmd( KEY_F8,                                   "Game.KICreateMarkerFolder" );

#ifndef PLASMA_EXTERNAL_RELEASE
    fControlMap->BindKey( plShiftKeyCombo( KEY_P ),     B_CONTROL_TOGGLE_PHYSICAL );
    fControlMap->BindKey( KEY_U,                        B_CONTROL_MOVE_UP );
    fControlMap->BindKey( KEY_H,                        B_CONTROL_MOVE_DOWN );
    fControlMap->BindKey( plShiftKeyCombo( KEY_C ),     B_TOGGLE_DRIVE_MODE );
    
    fControlMap->BindKeyToConsoleCmd( KEY_L,            "NextStatusLog" );
#endif
}