I'm using Keys
type to detect pressed keys.
At some place I do comparison like this:
if (keyData == Keys.Control)
//do something
where keyData
is the key pressed of type Keys
However keyData
contains
ControlKey | Control
So of course comparison doesn't work because Keys.Control
contains only Control
.
So what is the correct way to compare them?