Here are the examples of the csharp api System.Collections.Concurrent.ConcurrentDictionary.ContainsKey(VirtualKey) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
1 Examples
19
Source : KeyboardListener.cs
with GNU General Public License v3.0
from Decimation
with GNU General Public License v3.0
from Decimation
private void HandleKey(VirtualKey keyShort)
{
if ((KeyWhitelist.Count > 0 && !KeyWhitelist.Contains(keyShort))) {
return;
}
short keyState = Native.GetAsyncKeyState(keyShort);
bool prev = IsVkPrevious(keyState);
bool down = IsVkDown(keyState);
bool stroke = m_keyHistory.ContainsKey(keyShort)
&& m_keyHistory[keyShort].IsDown && !down;
var args = new KeyEventArgs
{
Key = keyShort,
IsDown = down,
IsPrevious = prev,
IsStroke = stroke,
Raw = keyState
};
KeyEvent?.Invoke(null, args);
if (args.IsStroke) {
KeyStroke?.Invoke(null, keyShort);
}
if (args.IsDown) {
KeyDown?.Invoke(null, keyShort);
}
m_keyHistory[args.Key] = args;
}