Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
pdadud
Old
#1  
Junior Member - OP
Thanks Meter 0
Posts: 2
Join Date: Sep 2009
Default problem hooking physical keys on HTC HD

Hi all,
im trying to hook the volume up and down keys using the SetWindowsHook API.
im having some problems with getting the vk codes of the keys, on a couple of different states on the machine:
1. when I try to get the code when the camera window is up - i get a same code for volume up and down.
2. when i try to do the same with camera windows is not up - i get a different code for each button and different then the event i got in section 1.

does anybody has a solution for me?
thanks.
 
vijay555
Old
#2  
vijay555's Avatar
Retired Moderator
Thanks Meter 20
Posts: 5,772
Join Date: Jun 2005
Location: Witch Space
IIRC I think that the keyboard driver has special case handling for the volume keys - I remember dissecting the driver with IDA some time back.
Try having a pick through the disassembly to see if you can find the codes and handling directly in there.
It was possible to hook right into the driver, but it's messy.

V
releases: www.vijay555.comtwitterdonatefrappr
 
Post Reply+
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

report this ad
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...