Is there any way to disable Windows Left & Right keys from within a process?
Printable View
Is there any way to disable Windows Left & Right keys from within a process?
How do you mean disable? For the whole machine or only for your process?? If for your process, use PreTranslateMessage in CWinApp and take care of WM_KEYDOWN + WM_KEYUP for VK_LEFT and VK_RIGHT.
/Rob
When I am running my application, I don't want Windows Special Left/Right keys to function. i.e. if the user presses Left/Right Windows key, Windows 95/NT should not display Start menu.
(note: not all the keyboards have these keys )
Also, my application is not done using MFC. I would appreciate any feed back.
Sugan
The virtual keycode for these keys are VK_LWIN and VK_RWIN (def'd in winuser.h). I'm not sure, but you could try setting a hook on the keyboard input when using your application with SetWindowsHookEx (trapping the codes above) then UnhookWindowsHookEx when you're finished.
/Rob