[Touch Diamond, MDA Compact IV Themes and Apps] ZuinigeRijder:
Test version 2.5.6: *NEW* hardware keys locking method

Ok, I decided to post a test version of the NEW method of hardware key locking. Although I tested it already, I want experiences on other phones too, before putting it as a release version.

I will describe the settings below the screenshots:

HTCLockAPI (HTCLockAPI = 0)

There are 2 methods for locking the hardware keys in TouchLockPro. The HTC Lock API, locks all the keys (including the power button) and the TouchPanel. This HTC Lock API is only available on the newer HTC phones.

The other (new) key lock method is a general locking method, using a low level keyboard hook, which also works on other types of phones.

# This keyboard hook keeps the power button unlocked and the press is not detected.

# The TouchPanel is not locked (TouchLockPro has a separate TouchPanel hook)

# This makes it possible also to lock only the hardware keys (e.g. in combination with Slide 2 Answer at incoming call)

# The Home and Back keys are blocked, but still they are detected by the phone, so when pressed, the phone will still go to the Home screen.

# The general keyboard hook, makes it possible to unlock more keys or detect keys pressed, so also an unlock key sequence can be specified.

# On my Touch Diamond, unlocking the VolumeUp and VolumeDown does not work correctly. Although unlocked, the change is detected, but the volume will not change, while the volume screen is shown. Therefore the keyboard hook is only applied when locked, to avoid side effects like just mentioned.

Default it will use the general lock method. If you want the HTC Lock method, overrule this registry key with "HTCLockAPI = 1"

EnableInputAtSuspend (EnableInputAtSuspend = 1)

The HTC Lock API also locks the power button. To avoid power on button problems for some people/phones in combination with HTC Lock API (you enabled this one), this one is enabled by default. When using the general keyboard lock method, this setting does not have an effect. Overrule this registry key with "EnableInputAtSuspend = 0", if you do not want the power button unlocked at power off.

UnlockedKeys (UnlockedKeys = )

This setting does only have effect, with setting "HTCLockAPI = 0". Default no keys are unlocked. You can specify which keys you want to be unlocked. You must specify the decimal key values, separated by a space, comma or semicolon. For a list of virtual key codes, see here

A list of the most important keys:

# 8 = Back: VK_TBACK/VK_ESCAPE = 0x08

# 37 = Left: VK_TLEFT = 0x25

# 38 = Up: VK_TUP = 0x26

# 39 = Right: VK_TRIGHT = 0x27

# 40 = Down: VK_TDOWN = 0x28

# 91 = Home: VK_THOME = 0x5B

# 114 = Talk: VK_TTALK = 0x72

# 115 = End: VK_TEND = 0x73

# 117 = VolumeUp: VK_TVOLUMEUP, 0x75

# 118 = VolumeDown: VK_TVOLUMEDOWN, 0x76

# 129 = Power: VK_TPOWER = 0x81 (cannot be detected)

# 130 = Red Key: VK_REDKEY = 0x82

# 134 = Middle button: VK_ACTION 0x86 (at least on my Touch Diamond)

UnlockKeySequence (UnlockedKeySequence = )

This setting does only have effect, with setting "HTCLockAPI = 0", Default you cannot unlock with a key sequence. You can specify a key sequence (one or more keys) to unlock the phone. You must specify the decimal key values, separated by a space, comma or semicolon. See previous setting for the possibilities for the keys.

KeysOnly (LockWhenIncomingKeyOnly = 0)

Default it will default lock (so including TouchPanel). If you only want the keys locked at incoming call (e.g. you have a Slide 2 Answer and want to take the phone via the slider), you can enable this setting.

DetectBluetooth (DetectBluetooth = 0)

With this setting enabled, you can keep the phone locked when Bluetooth radio is on, do not unlock by light sensor and do not execute TAPI commands. By default this setting is disabled, if you want the bluetooth detection, enable this setting.

DetectBluetoothLightUnlock (DetectBluetoothLightUnlock = 1)

This setting only has effect when DetectBluetooth is set. With this setting enabled, it will unlock on light sensor, when the Bluetooth radio is on. If you do not want this behaviour with DetectBluetooth, overrule this setting with "DetectBluetoothLightUnlock = 0".