Re: Hotkeys and win32lib apps
- Posted by Greg Haberek <ghaberek at gmail.com> Nov 23, 2004
- 580 views
Here's a quote from w32Keys.e:
-- * VK_L* & VK_R* - left and right Alt, Ctrl and Shift virtual keys. -- * Used only as parameters to GetAsyncKeyState() and GetKeyState(). -- * No other API or message will distinguish left and right keys in this way. , VK_LSHIFT = #A0 , VK_RSHIFT = #A1 , VK_LCONTROL = #A2 , VK_RCONTROL = #A3 , VK_LMENU = #A4 , VK_RMENU = #A5
On 23 Nov 2004 19:29:09 +0100, Christian Cuvier <christian.cuvier at agriculture.gouv.fr> wrote: > > I wanted to trap Alt-Home to perform some procsing of my own in a Win32 app. > Ok, just trap WM_KEYDOWN and look for VK_HOME and AltMask. Simple, and don't > forget returnValue(0) so as to avoid the default processing of the Home key. > > But this only works halfway. Using a french keyboard, this correctly > identifies the right alt key, but not the left alt key. The latter works > correctly however, as it activates menu items in the expected way. > > Do I need to set up my own event loop so that it includes the > TranslateAccelerator() API func so that I can trap these left alt-things? > > CChris > > > >