Camera hardware button in the registry

  • Thread starter Thread starter CraigGRA
  • Start date Start date
C

CraigGRA

I have an app that we use on 3 different devices and looking at the
button configuration the camera button has a different hardware key on
each one.
I want to assign the camera hardware button to a button in my app on a
specic screen but have issues due to it being different for each
device.
Is the key assigned to the camera stored in the registry somewhere so
I can assign it programatically at runtime?


Craig
 
Below the registry key
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shell\Keys]
You'll find a registry key for each of the hardware keys on the device. This
contains the details of what is launched when the button is pressed (as set
through Settings > Buttons. You can read these values to work out which of
the hardware keys is the camera button (although the name of the camera
application may vary based on OEM). You can then use the
Microsoft.WindowsCE.Forms.HardwareButton control to hook that button within
your application.
Unfortunately there aren't any standards on the order of the buttons and
what is assigned to each one. Of course the user can change these
assignments too.

Peter
 
Below the registry key
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shell\Keys]
You'll find a registry key for each of the hardware keys on the device. This
contains the details of what is launched when the button is pressed (as set
through Settings > Buttons. You can read these values to work out which of
the hardware keys is the camera button (although the name of the camera
application may vary based on OEM). You can then use the
Microsoft.WindowsCE.Forms.HardwareButton control to hook that button within
your application.
Unfortunately there aren't any standards on the order of the buttons and
what is assigned to each one. Of course the user can change these
assignments too.

Peter

--
Peter Foot
Microsoft Device Application Development MVPwww.peterfoot.net|www.inthehand.com
In The Hand Ltd - .NET Solutions for Mobility




I forgot to add the app runs on WM5 & WM6 using CF2

- Show quoted text -

Thanks Peter all the devices are of HTC origin so the camera app is
the same.

Craig
 
Below the registry key
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shell\Keys]
You'll find a registry key for each of the hardware keys on the device. This
contains the details of what is launched when the button is pressed (as set
through Settings > Buttons. You can read these values to work out which of
the hardware keys is the camera button (although the name of the camera
application may vary based on OEM). You can then use the
Microsoft.WindowsCE.Forms.HardwareButton control to hook that button within
your application.
Unfortunately there aren't any standards on the order of the buttons and
what is assigned to each one. Of course the user can change these
assignments too.

Peter

--
Peter Foot
Microsoft Device Application Development MVPwww.peterfoot.net|www.inthehand.com
In The Hand Ltd - .NET Solutions for Mobility




I forgot to add the app runs on WM5 & WM6 using CF2

- Show quoted text -

Are there any known issues on WM6 with hardware buttons as I ran my
test app on xda orbit with Wm6 and it gives a not supported exception
regarding hardware buttons.

Thanks

Craig
 
Back
Top