Example #1
0
 public IEnumerable<ICommand> this[KeyInputMode mode, KeyToggle toggle, Key key]
 {
     get
     {
         if (_map.ContainsKey(toggle))
             if (_map[toggle].ContainsKey(mode))
                 if (_map[toggle][mode].ContainsKey(key))
                     return _map[toggle][mode][key];
         return null;
     }
     set
     {
         var modeLookup = _map.GetOrNew(toggle);
         var keyLookup = modeLookup.GetOrNew(mode);
         keyLookup[key] = value;
     }
 }
Example #2
0
 public KeyAction(KeyInputMode keyMode, KeyCode code, Callback callback)
 {
     this.keyMode  = keyMode;
     this.code     = code;
     this.callback = callback;
 }