Page 1 of 1

Posted: Mon Jul 25, 2011 2:26 am
by Zero_Falcon
Can I change whatever is in here, and it will become the new default mapping?

CODEuse "commands";
use "keycode";

//////////////////////////////////////////////////////////////////////////////
//
// Commands
//
//////////////////////////////////////////////////////////////////////////////

keyCommandMap =
[ // (key, modifiers, command)
( KeyEnter, Any, CommandStartChat ),
( 'W', Shift, CommandPrevWeapon ),
( 'W', None, CommandNextWeapon ),
( 'W', Control, CommandToggleGroupFire ),
( KeyComma, None, CommandPrevPart ),
( KeyPeriod, None, CommandNextPart ),
( KeyEscape, None, CommandMainMenu ),
( KeyApostrophe, None, CommandQuickChatMenu ),
( KeyF1, Any, CommandHelp ),
( KeyF2, None, CommandConModeCombat ),
( KeyF3, Shift, CommandToggleCommand ),
( KeyF3, None, CommandConModeCommand ),
( KeyF4, None, CommandConModeInventory ),
( KeyF5, None, CommandConModeInvest ),
( KeyF6, None, CommandConModeTeam ),
( KeyF6, Shift, CommandConModeMiniTeam ),
( KeyF7, None, CommandConModeNav ),
( KeyF8, None, CommandConModeTeleport ),
( KeyF9, None, CommandViewMissile ),
( KeyF10, None, CommandViewTarget ),
( KeyF11, None, CommandViewChase ),
( KeyF12, Shift, CommandViewExternalOrbit ),
( KeyF12, None, CommandViewExternalStation ),
( 'H', None, CommandTargetHostile ),
( KeyInsert, Shift, CommandAcceptCommand ),
( KeyInsert, None, CommandExecuteCommand ),
( KeyDelete, Shift, CommandClearCommand ),
( KeyDelete, None, CommandRejectCommand ),
( KeyHome, None, CommandTargetCommand ),
( 'P', None, CommandToggleAutoPilot ),
( KeySpace, Control, CommandFireMissile ),
( 'L', None, CommandLockVector ),
( KeyNumPad3, None, CommandLockVector ),
( KeyBackspace, None, CommandThrottleZero ),
( KeyLeftSquare, None, CommandThrottle33 ),
(KeyRightSquare, None, CommandThrottle66 ),
( KeyBackSlash, None, CommandThrottleFull ),
( KeyLeftSquare, Alt, CommandLODUp ),
(KeyRightSquare, Alt, CommandLODDown ),
( 'J', Alt, CommandToggleLODSlider ),
( 'J', None, CommandTargetFriendlyLifepod ),
( 'J', Control, CommandTargetFriendlyLifepodNearest ),
( 'L', Shift, CommandTargetFriendlyLifepodPrev ),
( 'T', None, CommandTarget ),
( 'T', Control, CommandTargetNearest ),
( 'T', Shift, CommandTargetPrev ),
( 'F', None, CommandTargetFriendly ),
( 'F', Control, CommandTargetFriendlyNearest ),
( 'F', Shift, CommandTargetFriendlyPrev ),
( 'E', None, CommandTargetEnemy ),
( 'E', Control, CommandTargetEnemyNearest ),
( 'E', Shift, CommandTargetEnemyPrev ),
( 'Q', None, CommandTargetEnemyBase ),
( 'Q', Control, CommandTargetEnemyBaseNearest ),
( 'Q', Shift, CommandTargetEnemyBasePrev ),
( 'B', None, CommandTargetFriendlyBase ),
( 'B', Control, CommandTargetFriendlyBaseNearest),
( 'B', Shift, CommandTargetFriendlyBasePrev ),
( 'V', None, CommandTargetAlliedBase ),
( 'V', Control, CommandTargetAlliedBaseNearest ),
( 'V', Shift, CommandTargetAlliedBasePrev ),
( 'C', Shift, CommandTargetCommand ),
( 'C', None, CommandTargetCenter ),
( 'C', Control, CommandTrackCommandView ),
( KeyNumPad1, None, CommandTargetCenter ),
( 'D', Control | Shift, CommandSuicide ),
( 'G', None, CommandConModeGameState ),
( 'G', Control, CommandToggleGrid ),
( 'K', None, CommandToggleCloak ),
( 'D', None, CommandDropMine ),
( 'R', None, CommandRipcord ),
( 'Z', None, CommandTargetSelf ),
( 'X', None, CommandTargetNothing ),
( 'M', None, CommandMatchSpeed ),
( KeyPageUp, None, CommandChatPageUp ),
( KeyPageDown, None, CommandChatPageDown ),
( 'A', None, CommandDropChaff ),
( KeyNumPad2, None, CommandDropChaff ),
( KeySpace, None, CommandFireWeapon ),
( KeyUp, None, CommandPitchUp ),
( KeyLeft, None, CommandYawLeft ),
( KeyRight, None, CommandYawRight ),
( KeyDown, None, CommandPitchDown ),
( KeyLeft, Shift, CommandRollLeft ),
( KeyRight, Shift, CommandRollRight ),
( KeyNumPad4, None, CommandThrustLeft ),
( KeyNumPad6, None, CommandThrustRight ),
( KeyNumPad9, None, CommandThrustUp ),
( KeyNumPad7, None, CommandThrustDown ),
( KeyNumPad8, None, CommandThrustForward ),
( KeyNumPad5, None, CommandThrustBackward ),
( KeyEquals, None, CommandThrottleUp ),
( KeyMinus, None, CommandThrottleDown ),
( KeyTab, None, CommandFireBooster ),
(KeyNumPadMinus, None, CommandZoomOut ),
( KeyNumPadPlus, None, CommandZoomIn ),
( '1', Control, CommandSwapWeapon1 ),
( '2', Control, CommandSwapWeapon2 ),
( '3', Control, CommandSwapWeapon3 ),
( '4', Control, CommandSwapWeapon4 ),
( 'Y', Control, CommandSwapTurret1 ),
( 'U', Control, CommandSwapTurret2 ),
( 'I', Control, CommandSwapTurret3 ),
( 'O', Control, CommandSwapTurret4 ),
( 'Y', Shift, CommandPromoteTurret1 ),
( 'U', Shift, CommandPromoteTurret2 ),
( 'I', Shift, CommandPromoteTurret3 ),
( 'O', Shift, CommandPromoteTurret4 ),
( '5', Control, CommandSwapMissile ),
( '6', Control, CommandSwapChaff ),
( '7', Control, CommandSwapShield ),
( '8', Control, CommandSwapCloak ),
( '9', Control, CommandSwapAfterburner ),
( '0', Control, CommandSwapMine ),
( 'S', None, CommandNextCargo ),
( '1', None, CommandToggleWeapon1 ),
( '2', None, CommandToggleWeapon2 ),
( '3', None, CommandToggleWeapon3 ),
( '4', None, CommandToggleWeapon4 ),
( '5', None, CommandFireMissile ),
( '6', None, CommandDropChaff ),
( '8', None, CommandToggleCloak ),
( '9', None, CommandFireBooster ),
( '0', None, CommandDropMine ),
( 'S', Control, CommandDropCargo ),
( 'R', Control, CommandReload ),
(KeyNumPadMultiply, None, CommandReload ),
( keyPause, Control, CommandPauseTM ),
( 'I', None, CommandCycleRadar ),
( KeyEnd, None, CommandFinishTM ),
( KeyNumPad0, None, CommandToggleMouse ),
( 'Y', None, CommandVoteYes ),
( 'N', None, CommandVoteNo ),

//
// !!! Debug keys we should remove these before ship
//

(KeyNumPadEnter, None, CommandSkipTMGoal ),
(KeyF10, Control, CommandDecreaseTMClockSpeed ),
(KeyF11, Control, CommandIncreaseTMClockSpeed ),
(KeyF12, Control, CommandResetTMClockSpeed ),
(KeyPrintScreen, Any, CommandScreenShot )
];

//////////////////////////////////////////////////////////////////////////////
//
// mouse button commands
//
//////////////////////////////////////////////////////////////////////////////

mouseButtonCommandMap =
[ // (button #, command)
(0, CommandFireWeapon ),
(1, CommandFireMissile),
(2, CommandFireBooster),
(3, CommandTargetFriendlyBase),
(4, CommandToggleAutoPilot),
(5, CommandTargetCenter),
(6, CommandTargetNearest),
(7, CommandRipcord),
(8, CommandThrottleDown),
(9, CommandThrottleUp)
];

//////////////////////////////////////////////////////////////////////////////
//
// button commands
//
//////////////////////////////////////////////////////////////////////////////

buttonCommandMap =
[ // (joystick #, button #, command)
(0, 0, CommandFireWeapon ),
(0, 1, CommandFireMissile),
(0, 2, CommandFireBooster),
(0, 3, CommandRipcord ),
(0, 4, CommandDropChaff )
];

//////////////////////////////////////////////////////////////////////////////
//
// numberic Values
//
//////////////////////////////////////////////////////////////////////////////

// there must be exactly five pairs in this list

numericValuesNew =
[ // (joystick #, value #)
(0, 0),
(0, 1),
(0, 3),
(0, 2),
(0, 4)
];

Posted: Mon Jul 25, 2011 4:02 am
by HJ_KG
,

Posted: Mon Jul 25, 2011 9:16 am
by TurkeyXIII
Zero_Falcon wrote:QUOTE (Zero_Falcon @ Jul 25 2011, 12:26 PM) Can I change whatever is in here, and it will become the new default mapping?
Yes.

It's also used as a backup in case something goes wrong trying to load inputmap1.mdl. If you break the backup, the game will probably crash.