using Content.Shared.Input; using Robust.Shared.Input; namespace Content.Client.Input { /// /// Contains a helper function for setting up all content /// contexts, and modifying existing engine ones. /// public static class ContentContexts { public static void SetupContexts(IInputContextContainer contexts) { var common = contexts.GetContext("common"); common.AddFunction(ContentKeyFunctions.FocusChat); common.AddFunction(ContentKeyFunctions.ExamineEntity); common.AddFunction(ContentKeyFunctions.OpenTutorial); common.AddFunction(ContentKeyFunctions.UseOrAttack); var human = contexts.GetContext("human"); human.AddFunction(ContentKeyFunctions.SwapHands); human.AddFunction(ContentKeyFunctions.Drop); human.AddFunction(ContentKeyFunctions.ActivateItemInHand); human.AddFunction(ContentKeyFunctions.OpenCharacterMenu); human.AddFunction(ContentKeyFunctions.ActivateItemInWorld); human.AddFunction(ContentKeyFunctions.ThrowItemInHand); human.AddFunction(ContentKeyFunctions.OpenContextMenu); human.AddFunction(ContentKeyFunctions.OpenCraftingMenu); human.AddFunction(ContentKeyFunctions.OpenInventoryMenu); human.AddFunction(ContentKeyFunctions.MouseMiddle); human.AddFunction(ContentKeyFunctions.ToggleCombatMode); human.AddFunction(ContentKeyFunctions.Attack); var ghost = contexts.New("ghost", "common"); ghost.AddFunction(EngineKeyFunctions.MoveUp); ghost.AddFunction(EngineKeyFunctions.MoveDown); ghost.AddFunction(EngineKeyFunctions.MoveLeft); ghost.AddFunction(EngineKeyFunctions.MoveRight); ghost.AddFunction(EngineKeyFunctions.Run); ghost.AddFunction(ContentKeyFunctions.OpenContextMenu); } } }