Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29277 Discussions

Capturing NumLock in a QuickWin application

larsm
Beginner
436 Views
I am using CVF 6.6C.

Is there a way to capture the pressing of the NumLock key within a QuickWin or a Console application?

I have looked at the GETCHARQQ and PASSDIRKEYSQQ documentation but these procedures don't seem to solve the problem.

Thanks in advance!

Lars
0 Kudos
2 Replies
Jugoslav_Dujic
Valued Contributor II
436 Views

You can install a WH_KEYBOARD hook procedure. See here:

http://softwareforums.intel.com/ids/board/message?board.id=15&message.id=1110

I think that, specifically, for Num (Caps, Scroll) Lock you can test the current state by checking whether the return value from GetKeyState has bit 1 set.

I'm not sure whether it's applicable to console applications though.

Jugoslav

0 Kudos
larsm
Beginner
436 Views
Thank you Jugoslav!

BTW! I have just unloaded and installed your XFT software with abolutely no problem at all. The sample that I have tried works fine!

Lars
0 Kudos
Reply