I need to write a Windows application which monitors keystrokes regardless of focus. When it detects a particular keystroke (Ctrl + V, specifically), it needs to perf
A really easy way to do it is with GetASyncKeyState. I use it only for games but I think it would work here.
Import this:
[DllImport("user32.dll")]
static extern short GetAsyncKeyState(System.Windows.Forms.Keys vKey); 
Then you can just do (in a loop or timer)
if(GetAsyncKeyState(Keys.ControlKey) && GetAsyncKeyState(Keys.K))
{
 //DO SOME STUFF!!
}
If you need it to happen just once when it's pressed you can declare
bool oldK; //at class scope
then in your loop/timer
if(!oldK && GetAsyncKeyState(Keys.ControlKey) && GetAsyncKeyState(Keys.K))
{
     //DO SOME STUFF!!
}
oldK = GetAsyncKeyState(Keys.K);