Need dev help with reading volume up/down keys - Windows Mobile Development and Hacking General

Hi !
I'm writing an app (which i will post here for free ofc) and i'm trying to read the volume up/down keys. I also need to stop them from displaying the volume slider and changing volume while my app is running, i.e. inhibit default behaviour. And since my app will run in the background i want the rest of the keys to function as normal.
If you can help, please post here.
I would really like concise answers, not something like : "try to hook the keyboard driver and see what you get".
Don't ask what my app will do, i won't tell until it's ready (a beta will be available as soon as i can read the keys, i got the rest of it ready).
Thanks,
RPG

Sorry I will give you a "try to hook the keyboard driver and see what you get" like answer ;-) but did you get that keys were hardware specific ?

Sometimes those keys are mapped to Up and Down.

I have no problem in asking the user: press volume up key, press volume down key, so that it works on any machine (or maybe he wants to use different keys). The problem is that GetASyncKeyState for example has no idea those keys are pressed. And even when it works for some other keys (GetAsyncKeyState reads them), those keys still go to the system and stuff happens (like i said, i want to inhibit default behaviour).
Don't post if you don't know what GetASyncKeyState does

RPG0 said:
I have no problem in asking the user: press volume up key, press volume down key, so that it works on any machine (or maybe he wants to use different keys). The problem is that GetASyncKeyState for example has no idea those keys are pressed. And even when it works for some other keys (GetAsyncKeyState reads them), those keys still go to the system and stuff happens (like i said, i want to inhibit default behaviour).
Don't post if you don't know what GetASyncKeyState does
Click to expand...
Click to collapse
I'm guessing C++, which I have no knowledge in, however, briefly looking at the MSDN article on GetASyncKeyState, I'd guess the list on vijay555s site for VJKeyPress uses the same key codes...
So,
Code:
VK_VOLUME_DOWN 174
VK_VOLUME_UP 173
from here

l3v5y said:
I'm guessing C++, which I have no knowledge in, however, briefly looking at the MSDN article on GetASyncKeyState, I'd guess the list on vijay555s site for VJKeyPress uses the same key codes...
So,
Code:
VK_VOLUME_DOWN 174
VK_VOLUME_UP 173
from here
Click to expand...
Click to collapse
Like i said, i already tried that. Doesn't work.

RPG0 said:
Like i said, i already tried that. Doesn't work.
Click to expand...
Click to collapse
Then, I'm sorry, but I'm clueless

bump !
I'm really close, i just need the way to read the keys

RPG0 said:
bump !
I'm really close, i just need the way to read the keys
Click to expand...
Click to collapse
Do you need them within your program, or to be redirected to your program (as in, the volume keys open your program)? In the Diamond volume control app, there are some reg keys for opening that program rather than the WM volume control applet...

I need them in my program.
Right now i do have them redirected to run my prog, for tests, but it's not the way i want it.
What i do need is a way to know in my prog when that key is pressed and when it is released. Again, my app will run in the background, so i need the rest of the keys untouched.

Related

Hardware button On/Off

Is it possible to know when a user presses the on /Off button.
I can controll the others buttons, but not this one.
I want to know when the user turn on the device so that I can start my program. And stop my program when the user turn off the device..
/Ove
there is a function called 'RequestPowerNotifications'
Hi,
You can use code:
Use the notification-database and events
NOTIFICATION_EVENT_WAKEUP = 11
Or try WakeApp:
http://www.kent7.com/holly/wakeapp/
(There is an English version available!)
Sam
oveboh said:
I can controll the others buttons, but not this one.
Click to expand...
Click to collapse
Sorry Ove, cannot help there. But I am desperately after a tool that redirects the volume up and down buttons to MS Reader usagable page up and page down... Anyone would make a tool like that?

Jas-Jar Light Button

Any ideas on how to get the light button working on a jas-jar. Mine has not been working since the start and I've tried everything. The button Im talking about is the first from the right close to the infrared port on the outside of the device. It is supposed to turn on the flashlight but when I press it nothing happens and it doesnt even show up in the buttons applet in WM5.
Actually that button doesn't turn on the flashlight, though some here have tried to come up with a hack so that it would. I don't know if they were ever successful with that.
That button turns on the screen backlight when it has timed out but your device is still turned on. It's not the most useful button, which is why folks were trying to come up with a hack to make it more useful, for instance to turn on the flashlight like you wanted to.
Maybe if someone has had success, they will chime in here.
Change the button
Attached is a cab file allowing you to make use out of the light button to anything else :lol:
When yuo say anything else, does that include controlling the flashlight? Either way, thanks for the file.
Would be nice if one could assign it to turn on the keyboard backlight.
There is no option to adjust the sensitivite of the light sensor for the keyboard, and i think that it kicks in way to late.
Find my self holding the finger over the sensor and hitting a button to make it light up.
Any one aware og a possible Reg Hack to make this option appear in the Assing Button list?
Melty said:
When yuo say anything else, does that include controlling the flashlight? Either way, thanks for the file.
Click to expand...
Click to collapse
I meant anything else with use, flushlight & the keyboard light do not have exe files in the buttons map menu :wink:
taiseer999 said:
& the keyboard light do not have exe files in the buttons map menu :wink:
Click to expand...
Click to collapse
Nope i know that :wink: thats why i'm asking if anybody knows of a hack or the whereabouts of such an exe file..... Any ideas??
why dont u just change the option in the settings\buttons\backlight and take the tick off the box, and it works like a charm. everytime u press a key it lights up, sorted, and it doesnt affect the battery at all really
@Elmo
Well i didn't use that choise because i don't have any car charger yet. (Waiting for the Brodit kit)
I want to preserve as much battery as possible.........as you already know, this baby can eat your battery pretty fast............
Re: Change the button
taiseer999 said:
Attached is a cab file allowing you to make use out of the light button to anything else :lol:
Click to expand...
Click to collapse
Is this the same as changing it manually on the registry?
Yes, it's my CAB file I posted a little while back that adds a registry entry so that you see it listed as "Button 5" in the Buttons setting applet.
elmo said:
why dont u just change the option in the settings\buttons\backlight and take the tick off the box, and it works like a charm. everytime u press a key it lights up, sorted, and it doesnt affect the battery at all really
Click to expand...
Click to collapse
God, didn't know it was that easy... cheers!
Anyone any idea how badly this affects battery life?
Re: Change the button
taiseer999 said:
Attached is a cab file allowing you to make use out of the light button to anything else :lol:
Click to expand...
Click to collapse
Isn'it available for the Wizard too ? ...
I wrote a very simple script that turn on the camera and press the flash button.
I use the flash key and ms voice command to start it
you need to have MortScript installed. (include with this package)
A very simple question from a new owner -- where are the buttons defined that are assigned in Settings - Buttons? I don't see them labeled as "Button 1", etc in the User Manual.
davidinnz said:
A very simple question from a new owner -- where are the buttons defined that are assigned in Settings - Buttons? I don't see them labeled as "Button 1", etc in the User Manual.
Click to expand...
Click to collapse
On your HTC Universal, go to:
Start>Settings>Buttons
From there you can change the assignments of the buttons.
Ok. I have found the 2 keyboard keys that are buttons 1 and 2, and the 2 external buttons that are buttons 3 and 4.
I must say that button 1 is not very useful for voice command, when the device is closed. I guess I could assign it to button 4 or button 5 with the registry hack.
On the supplied "headset", there is a microphone with a button on it.
- What does that button do?
- Is it possible to use it for Voice Command?
(I guess for that to happen, it first needs to be recognised as an assignable button in WM5).
The backlight button cab file is working. Now I can reassign that useless button becomes the OK button. Very useful when use it in the tablet mode. But I need two more buttons to use for the softkey. I have use the record button for the left softkey and have no more button for the right softkey. Any suggestion?
One more thing, the script for enabling the flash light does not work. It turns on the camera, but the flash light remains off.

Mapping to OK and Win buttons

Noting that neither AEBPlus or DoubleLauncher seem able to access the OK and Win buttons, are there any other methods to assign an action to double or other states of these buttons? For example, it would be great if I could assign "close/kill" to a double OK click, or launch Resco Explorer with a double Win button click. Right now, only the Browser and Comm Manager buttons seem to be assignable, and press/hold for the Browser seems fixed to VueFlo. With AEBPlus, press/hold for the Comm Manager button shows up separately but can be assigned. I got really used to quick launch on my Wizard. I am finding iLauncher to be an OK sub in some measure, given that lots of icons can show on the VGA screen, but miss a quick double-tap to launch a frequently-used program...
yes same for me, if somebody have a way to map these keys ...
Why hasn't this ***hole been banned from the forum yet? Its been 27 posts of spam so far.
I've banned him and removed his messages. This my leave a "hole" where they used to be, so FYI to anyone else - ladysovereigna has been permanently banned for spamming.
V
bebox said:
yes same for me, if somebody have a way to map these keys ...
Click to expand...
Click to collapse
Back to topic... anyone have an idea??
I think it can be done, bit I've never had an Athena to test it on. Will give it a go one day. Will have to get a rom dump and see how things have changed on the newer hardware.
Have you tried all the usual suspects, ie AE Button Plus?
V
vijay555 said:
I think it can be done, bit I've never had an Athena to test it on. Will give it a go one day. Will have to get a rom dump and see how things have changed on the newer hardware.
Have you tried all the usual suspects, ie AE Button Plus?
V
Click to expand...
Click to collapse
No luck with AE Button Plus...
I haven't tried the Win-button, but I've mapped the Ok button to ViJayOKButt (much better ) using AEButton Plus.
Moskus said:
I haven't tried the Win-button, but I've mapped the Ok button to ViJayOKButt (much better ) using AEButton Plus.
Click to expand...
Click to collapse
How were you able to do that? I don't see that button.
The Win-button can be displayed as an option (via Add Buttons menu). However, the new assignments don't seem to work.
The new assignment works. I select File -> Add Button, and click the OK-button. The code "4075" shows up, and I click the "Add Button" button p).
From my experience you can map the 'OK' button but mapping on this hardware key seems to be limited and no mapping to the 'Windows' key.
IRC the developers of AEbutton informed me that MS have reserved those buttons strictly for O/S use and that AE hadn't found a way around it yet...that was over a year ago, but it seems they have made no real progress in this area except for a little with the 'OK' button.
I believe Vijay is right though...it can be done...just takes someone really dedicated to finding the solution.
Bear in mind though that most PPC's have more buttons than the Athena...hence the reason why AE haven't 'possibly' done their best to resolve this, or maybe it causes to many problems..who knows?
I've done it before on other devices, some time back, but will have to investigate Athena at some point. Can anyone point me at a freely available rom file for it? I've never even seen the hardware..
pauvre V
Moskus said:
The new assignment works. I select File -> Add Button, and click the OK-button. The code "4075" shows up, and I click the "Add Button" button p).
Click to expand...
Click to collapse
I tried this, and "OK" did not show as an option. But one of the other buttons I added ended up with code 4075, and this now works. There is also an option for "Win" button but that doesn't work at all.
i have both of mine binded using ae button plus
what you do is instead of trying to select the button you hit add button and push the button you would like to bind
vijay555 said:
I've done it before on other devices, some time back, but will have to investigate Athena at some point. Can anyone point me at a freely available rom file for it? I've never even seen the hardware..
pauvre V
Click to expand...
Click to collapse
Hi Vijay.
Fellow member Antivirus has some good internal photos of the hardware and I think some other good info on the Ameo try this link. Antivirus.
lol, thanks mackaby007, but I don't need to see inside the device itself, just its rom. Although I would need to test on the device itself.
Anyway, just theoretical for now, need to see a rom.
V
boinger66 said:
i have both of mine binded using ae button plus
what you do is instead of trying to select the button you hit add button and push the button you would like to bind
Click to expand...
Click to collapse
So that's why I got such unpredictable results.. depended what I hit next. Hope this wasn't in the manual or user guide! I'd feel s-o-o-o foolish. Ha.
wgary said:
So that's why I got such unpredictable results.. depended what I hit next. Hope this wasn't in the manual or user guide! I'd feel s-o-o-o foolish. Ha.
Click to expand...
Click to collapse
actually if u look in the ae button screen when u try to add a button it does say push the button u would like to bind I also got 4075 and for the win key its 405B
I have mine binded and working

next or previous song/mp3 when using the vol up/down buttons while display is off

Hey guys
I just wanted to know if its possible to change the Volume up and Volume down buttons to Next Song and Previous Song while the Screen is off
while the screen is on it should be the volume control buttons of course
thanks for the help!
cmon!
39 Views
but No one???
i just found a Registry Entry in
HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\KEYBD\ContLessVKey
and
HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\KEYBD\ContMoreVKey
but both are set on "0"
it seems that i cant change anything here.
Easy...
DarkWolve said:
cmon!
39 Views
but No one???
Click to expand...
Click to collapse
Patience....it can take some time to get an answer, and you will win no friends by posting things like this. Also, there are MANY threads similar to this already.
I do not think it is possible to have the volume keys do one thing (track change) when the screen is off and another (volume) when the screen is on, but cannot say for sure.
That being said, something like what you are asking is possible. You can use a button mapping program like AE Buttons Plus (free, google it) to map a long press of your volume buttons to up/down arrows, and this will change tracks when screen is off. You can map single press of these buttons to volume up/down. Or you could do the reverse (single press change track, long press volume). Either way, the keys will always control volume in call.
I recommend messing around with various combinations until you get what you want. Also, try a search and see what others have done.
sry for that, wasnt meant to offend anyone!!! =/
and Thanks for that tip!
//EDIT
i just tried it now and it does work!
Hi
I am not entirely sure, but if you use S2U2 to lock your HD the volume keys will automaticely work as you wanted them to be as soon as you start your TF3D player and let the focus on it in TF3D. So in other words just start the player and lock the screen. Ready to go .
Hope you understand what I tried to explain. Best is, if you try it for yourself. Just search in the forum for the program S2U2.
Ascenca
DarkWolve said:
sry for that, wasnt meant to offend anyone!!! =/
and Thanks for that tip!
//EDIT
i just tried it now and it does work!
Click to expand...
Click to collapse
No problem Just thought I'd let you know since you appear to be new. Good luck!
I have this function. I have slide to lock and AEBplue installed.
AEBplus I have set single click as arrow down and up and double click as volumn.
When it is on the music screen, one click of the volumn lets me scroll up or down when the screen is off...

How dows one add/change a hardkey?

Hi, I did a lot of searching for this but I can't come up with any solution (which is odd as it strikes me to be a problem).
I bought voice commander yesterday as I'm on the road for my company a lot and all that works perfectly. So then I tried assigning it to a hardkey (is that the right word?) on my Touch HD (uk).
Apparently some incompetent interaction designer must have thought that it was a brilliant idea to only have one hardkey and bind that hard to making calls as well. Result? Me accidentally dialling 6 people out of the 7 times that I tried using it. I can only imagine what a horror it must be when I'm driving.
So here is the question; how do I add hardkeys to the buttons menu in the settings so I can assign stuff to those buttons? Any button really, preferably the 'hang up' button. Currently there is only 'button 1' but there must be a way of tapping into those other buttons.
I'm not shy of reg editing (it has to be a key or something in the registry) or anything like that but I can't seem to find a regeditor.
I'd try the HTC helpdesk but they don't know anything really beyond the standard questions (at least not the last 3 times I tried).
Zeus2.0 said:
Hi, I did a lot of searching for this but I can't come up with any solution (which is odd as it strikes me to be a problem).
I bought voice commander yesterday as I'm on the road for my company a lot and all that works perfectly. So then I tried assigning it to a hardkey (is that the right word?) on my Touch HD (uk).
Apparently some incompetent interaction designer must have thought that it was a brilliant idea to only have one hardkey and bind that hard to making calls as well. Result? Me accidentally dialling 6 people out of the 7 times that I tried using it. I can only imagine what a horror it must be when I'm driving.
So here is the question; how do I add hardkeys to the buttons menu in the settings so I can assign stuff to those buttons? Any button really, preferably the 'hang up' button. Currently there is only 'button 1' but there must be a way of tapping into those other buttons.
I'm not shy of reg editing (it has to be a key or something in the registry) or anything like that but I can't seem to find a regeditor.
I'd try the HTC helpdesk but they don't know anything really beyond the standard questions (at least not the last 3 times I tried).
Click to expand...
Click to collapse
Have you tried AEBPlus?
That requires me to run the program in the memory constantly doesn't it (and it's not freeware iirc)?
Zeus2.0 said:
That requires me to run the program in the memory constantly doesn't it (and it's not freeware iirc)?
Click to expand...
Click to collapse
Yes, it does takes some resources, but it gives a lot more functionality and improves the phone greatly.
For example,
You could ingle press to forward/repeat songs or change channel in FM radio, and long press to change volume.
You could single press the green button to either do nothing or start your VOIP phone if you have one, and double press to run the regular phone. (this prevents accidental dialing the last number)
Double press the back key to close active application
etc.
Hmmm, it's a last option solution for me. It's more a matter of principle. When I buy a phone like this, I expect to be able to have access to all buttons, not just one. It's a bit stupid that I need to run an extra app to actually use my phone properly. I mean; didn't anyone at htc think that just having one button is stupid and then assigning it to the dial button is just braindead thinking?
Right, gave that program a go but it doesn't seem to be working for me.
Zeus2.0 said:
Right, gave that program a go but it doesn't seem to be working for me.
Click to expand...
Click to collapse
That's because you're not familiar with how to use it yet, I think.
This is how yo use that software:
Say, you want to reassign the up volume button. First you might note that the initial defaultsetting is "do not touch button".
press and HOLD the up volume entry until
the screen for altering the setting appear.
Once that happens, the rest should be intuitively enough.
Remember later to save and exit. No need to soft reset.

Categories

Resources