private void Add(KeyLinstener keyLinstener) { Mappings.Add(e => { if (!e.Cancel) { e.Cancel = keyLinstener(e.Key, e.KeyboardState); } }); }
private KeyDictionary Add(string title, KeyLinstener test, KeyDictionary mappings) { Add((key, state) => { if (!test(key, state)) { return(false); } Logger.Log("Test passed: " + title); return(KeysSender.Send(key, mappings, state.Layout)); }); return(mappings); }