Hold a button to start a program - HD2 Windows Mobile 6.5 Themes and Apps

Hello, i want to custom the HTC'Button
I don't know how to do that, but i know it's in Base register
For ComManager i know it's
Code:
HKLM\Microsoft\Shell\Keys\40C6
default = \Window\CommManagerLink.exe (pour l'exemple) (String Value)
Flags = 0 (DWORD Value)
Icon = \windows\SendKeyIcon.exe, 0 (String Value)
Name = Send key(Hold) (String Value)
And it work
and now i want to start TaskManager with the windows button...
Please help me! Sorry about my English

Just use AE Button Plus.
The easiest and the best.

Related

Default Opera input.ini

I accidentally messed up part of my input.ini file and can't find a copy of the original online. Opera comes as part of the stock ROM (x7501) so I don't have a CAB I can just reload.
What I am looking for is in the [Browser Widget] section; what is the mapping for "Enter"? When I have a link selected now, and click Enter, it does not follow the link. Stupid question, I know, but any help would be appreciated.
[Browser Widget]
Left = Navigate left
Right = Navigate right
Up = Navigate up
Down = Navigate down
6 = Page up
9 = Page down
3 = Go to start
Enter = Focus form | Activate element
Tab = Focus next widget
Tab shift = Focus previous widget
Space = Page down
Space shift = Page up
PageDown = Page down
PageUp = Page up
Just out of interest, has anyone found a way to use the wheel to zoom? I don't want to use the keyboard all the time (A, B, C etc.)
Looking at the input.ini file I don't see how you can customise that.

Help for run program exe when rotate with script, manila control, m2d

Hello,
I need your help smile.gif
I explain
With this script ( mortscript ):
Code:
flag = Question ( "Do you want to launch TouchFLO?", "Startup", "YesNo" )
if ( flag = 0 )
RotAngle = -1
endif
While (RotAngle > -1)
RotAngle = RegRead ("HKLM", "\system\GDI\Rotation", "Angle" )
if ( RotAngle <> PrevAngle )
if ( RotAngle > 0 )
flag = ProcExists ("Manila2d.exe")
if ( flag eq TRUE )
Kill ("Manila2d.exe")
endif
Sleep (10)
else
mywindow = ActiveWindow ()
if ( mywindow eq "Desktop" )
if ( ProcExists ("Manila2d.exe") ne TRUE )
Run "\windows\Manila2d.exe"
endif
Sleep (20)
endif
endif
else
if ( RotAngle = 0 )
mywindow = ActiveWindow ()
if ( mywindow eq "Desktop" )
if ( ProcExists ("Manila2d.exe") ne TRUE )
Run "\windows\Manila2d.exe"
endif
Sleep (20)
endif
endif
endif
PrevAngle = RotAngle
Sleep (10)
endwhile
When i rotate my screen, TouchFlo Disable
But
I want when rotate my screen, TouchFlo Reduce
I can do it with Manila Control ( MastSogo_MC_WWE ) and the M2D_Ctrl file's !
Can you help me please ?

[XT720] Remapping the Hardware MEDIA button (next to camera button)

hey guys, I want to remap the hardware MEDIA key (the one next to the camera/focus button) on my xt720, but I cannot seem to find it in qwert.kl or any other files. I have successfully remapped any of the 4 touch-sensitive keys (home, menu, back, search) and the camera/focus key as well, but I can't figure out what the media key is. if anyone have any idea please let me know
I want to change the Media key to turn on and off the autofucus LED to use it as a flashlight on off switch.\
This is what i have been able to find so far.\
http://forum.xda-developers.com/showthread.php?t=939644&page=130
Looks promising...
I think this thread should be moved to DEV.
hellmonger said:
I want to change the Media key to turn on and off the autofucus LED to use it as a flashlight on off switch.\
This is what i have been able to find so far.\
http://forum.xda-developers.com/showthread.php?t=939644&page=130
Looks promising...
I think this thread should be moved to DEV.
Click to expand...
Click to collapse
What's strange is that if you look at the qwerty.kl from Motorola for eclair on the XT720 and froyo on the Korean XT720 they are identical--but both MODE_CHANGE and 112 are not included. Dexter's copy with the MODE_CHANGE and 112 comes from the leaked froyo Milestone A85x. They've been on my radar as files that never change and remain constant over all Motoroi and XT720 releases, but that were changed in Dexter's ROM.
Mioze7Ae said:
What's strange is that if you look at the qwerty.kl from Motorola for eclair on the XT720 and froyo on the Korean XT720 they are identical--but both MODE_CHANGE and 112 are not included. Dexter's copy with the MODE_CHANGE and 112 comes from the leaked froyo Milestone A85x. They've been on my radar as files that never remain constant over all Motoroi and XT720 releases, but that were changed in Dexter's ROM.
Click to expand...
Click to collapse
Yeah i noticed that to.... i think that 112 is incorrect. Just some speculation here but i think the issue is in the framework... need to modify it for the correct key to be recognized....
!!!!!REQUEST HERE!!!!!
If anyone is stuck re-flashing original stock 2.1.1 please run this https://github.com/chrisboyle/keytest/downloads
Also please validate if you have /system/usr/keylayout/sholestabletp3str-keypad.kl and paste output of that file.
I think i might be on to something here...
Well, when we set keycode 112 and other action, like media_next e.t.c. we get what action is must do.
fjfalcon said:
Well, when we set keycode 112 and other action, like media_next e.t.c. we get what action is must do.
Click to expand...
Click to collapse
Where you able to get 112 to do anything?
I think I accidentally an important word there. Just to clarify in case of confusion I meant
Mioze7Ae said:
They've been on my radar as files that never change and remain constant over all Motoroi and XT720 releases, but that were changed in Dexter's ROM.
Click to expand...
Click to collapse
in qwerty keymap.
xavwanted do such thing in his mod.
Sent from my XT720 using XDA App
From 2.1 Russian Rom:
Menu key:
Keycode: 82
KeyEvent: KeyEvent{action=0 code=82 repeat=0 meta=0 scancode=139 mFlags=72}
Back key:
Keycode: 4
KeyEvent: KeyEvent{action=0 code=4 repeat=0 meta=0 scancode=158 mFlags=72}
Search key:
Keycode: 84
KeyEvent: KeyEvent{action=0 code=84 repeat=0 meta=0 scancode=217 mFlags=72}
Gallery key:
Keycode: 92
KeyEvent: KeyEvent{action=0 code=92 repeat=0 meta=0 scancode=112 mFlags=8}
Camera shutter key:
Keycode: 80
KeyEvent: KeyEvent{action=0 code=80 repeat=0 meta=0 scancode=211 mFlags=8}
Volume Up key:
Keycode: 24
KeyEvent: KeyEvent{action=0 code=24 repeat=0 meta=0 scancode=115 mFlags=8}
Volume Down key:
Keycode: 25
KeyEvent: KeyEvent{action=0 code=25 repeat=0 meta=0 scancode=114 mFlags=8}
Click to expand...
Click to collapse
As we can see - scancode for keycode 92 - 112...
And that sholestabletp3str_keypad
fjfalcon said:
From 2.1 Russian Rom:
As we can see - scancode for keycode 92 - 112...
And that sholestabletp3str_keypad
Click to expand...
Click to collapse
So this sholestabletp3str-keypad.kl is the original from 2.1.1?
Also i would need to get my hands on sholestabletp3str-keypad.bin in /system/usr/keychars/
I love it when a plan comes together
Yes, it's original.
hellmonger said:
So this sholestabletp3str-keypad.kl is the original from 2.1.1?
Also i would need to get my hands on sholestabletp3str-keypad.bin in /system/usr/keychars/
I love it when a plan comes together
Click to expand...
Click to collapse
Here are all the /system/usr/keychars and /system/usr/keylayouts from
SHOLS_U2_02.36.0 (Milestone eclair)
SHOLS_U2_05.26.0 (Milestone froyo)
STR_U2_01.1E.0 (XT720 eclair UK)
STR_U2_04.1E.1 (XT720 eclair US/CBW)
STSKT_N_79.11.39R (Motoroi eclair)
STSKT_N_79.33.50R (Motoroi froyo)
stock221v13 (Dexter froyo)
Mioze7Ae said:
Here are all the /system/usr/keychars and /system/usr/keylayouts from
SHOLS_U2_02.36.0 (Milestone eclair)
SHOLS_U2_05.26.0 (Milestone froyo)
STR_U2_01.1E.0 (XT720 eclair UK)
STR_U2_04.1E.1 (XT720 eclair US/CBW)
STSKT_N_79.11.39R (Motoroi eclair)
STSKT_N_79.33.50R (Motoroi froyo)
stock221v13 (Dexter froyo)
Click to expand...
Click to collapse
PERFECT!!! Ok il get right on this...
OK!
So i am able to get the autofucus LED to light up by pressing the Media key!!!!
.
BUT!
only with the camera app open..
I have to keep it pressed to keep the light on i would need to speak to the guy that wrote that APK for LightXT im sure we could get something going here...
see the problem is basically the app runs the command echo 1 > /sys/class/leds/af-led/brightness and echo 0 > /sys/class/leds/af-led/brighness when pressing the button but more complex. which requires root for some reason. if there is way to map the key to run the command it might work. unless someone can create a script that runs when the button is pressed that has that command. my brother the creator of the app doesnt think its possible to map the key to the light on and off but we can try he has a droid x so he cant really try out things with out me being there.
easye420 said:
see the problem is basically the app runs the command echo 1 > /sys/class/leds/af-led/brightness and echo 0 > /sys/class/leds/af-led/brighness when pressing the button but more complex. which requires root for some reason. if there is way to map the key to run the command it might work. unless someone can create a script that runs when the button is pressed that has that command. my brother the creator of the app doesnt think its possible to map the key to the light on and off but we can try he has a droid x so he cant really try out things with out me being there.
Click to expand...
Click to collapse
So this is great!!!!
make a entry that is something like
IF = echo 0 > /sys/class/leds/af-led/brightness THEN DO echo 1 > /sys/class/leds/af-led/brightness
If = echo 1 > /sys/class/leds/af-led/brightness THEN DO echo 0 > /sys/class/leds/af-led/brightness
Is this possible? i bet extensive framework modification is required...
Maybe making an app that translates the media keys request? some that will read state of /sys/class/leds/af-led/brightness that should be possible!!!!
hellmonger said:
So this is great!!!!
make a entry that is something like
IF = echo 0 > /sys/class/leds/af-led/brightness THEN DO echo 1 > /sys/class/leds/af-led/brightness
If = echo 1 > /sys/class/leds/af-led/brightness THEN DO echo 0 > /sys/class/leds/af-led/brightness
Is this possible? i bet extensive framework modification is required...
Maybe making an app that translates the media keys request? some that will read state of /sys/class/leds/af-led/brightness that should be possible!!!!
Click to expand...
Click to collapse
It should be easy to make a setuid binary that toggles the value each time you press the button. Can you set the button to call a unix binary or do you have to cover it with java?
Mioze7Ae said:
It should be easy to make a setuid binary that toggles the value each time you press the button. Can you set the button to call a unix binary or do you have to cover it with java?
Click to expand...
Click to collapse
Can you map button presses directly to executables? Here's a suid binary that toggles the light. For example, put it in /system/xbin/toggle-af-led and
Code:
chown 0:0 /system/xbin/toggle-af-led
chmod 6755 /system/xbin/toggle-af-led
Then every time you run /system/xbin/toggle-af-led the light will toggle on or off. It shouldn't be too hard to wrap this in the framework if necessary. I had to do that for the extended power controls to create the /cache/.boot_to_or file.
Source
Code:
#include <stdio.h>
#include <unistd.h>
int main()
{
FILE* fid;
char c;
setuid( 0 );
fid = fopen("/sys/class/leds/af-led/brightness", "r");
fread(&c, 1, 1, fid);
fclose(fid);
if (c == '0')
c = '1';
else
c = '0';
fid = fopen("/sys/class/leds/af-led/brightness", "w");
fwrite(&c, 1, 1, fid);
fclose(fid);
return 0;
}
Mioze7Ae said:
Can you map button presses directly to executables? Here's a suid binary that toggles the light. For example, put it in /system/xbin/toggle-af-led and
Code:
chown 0:0 /system/xbin/toggle-af-led
chmod 6755 /system/xbin/toggle-af-led
Then every time you run /system/xbin/toggle-af-led the light will toggle on or off. It shouldn't be too hard to wrap this in the framework if necessary. I had to do that for the extended power controls to create the /cache/.boot_to_or file.
Source
Code:
#include <stdio.h>
#include <unistd.h>
int main()
{
FILE* fid;
char c;
setuid( 0 );
fid = fopen("/sys/class/leds/af-led/brightness", "r");
fread(&c, 1, 1, fid);
fclose(fid);
if (c == '0')
c = '1';
else
c = '0';
fid = fopen("/sys/class/leds/af-led/brightness", "w");
fwrite(&c, 1, 1, fid);
fclose(fid);
return 0;
}
Click to expand...
Click to collapse
OMFG!!!! you rock so hard!!!
Il work on this when i get home
Fiiiiiiiiiiiiiiiiiiiiinally im home!!!!!!!!!!
Ok moar woark!!!
i had an idea... X had previously re-mapped this button to something else... maybe he has an idea....
Im inviting X in on this too

Add leading 0 (zero) on lockscreen clock

Hi guys - Happy New Year.
Can anyone tell me how to add a leading '0' (zero) to the lockscreen clock?
I have used a large number of lockscreens, NONE of them have a leading zero. I am using 24hour time. I have the leading zero on the home tab, and on the top taskbar menu. I cannot seem to get it on the lockscreen.
eg: Lockscreen shows 8:00. I want 08:00.
Thanks in advance.
PS - I can get the zero with lockscreen widgets in CHT2. BUT I want it without any widget add ons.
Try Start-Settings-System-Regional Settings-Time [Page]-Time style HH:mm:ss
hgalanos said:
Hi guys - Happy New Year.
Can anyone tell me how to add a leading '0' (zero) to the lockscreen clock?
I have used a large number of lockscreens, NONE of them have a leading zero. I am using 24hour time. I have the leading zero on the home tab, and on the top taskbar menu. I cannot seem to get it on the lockscreen.
eg: Lockscreen shows 8:00. I want 08:00.
Thanks in advance.
PS - I can get the zero with lockscreen widgets in CHT2. BUT I want it without any widget add ons.
Click to expand...
Click to collapse
Thanks for your reply. I have changed the regional settings to:
hh:mm:ss and also
HH:mm:ss
Nothing happens. The flip clock stays without a zero.
If you are looking for lockscreen with leading zero try manals Windows LockScreen V4 http://forum.xda-developers.com/showthread.php?t=854047
with settings below it have leading zero for sure. (This is standard windows lockscreen modification, not CHT)
hgalanos said:
Thanks for your reply. I have changed the regional settings to:
hh:mm:ss and also
HH:mm:ss
Nothing happens. The flip clock stays without a zero.
Click to expand...
Click to collapse
The Touch x 24 hours clock fixes the alarm and lockscreen so they now appear as 08:00.
However nothing I have tried works for the home screen flip clock.
Anyone?
Try reg:
[HKEY_LOCAL_MACHINE\nls\overrides]
"STFmt"="HH:mm:ss tt" // (Ex: 08:00 AM or 20:00 PM)
"SSDte"="dd-MM-yyyy" // (Ex: 08-01-2011)
Yep, already tried/checked that. It is as you wrote it.
ALL clocks are showing leading zero, just not Manila home flip clock. Very strange.
Surely there is a way to change it.
hgalanos said:
Yep, already tried/checked that. It is as you wrote it.
ALL clocks are showing leading zero, just not Manila home flip clock. Very strange.
Surely there is a way to change it.
Click to expand...
Click to collapse
It will be controlled by the LUA script for the CHT main clock (assuming it is the main one with various flip/analog/weather options. I'll have a look over the weekend if you like?
Would I be safe in assuming you've already gone to the manila settings tab, date & time and then ticked 24-hour format?
Swarvey said:
Would I be safe in assuming you've already gone to the manila settings tab, date & time and then ticked 24-hour format?
Click to expand...
Click to collapse
Yes you would be safe in assuming this.
As per the ealier threads, time format, local settings have all been checked and changed. Even the registry. Nothing changes the flip clock have a leading zero.
Depending on what version of cht or sense you have it will be in the lua. There should be a statement near the top that says "shouldhideleadingzeros = true" you just need to change it to false and recompile.
EDIT:
Looked into it a little more for you and the file is 5fa4d4b7_manila from your stock sense.
Code:
-- Decompiled using luadec 3.2.2beta -- Tue Jan 11 10:19:35 2011
-- File name: 5fa4d4b7_manila
trace("Loaded digital clock\n")
TabHalf = {Tab = nil, HighDigit = nil, LowDigit = nil}
UV = {UP = 0.26171875, DOWN = 0.5234375}
TabHalf.new = function(l_1_0, l_1_1)
if not l_1_1 then
l_1_1 = {}
end
setmetatable(l_1_1, l_1_0)
l_1_0.__index = l_1_0
return l_1_1
end
TabFlip = {Time = 0, TimeDifference = 0, ShowingTime = 0, WrapAroundNumber = 0, StartValue = 0, [B][COLOR="Red"][B]ShouldHideLeadingZeros = true[/B][/COLOR][/B], TopTab = nil, TopTabFlip = nil, BottomTab = nil, BottomTabFlip = nil, LastDuration = -1, UseAltTiming = false, rotatecount = 1, getDuration = function(l_2_0)
if l_2_0.UseAltTiming then
Wow, I have stock version of 1.72 WWE ROM.
It sound like you are on a winner.
I will check this out tonight when I get home and see what I can do.
Thank you for the information, I will be sure to let you know what happens.
mrhayami said:
Depending on what version of cht or sense you have it will be in the lua. There should be a statement near the top that says "shouldhideleadingzeros = true" you just need to change it to false and recompile.
EDIT:
Looked into it a little more for you and the file is 5fa4d4b7_manila from your stock sense.
Code:
-- Decompiled using luadec 3.2.2beta -- Tue Jan 11 10:19:35 2011
-- File name: 5fa4d4b7_manila
trace("Loaded digital clock\n")
TabHalf = {Tab = nil, HighDigit = nil, LowDigit = nil}
UV = {UP = 0.26171875, DOWN = 0.5234375}
TabHalf.new = function(l_1_0, l_1_1)
if not l_1_1 then
l_1_1 = {}
end
setmetatable(l_1_1, l_1_0)
l_1_0.__index = l_1_0
return l_1_1
end
TabFlip = {Time = 0, TimeDifference = 0, ShowingTime = 0, WrapAroundNumber = 0, StartValue = 0, [B][COLOR="Red"][B]ShouldHideLeadingZeros = true[/B][/COLOR][/B], TopTab = nil, TopTabFlip = nil, BottomTab = nil, BottomTabFlip = nil, LastDuration = -1, UseAltTiming = false, rotatecount = 1, getDuration = function(l_2_0)
if l_2_0.UseAltTiming then
Click to expand...
Click to collapse
ok so I couldn't wait and though I would give it a go now. I have found the same Manila file you have listed, I also downloaded lua utility. How doesn this work, I ran it on my pc and nothing happens.
How can I edit the file?
hgalanos said:
ok so I couldn't wait and though I would give it a go now. I have found the same Manila file you have listed, I also downloaded lua utility. How doesn this work, I ran it on my pc and nothing happens.
How can I edit the file?
Click to expand...
Click to collapse
Well I suggest downloading the manila kitchen by 12 and kilaireg found here:
Thread
It will tell you how to run everything you need but the down and dirty is this.
Copy the manila file into this directory "kitchen>_source>file>xxxx_manila
then use the command prompt link and drag the file manilatool.cmd into the cmd window.
your main commands are going to be as followed in order:
-oem:2.5
-mnf:2.5
-dec
(now that it is decompiled you will be edit the lua in notepad save and then move to the next step.)
Notice: not all files will decompile correctly and you may have to tweak it to get it to decompile correctly.
-cmp (only if it does not fully decompile aka. you have the file in your incomplete folder.)
-rec (will recompile the file which you can then put on your device and enjoy)
I know it isn't much but as I said they have detailed info in the pack.
In case anyone is still trying to figure this out.
I installed the latest 314 WWE ROM and it supports a leading zero on the original manila clock.
Awesome.
hgalanos said:
Hi guys - Happy New Year.
Can anyone tell me how to add a leading '0' (zero) to the lockscreen clock?
I have used a large number of lockscreens, NONE of them have a leading zero. I am using 24hour time. I have the leading zero on the home tab, and on the top taskbar menu. I cannot seem to get it on the lockscreen.
...
Click to expand...
Click to collapse
If you set PocketShield clock display to 24h it will display the leading 0
NO fix as yet.
Guys,
I have to apologise, I don't know what planet I was on, but the new 314 ROM, does NOT fix this issue. There is still no leading zero for manila flip clock.
Anyway have a fix that works?
I have no idea how to edit manila files, and have not been successful is doing so.
I will have to rely on someone generous enough to do it for me.
Thank you in advance to anyone willing to help.

Rounding down a float two decimal places

I have an equation that gives a decimal value. However I would like the final value to be rounded down only showing the first two decimal places. What would be the best function to achieve this.
Code:
String number,percentage;
Float calc;
percentage = ABV.getText().toString();
number = quantity.getText().toString();
calc = Float.parseFloat(number)* drinkType * Float.parseFloat(percentage)/1000;
units.setText(calc.toString());
MattD00 said:
I have an equation that gives a decimal value. However I would like the final value to be rounded down only showing the first two decimal places. What would be the best function to achieve this.
Code:
String number,percentage;
Float calc;
percentage = ABV.getText().toString();
number = quantity.getText().toString();
calc = Float.parseFloat(number)* drinkType * Float.parseFloat(percentage)/1000;
units.setText(calc.toString());
Click to expand...
Click to collapse
This can be achieved in several ways..
--- First thing that comes to mind:
calc = calc * 100;
calc = Math.round(calc);
calc = calc / 100;
It should be the simplest and cpu-saving solution.
--- A different way, format your output string:
String output = String.format("%.01f", calc);
units.setText(output);
This is good if you need to leave untouched your float value (but note, 2nd digit may be rounded)
Btw, you should post in the proper section
MattD00 said:
I have an equation that gives a decimal value. However I would like the final value to be rounded down only showing the first two decimal places. What would be the best function to achieve this.
Code:
String number,percentage;
Float calc;
percentage = ABV.getText().toString();
number = quantity.getText().toString();
calc = Float.parseFloat(number)* drinkType * Float.parseFloat(percentage)/1000;
units.setText(calc.toString());
Click to expand...
Click to collapse
Where should I write this code? I am a Newbie. Please bear. Thanks in advance.

Categories

Resources