Thursday, March 15, 2012

Kbd++ released : Track global Toggle key events

Finally after a lot of development effort and study of OS internals, Kbd++ is being released.

Essentially it is ...........

An utility to track the toggle key(CAPS, NUM, SCROLL) status of keyboard. This is particularly useful for Wireless keyboard users as wireless keyboards have no LEDs. Status of the LEDs is indicated using three icons in the System Tray with Balloontips(optional). It is being developed on C++/Qt and will currently target Windows and Linux boxes. Platform specific code are implemented using Win32 and X11 APIs.

Currently it is only supporting MS Windows. Windows implementation is based on Named Pipes (for IPC ) and Windows Hooks (for capturing global events). Linux implementation is on way and hopefully will be completed shortly.

Make sure you run the correct binaries on the correct architecture (x86/amd64), else the explorer might hang.



It is freely available at :
Qt Apps Kbd++

The source is hosted on the mercurial based public repository at BitBucket:
Kbd++ Source

The Linux implementation is yet a gray area........ need more study on that. An easy way out is monitoring the key state at regular intervals. However that will increase the CPU utilization. Hence need to look for some system specific way to do it.

One major disappointment during the life of the project has been a strange runtime error while using QLocalSoket from the injected DLL, which in debug mode said :

warning: ASSERT failure in QWinEventNotifier::QWinEventNotifier(): "Cannot creat
e a win event notifier without a QEventDispatcherWin32", file kernel\qwineventno
tifier_p.cpp, line 74 



Qt Centre had a long discussion thread on this, which says its a probable Qt bug ...
Qt Centre discussion thread

I had too replace the entire named pipe client implementation in the injected DLL, using Win32 API s for the same.

Tuesday, March 13, 2012

Error while bulding 64 bit Qt lib 4.8.0 on Windows: “Perl not found in environment – cannot run syncqt”

Just encountered this error while trying to build the 64bit version of the Qt lib 4.8.0 on Windows:
The configure tools stopped saying : “Perl not found in environment – cannot run syncqt”"

If you do not want to install Perl, easy solution to this is just deleting the syncQt.bat from the $QtDir\bin directory and running configure again.

Sunday, March 11, 2012

Qt Creator Debugger problem on Windows

I got the following error message when trying to debug an application built using Qt Creator on Windows. The application started but no debugging could be done as Gdb was not installed on my system.

The preferred debugger for debugging binaries of type 'x86-windows-msvc-2008-pe-32bit' is not available.

The debugger engine 'Gdb engine' will be used as fallback.

Details: There is no CDB binary available for binaries in format 'x86-windows-msvc-2008-pe-32bit'

Finally, I figured out it was due to the absence of CDB.exe in the Presence of C:\Program Files\Debugging Tools for Windows directory. Qt Creator looks for the MS Windows debugger in that location. This problem can be solved by installing the right version of the debugger from the Windows SDK or DDK from

http://www.microsoft.com/download/en/details.aspx?id=8442

OR

http://msdn.microsoft.com/en-us/windows/hardware/gg463009

OR

http://msdn.microsoft.com/en-us/windows/hardware/gg487428

To get the debugger installed at the C:\Program Files\Debugging Tools launch the setup programs from the Debuggers directory in the WDK or DDK cd/dvd.