yashsingh1/xdaforums huggingface dataset:
[Touch Diamond, MDA Compact IV Themes and Apps] jbrady33:
Update

it looks like !LOCKSUSPEND kinda works, but one little catch - it's not just ON connect, it is WHILE connected. Teh only way to hang up is with the bluetooth headset button, even the power button won't unsuspend the device if the call is still connected. any ideas?

Thanks!
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
The !LOCKSUSPEND will also lock the hardware buttons, when TouchLockPanelOnly = 0. While intiating the call, the hardware buttons are not locked. You can configure CommandCallConnected = !LOCKSUSPEND, when you want the phone locked when connected.
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
Are you sure you have set: EnableInputAtSuspend = 1 at the Other Settings screen (which is the default). Because this makes sure the power button is not locked when suspended.

You can enable debug logging (LogDebug = 1), reproduce the scenario and post the debug log file \TouchLockPro.log.txt at the root of your phone memory as zipped attachment, if this is not the problem.
[Touch Diamond, MDA Compact IV Themes and Apps] paalkr:
Hi!

Would it be possible to make a new command option, !UNLOCKSCREEN??

The idea is that this option only unlock the screen. This way the hardware buttons should still be locked. I think this feature would be great in combination with the TAPI Incoming function. This would ensure that the only way of answer a phone call is by sliding the phone canvas, because the hardware buttons are still locked.

Regards,

PK
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
It is strange that the screen is NOT locked, with LockTouchPanelOnly = 1.

Note that the upper right part (where the tasks menu is located) is not locked, all the other parts left from this should be locked. Is this the case? If not, can you create a debug log file (LogDebug=1), reproduce the scenario and post the log file \TouchLockPro.log.txt as zipped attachment. Maybe you did find a bug :confused:

I do not have a foreground window, so I cannot intercept button presses. The HTC API I use for locking the hardware keys, does not allow me to unlock some hardware keys, apart from detecting the presses.
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
The HTC API for locking the hardware buttons, also locks the TouchPanel. So I have no way to do that. I agree this would be very nice, but currently I do not know how to do that, without having a foreground window.
[Touch Diamond, MDA Compact IV Themes and Apps] jbrady33:
update

You were right, EnableInputAtSuspend was at 0. One trick though - check these combos out:

EnableInputAtSuspend=0 and !LOCKSUSPEND on connect = hardware red/green locked with screen but can't wake the phone up with the power button

EnableInputAtSuspend=1 and !LOCKSUSPEND on connect = the power button works now but the hardware red/green are also on and can wake up the phone.

Think there is anyway to do this that the power button always wakes up the phone but the hardware red/green can't?

A suggestion too - The main screen doesn't give visual feedback that a button was pushed (at least not on my Touch Pro, using touchflo3d). The buttons on the settings screen change color when you press them, that would be nice on the main icon menu as it is very slow to respond to an icon push (at least on my phone it is)

Still - great software, thanks!

JB
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
Version 2.5.5

I uploaded version 2.5.5, which would serve your needs:

light unlock on power ON, even when detectBluetooth=1 and/or locked via Stylus
[Touch Diamond, MDA Compact IV Themes and Apps] Kiekeboe100:
Don't know if this has already been asked. But would it be possible to have an option to use the windows locking?

In windows 6.5 this is actually useful.

To even help you a bit, in C# this is the easiest way to lock:

using System.Runtime.InteropServices;

public const int VK_F22 = 0x85;
public const int KEYEVENTF_KEYUP = 2;

[DllImport("coredll.dll", SetLastError = true)]
public static extern void keybd_event(byte bVk, byte bScan, int dwFlags, int dwExtraInfo);

keybd_event(VK_F22, 0, 0, 0);
keybd_event(VK_F22, 0, KEYEVENTF_KEYUP, 0);
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
CSDEVCTRL is the tool which uses the standard Windows Mobile lock, so maybe that is more suited for you?

Also in Windows Mobile 6.1, the standard Windows Mobile lock is of no use. Is there a difference in 6.5?
[Touch Diamond, MDA Compact IV Themes and Apps] Alkerion:
THANKS THANKS THANKS !!!

Just installed it now and performed a few quick tests, seems to be perfect :)

I'll see how it behave on everyday use and I'll let you know.

BR
[Touch Diamond, MDA Compact IV Themes and Apps] Aizek!:
Сould you make it as an option?

It is necessary for me that the light sensor did not work when the detectBluetooth=1.

pls
[Touch Diamond, MDA Compact IV Themes and Apps] paalkr:
Hi!

Regarding this thread: http://xdaforums.com/showthread.php?t=512614&page=2

The zoom bar on the TD2 works in the same way as the scroll wheel in the TD, and can be accessed and configured by the diamond tweak utility.

I really hope that you find a way access the zoom bar, so it becomes possible to unlock by sliding the zoom bar.

Regards,

PK
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
Ok, I will make an option for that in a next version. For now, just install 2.5.4, because this is the only change between 2.5.4 and 2.5.5.
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
Mr_Q has tested the low level NavSensor API of Diamond 1 on a Diamond 2 and unfortunately that did not work. Apparently, at low level the API has changed, but from the outside the Zoom in/out is given to the application. Because TouchLockPro is not the foreground window, I cannot catch those events, I think.

However, I have another breakthrough. I was searching already a long time for another way for catching hardware keys, while TouchLockPro is not the foreground window. And the good news is, this is working now on my Touch Diamond :eek: It is even not the HTC API I need for that :rolleyes: And also the power button is not locked anymore ;) so you can put the phone off without unlocking (e.g. for quickly checking the time). The HTC API also locks the TouchPanel, so now I can also lock *only* the hardware keys, if people want to use the Slide 2 Answer for protecting the TouchPanel presses.

So this gives the opportunity to let some keys unlocked (e.g. middle button, volume buttons), or a combination of keys to unlock the phone.

I discovered this only today, so I have to further elaborate it. And make choices how I make the configuration available. Because this gives a lot of possibilities, with people having their own preferences......
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
Eureka! Major breakthrough in locking/unlocking hardware keys

I have found a major breakthrough, to make TouchLockPro even more versatile as general purpose locking program.

Because TouchLockPro does not have a foreground window, I could only lock the hardware keys via the HTC API. Drawback of that approach:

- the power button is also locked

- all other keys are locked

- the TouchPanel is locked

- works only on newer HTC phones

So the only way to unlock was using all the available sensors (Light sensor, Stylus sensor, keyboard slider, GSensor, Capacitive NavSensor), which were also specific for the newer HTC's. Newer phones like Diamond 2 lack some sensors (NavSensor) and get new ones (ZoomBar).

But now I found a way to lock the hardware buttons in a general way, not relying on a specific HTC API :)

What possibilities does this give:

Power button is no longer locked, when locked, so you can just power off again (e.g. quickly checking the clock)

Possibility to unlock certain keys (e.g. Volume Up/Down, so you can silence the phone while locked)

Possibility to unlock the device via a key sequence (e.g. Volume Down/Up)

Possibility to unlock the TouchPanel only and keep the keys locked (Slide 2 Answer, when incoming call)

TouchLockPro will also work on other brands (although the sensors will not work). Because TouchLockAction is designed for VGA, configuration is easier on those phones having VGA.

Maybe I discover more possibilities with this key locking. Of course, ideas are welcome :)
[Touch Diamond, MDA Compact IV Themes and Apps] Kiekeboe100:
WM6.5 lock screen is a big improvement, you can see date/time, missed calls, new messages, ... The only thing I don't like about it is the screen it shows when someone is calling you.

I could take a look at csdevctrl, but I do have some more important stuff to do then figuring out how it works :)

It would be nice to be able to use your software, only the wm locking, and no locking on a phone call (slide 2 answer works fine for me). Of course unlocking with light sensor and such would be a little more difficult to implement, but i wouldn't use it.
[Touch Diamond, MDA Compact IV Themes and Apps] Mandragore:
Good news, well done!
[Touch Diamond, MDA Compact IV Themes and Apps] aguida:
This is wonderful news. When can we get it? :)

Two comments:

Please don't forget to implement the doubling of actions (locked/unlocked) for the capacitive sensor as discussed in my previous post :)

Please keep it simple. With the increase of possibilities the product of configuration possibilities and states of the phone might make the tool difficult to master.

With regard to point 2 I took the liberty to draw a state diagram that should summarize all the possible states and what the expected behaviour should be. More options will of course welcome, but at least the basics illustrated in the diagram should work predictably.

Notes to the diagram:

There are two sifferent "All unlocked" states depending on what the previous state was (partially/fully locked or unlocked). This is because the phone, after a call, should lock again if it was locked before the incoming call or stay unlocked if it was unlocked.

Point 1. solves also the problem of handling bluetooth separately. There is no need for a bluetooth setting as the phone should just stay in the same state as it was before the call came in.

The partially locked state (screen unlocked and keys locked) on incoming call should probably be an option as not everybody wants to use slide-2-answer. In this case the state should still be there (as it is used by the Answer by bluetooth and Unlock events) but since the screen will still be locked slide-2-answer will not work.

Hope this diagram will be of help for you in refactoring your code and any comment to it is really welcome.

Thanks a lot for this great tool.
[Touch Diamond, MDA Compact IV Themes and Apps] hgrimberg:
Hi ZuinigeRijder,

Maybe you know how to add the feature of locking just some keys and leave others unlocked as you just mentioned with the Volume keys:

On WM, under Settings, you can find "Key lock" and then you only have 3 options:

1) Lock all buttons except Power button

2) Lock (all) buttons if device is locked

3) Do not lock buttons

Maybe it is possible to add the option of: Lock all buttons except D-pad and Power button.

That could be cool

Thank you
[Touch Diamond, MDA Compact IV Themes and Apps] paalkr:
Hi!

This is the best news for a long time!!! Congrats on the find. I'm really looking forward the the new options that this can lead to, especially

1) lock only the HW buttons on incoming call (slid 2 answer phone canvas is then the only way of answering or rejecting a call)

2) slide zoom bar on the diamond2 for unlocking

Regards,

PK
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
Thanks for thinking with me and providing the state diagram. I do not need to rewrite TouchLockPro. I can add some settings and with that I can cover easily the states you did draw. First priority will be the different locking. The double capacitive commands will probably come after that.

Till now it looks very good. The only keys I cannot trap, are the power button, the Home key and Back key. But these do not execute commands, so that does not seem a problem. I have the settings screen already finished.

I am sure you will find the 5 differences :)
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
My locking is unrelated to the mentioned settings. See my previous post for the settings screen. Indeed you can configure which keys you want to keep unlocked and which keys unlock sequence (which can be the D-pad or a combination of keys).
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
For the slide zoombar I do not have a solution yet. The first one is indeed part of the TAPI settings screen (see 2 posts back).
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
Are those screenshots only shown when the Mobile 6.5 lock is activated?

And how do you unlock in Windows Mbile 6.5?
[Touch Diamond, MDA Compact IV Themes and Apps] hgrimberg:
How do you keep unlocked some keys? I installed your program, and I didnt find any settings to do this.

Also, you lock the screen but it doesnt turn off unless you press the power button? There is no way to lock and turn off the screen at the same time?

Thank you.
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
The unlocking of some keys will be part of version 2.6. I am working on that. So you did see a peek preview of the settings screen, not in any released version yet.

There is a LockScreen and LockSuspend command. The latter will do both, lock and suspend.
[Touch Diamond, MDA Compact IV Themes and Apps] paalkr:
Thanks for the great effort with the new functionality!

Can you give us any clues on when the next release will be ready for testing?? :D

Regards,

PK
[Touch Diamond, MDA Compact IV Themes and Apps] hgrimberg:
Ok, thank you, ZuinigeRijder. I'll wait until version 2.6 to see how I can I unlock just some keys.

My power button is broken and this will be my only salvation to turn on the phone by being able to use the D-PAD for example that is a nicer key and not so easy to be touched by mistake.

Thank you very much and congratulations for your great program!
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
I hope beginning of next week. But I have a job and a family, so I have to do this in my spare time. Sometimes adding functionality goes pretty fast, sometimes it takes more time. So no real promises ;)
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
Bad luck for you. Do you now awake the phone via Stylus Out?

Because that is the other way to awake your phone. Default it will locksuspend already with the stylus, by taking the Stylus Out/In within the configured time. This is all possible already with the current version.

I will not unlock keys at suspend, so if that is what you are expecting, than I must disappoint you. Of course you can configure that your phone will unlock on any key (Windows Mobile setting) and let TouchLockPro lock all keys, but probably your phone will then awake often in your pocket, draining battery.
[Touch Diamond, MDA Compact IV Themes and Apps] Laban:
Looks like a great software but for now I only want the soft reset functionality. How do I disable all the other functions and leave all the sensors and stuff as it is in standard on my Diamond2?

EDIT:

Is there a way to just keep the soft reset application on my phone and delete the rest?

Also, when uninstalling does it restore all the original TD2 settings?
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
TouchLockPro does not change settings on your TD2, all the (registry) settings are only for TouchLockPro.

If you only want TouchLockAction, you can do the following:

1. Install TouchLockPro

2. Copy TouchLockAction.exe (in %Program Files%\TouchLockPro directory to any other directory

3. Deinstall TouchLockPro (you only need TouchLockAction :)

4. Make a shortcut to TouchLockAction.exe (e.g. in Programs menu)
[Touch Diamond, MDA Compact IV Themes and Apps] Kiekeboe100:
These are two screen from the 6.5 lock.

First one is the "standard", and then you can see more details by sliding the little icon downwards. If you slide the icon horizontal the phone is unlocked.

Second screen is the more detailed one (sliding down), in which you can then slide each of the icons horizontal to go straight to the new message, missed call, ...

I tried the csdevctrl program, but it keeps locking the phone when there is an incoming call. Didn't have the time to really look into it.
[Touch Diamond, MDA Compact IV Themes and Apps] Laban:
Thanks!

No offense, the program looks awesome but I guess I have to get familiar with WM6.1 before trying to modify it :)
[Touch Diamond, MDA Compact IV Themes and Apps] Mark Crouch:
If you only want to soft-reset.........

If you're just looking for something to do a soft-reset, check out "PSShutXP" (search xda-devs for it ;)) or there's another variation here if you fancy giving that a try.

Hope that helps,

Mark.
[Touch Diamond, MDA Compact IV Themes and Apps] Laban:
Thanks for the help!
[Touch Diamond, MDA Compact IV Themes and Apps] ecard:
I have one problem with this. When I receive a call with bluetooth on and the phone is in my belt case (no light), the phone stays locked. But when the call ends, the phone unlocks.

Thanks,

Eric
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
Hi Eric, I checked my code and I cannot explain this. I think it is not related to the new low level keyboard hook and probably it is also wrong then in version 2.5.4.

Can you enable debug logging, reproduce the problem and post the debug log file. Maybe that gives me a clue.

Thanks.
[Touch Diamond, MDA Compact IV Themes and Apps] illi:
Works Great On Topaz Diamond2

Hi ZR

I wish to report that your 2.5.6 works great on my Touch Diamond2 (Topaz). My settings are as follows:

Keyboard:

-Use Slider = Yes

-Suspend On Slider In = Yes

-Slider Out Disables LockMode = Yes

-HTC Lock API = No; if set Yes it locks me out and a reset is necessary

-EnableinputAtSuspend = Yes

UnlockedKeys = blank

UnlockkeySequence = 118,118,117 (so volume down x2 & volume up x1 unlock my device)

Telephone API

- Use TAPI = Yes (the rest blank)

Other settings

-AutoLockOnPowerOn = Yes

-SuspendOnBackLightOff = Yes

-Beep = Yes

However, when lock, my Home and LongPress End Call keys are active but screen is locked. And when powering up from a reset (hard/soft) doesnt place the device in lock mode. It doesnt AutoLock too!

I hope this info helps you with your development.

THANKS for a very useful software.

illi
[Touch Diamond, MDA Compact IV Themes and Apps] ecard:
I just reproduced it with the log.

Thanks
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
Good to hear it works great on the Diamond 2 :)

I knew already I could not lock the Home and Back button, but apparently that is the same for the Long End key. I have configured the Long End key as to show the menu options, so it will not use the Windows Auto lock.

Probably I cannot do much about it.

I cannot understand the "HTC Lock API = No; if set Yes it locks me out and a reset is necessary", I could not reproduce. But you will not use the HTC Lock API, I assume ;)

When there is a soft reset, TouchLockPro will not lock automatically if it was locked before. It starts fresh unlocked by design. Otherwise you cannot fix problems, when there is something wrong with a setting.

Thanks for testing and letting me know the results :D
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
I could not find the log with version 2.5.6. There were also 2 TouchLockPro.log.txt log files in it. Can you point out the correct log file and the time you did reproduce :confused:
[Touch Diamond, MDA Compact IV Themes and Apps] ecard:
I'm still using version 2.5.5. Here my logs again.
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
Thanks for providing the log files.

I found the problem. The end-call is triggered at power on.

In that situation I did not check for bluetooth active, so it unlocked.

I will fix this in the upcoming version 2.6

I hope I get reactions soon from people who did try the Test version 2.5.6 (one response till now :mad:). Because if that is positive, I can post the new version really soon.

In the mean time, I managed to add LED control as a bonus, so it is more clear the phone is locked. When the phone is locked, you can configure the LED's to be on. On my Touch Diamond I could configure the LED's as a nice "Pulse center led anticlockwise spiral twice, pause and repeat".
[Touch Diamond, MDA Compact IV Themes and Apps] ecard:
Super :D

The LED is a great feature. It's not too hard on the battery?

Since I was not directly implicated, I didn't want test 2.5.6 beta. This explain why I was waiting for the official release :)

Thanks,

Eric
[Touch Diamond, MDA Compact IV Themes and Apps] bdemarco:
I did briefly try the 2.5.6 beta on my Verizon touch pro. I was able to configure TLP to unlock on a center button click, which is something that I've wanted for awhile. However, that click is passed on to the OS, which is not desirable. For the center button in particular, passing the click to the OS can cause unwanted actions. Could you change your hook to drop whatever keypresses are seen before unlock, if those keys are not set to be unlocked?

Great work on the recent versions! Like others in this forum, I appreciate the bluetooth feature, although it will not be very useful to me until it is sensitive to the connection state (i.e., TLP only changes its behavior when a bluetooh headset is actually connected).

The LED feature is interesting, but won't this rapidly drain the battery?

Cheers,

Brian DeMarco
[Touch Diamond, MDA Compact IV Themes and Apps] Slide:
Hi ZuinigeRijder,

i have a problem with the V2.5.6 beta.

When I switch on my Diamond the Indicator shows locking, but the touch screen it is not locked!

I can use the whole screen even though it is locked.

Greeting

Slide
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
Thanks for your valuable comments. So you see, although I tested myself, some problems still come up.

Ok, I have checked the behaviour and I could reproduce. The good news is that I *CAN* block the Middle button, but apparently I unlock it too soon. I thought the middle button was blocked, but when you select a file in the explorer, lock the phone, indeed the file is executed when it unlocks via the middle button. It blocks however, when the middle button is not specified as unlock sequence. This means I can do something on this one. I will try to find a solution (e.g. only detect key up or maybe there is still another key code fired).

The LED is configurable (default off, because I do not know if the LED numbers for other types of phones are the same). The LED will only be on, when LOCKED within 30 seconds after power on and when not suspended. So the LED will typically only operate very short (till unlocked or going to suspend again). And the battery consumption of the LED is neglectable, also when you compare this with the display, backlight and CPU. But in combination with the middle button unlocking and flashing around the middle button, this gives a nice indication which button to use for unlock.

I will try to fix the middle button problem.

Stay tuned.
[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
Strange, I had this problem also once. Even instaaling older versions, the touchpanel was not locked. After deinstalling TouchLockPro and powering the phone totally off (even soft reset did not help :confused:) and again installing TouchLockPro solved the problem :confused:

Maybe that is the case with you too?

It can also be some settings. Can you post a debug log file, so maybe that gives me a clue.
[Touch Diamond, MDA Compact IV Themes and Apps] Slide:
After deinstalling and installing now it works!

Where can I find the log file?

In \Programme\TouchLockPro\ is nothing. :confused:

Greeting

Slide
[Touch Diamond, MDA Compact IV Themes and Apps] rivit:
I recognized this behaviour too sometimes, i mean this problem has always take effect after disconnecting from usb cable?!