public static bool TrySetKey(StandardKeyAction keyAction, Keys newKey)
        {
            bool canset = KeyboardController.mappedKeys.ContainsKey(keyAction) && !KeyboardController.mappedKeys.ContainsValue(newKey);
            if (canset)
            {
                KeyboardController.mappedKeys[keyAction] = newKey;
            }

            return canset;
        }
示例#2
0
        public static bool TrySetKey(StandardKeyAction keyAction, Keys newKey)
        {
            bool canset = KeyboardController.mappedKeys.ContainsKey(keyAction) && !KeyboardController.mappedKeys.ContainsValue(newKey);

            if (canset)
            {
                KeyboardController.MappedKeys[keyAction] = newKey;
            }

            return(canset);
        }
示例#3
0
 public static Keys KeyForAction(StandardKeyAction keyAction)
 {
     return(KeyboardController.MappedKeys[keyAction]);
 }