Monday, November 9, 2009

Global Windows keyboard & mouse activity detection



Here's a problem faces a lot of people & its solutions on the web aren't simple as it could be, here's a C/C++ code that detects a hit on CTRL key, for more keys check the virtual keys codes page http://msdn.microsoft.com/en-us/library/ms927178.aspx , It should be better if this code has its own thread that detects keys as long as it's alive.



bool ClickDetector()
{
if(GetAsyncKeyState(0x11) ==-32768)
{
printf("CTRL pressed!");
return true;
}
return false;
}

This code can work with C#, C++/CLI & any .NET Language by Importing the DLL "user32.dll"



Wednesday, November 4, 2009

Freedom of open source software


This sense of humor can't be expressed that free in other entity than open source software, Linus Torvalds expressing he's sense of humor freely by thumbing up for Windows 7 in a store after Japan Linux symposium, Of course he's number user who just won't make tis deeply from his heart!