yashsingh1/xdaforums huggingface dataset:
[XPERIA X1 General] JKingDev:
Well I wasnt planning on making a UI unless people absolutely want to. All my settings are easily changeable in the registry. The second post outlines all the available options. When I add the ctrl key and fn keys there will be options for these too. There will also be an option to allow other key hooks if I get that working. Nothing must be done via scripts or other programs. Simply enter in the registry what file to run or open when the key is pressed. Everyone is free to make requests. There is one request to emulate virtual hard keys and I will try addressing that later. I am not trying to match AEBP. I did this a.) becausse AEBP is a bloated all purpose app; mine is tailor made for the X1, and much smaller and lighter; b.) AEBP costs money; c.) AEBP cannot create a ctrl key or grab FN keys; AEKM does, meaning purchasing another application. If there is something more you would like to see the app do let me know. Otherwise, I have laid out everything that is in the plan already.

Glad you got that worked out. I thought there would be something of this nature.
[XPERIA X1 General] dingolino:
Hi JKingDev,

I have tired X1BC for only one button so far (long press ok button to switch to 2nd today). So far everything is working quite nicely.

With AEBP I was facing a significant battery capacity drainage this was for me the main reason to look out for another button mapper. At least in my configuration I was able to reproduce this battery problem (I had 3 buttons asigned with a double click function and the action menue). But this is reported allready (Touch HD forum, because it happens on the Touch HD as well). It is realy a pity, because AEBP is a great application and was the very 1st I was installing on a WM phone.

As long as there is no UI maybe you could do a presetting of all those reg key with a samll cab file? And fill the dword with "0" - I understand that than the key has just its standard behaviour.

Because than I just have to type "only" my individual settings (I am lazy - I know).

For making program starting easier I have the idea to create in the reg keys a path name to a standard link such as

"\Program Files\X1BC\OKLongAction.lnk"

Than I create a new link for the program I want to start, rename it to "OKLongAction.lnk" and overwrite with this new link the one in the standard directory.

This would allow to make changes without playing arround in the regestry all the time.

Best regards & Many thanks for this great tool!

dingolino

Registry settings:

The following are DWORD values:

HKCU\SOFTWARE\JKing\X1BC\CapturePanel

HKCU\SOFTWARE\JKing\X1BC\CaptureOK

HKCU\SOFTWARE\JKing\X1BC\CaptureLeft

HKCU\SOFTWARE\JKing\X1BC\CaptureRight

HKCU\SOFTWARE\JKing\X1BC\CaptureVolumeUp

HKCU\SOFTWARE\JKing\X1BC\CaptureVolumeDown

HKCU\SOFTWARE\JKing\X1BC\CaptureLWIN

Here are the possible choices:

0 - Leave the key alone

1 - Capture long press only

3 - Capture long and short press

The following are string values:

HKCU\SOFTWARE\JKing\X1BC\PanelShortAction

HKCU\SOFTWARE\JKing\X1BC\PanelLongAction

HKCU\SOFTWARE\JKing\X1BC\OKShortAction

HKCU\SOFTWARE\JKing\X1BC\OKLongAction

HKCU\SOFTWARE\JKing\X1BC\LeftShortAction

HKCU\SOFTWARE\JKing\X1BC\LeftLongAction

HKCU\SOFTWARE\JKing\X1BC\RightShortAction

HKCU\SOFTWARE\JKing\X1BC\RightLongAction

HKCU\SOFTWARE\JKing\X1BC\VolumeUpShortAction

HKCU\SOFTWARE\JKing\X1BC\VolumeUpLongAction

HKCU\SOFTWARE\JKing\X1BC\VolumeDownShortAction

HKCU\SOFTWARE\JKing\X1BC\VolumeDownLongAction

HKCU\SOFTWARE\JKing\X1BC\LWINShortAction

HKCU\SOFTWARE\JKing\X1BC\LWINLongAction
[XPERIA X1 General] JKingDev:
Thanks for the feedback. I had no idea that AEBP had a battery drainage issue. Glad that I nolonger need it. :). I was definitely thinking of making a cab and pre-setting all the reg values. You are right, that would definitely save time. I just thought I would do that once I decide to call it version 1. Why wait though. Next version will be cab-ed. Do you think I should go ahead and put a lnk to X1BC in startup, or do you prefer to start it manually now? I will put a link in the start menu. Lastly, I was thinking of presetting all the keys to mortscripts placed in the program directory. The mortscripts would just popup a message saying "modify this script or change the reg key to what you link to customize this key." Sound like a good idea?

If I do this, remember to back up you HKCU\SOFTWARE\JKing\X1BC before installing the cab, as it will overwrite your existing settings.
[XPERIA X1 General] dingolino:
>I had no idea that AEBP had a battery drainage issue.

I still do not understand why I have this issue, but it looks like that I am not the only one. At least in my configuration on my X1 I have this problem and I can reproduce it any time. Batter life on my X1 with AEBP was just arround 1 day, by doing nearly nothing with the phone. Uninstalling AEBP and at the end of the day I have still 80 to 90% battery capacity left (if I am doing not much with the phone). I have tried this now 2-3 times and anythime it was the same. I got the hint about AEBP from the xda-TouchHD forum.

>Do you think I should go ahead and put a lnk to X1BC in startup

Yes I would prefer this because this would be the next thing I am doing, that I have it right away after a reset.

>Lastly, I was thinking of presetting all the keys to mortscripts placed in the <program directory. The mortscripts would just popup a message saying >"modify this script or change the reg key to what you link to customize this >key." Sound like a good idea?

Not quite sure, because this implies that Mort script is installed, but X1BV does not need Mort Script for the basic functions.

I installed Mort Script after I was aware about Dandies solution and I want to fix the blue tooth issue also, but for the basic button mapping functions I do need Mort Script I just start some programs (and by the way this was for me the reason to use X1BC because using Mort script "just" to start with a button a program was looking "heavy" to me, but ok it works).

Best regards,

dingolino
[XPERIA X1 General] JKingDev:
Good point. That does imply one has mortscript installed. I'll just do the links then. And I agree that using mortscript just to start a program is overkill, which is why I chose to make it possible to launch any file directly. Thanks again for the feedback.

Still working on the ctrl key now. Need to do lots of testing to make sure it works.
[XPERIA X1 General] anaadoul:
Great work my friend,

i'm using your application now, very simple and reliable.

but i think i found a bug,

when capturing the windows key and not assigning it to anything, open any application and press the Windows Key 3 or 4 times, the running application minimizes!
[XPERIA X1 General] JKingDev:
Thank you! I will look into this strange bug.
[XPERIA X1 General] JKingDev:
New version. Now in a cab. The cab will create all the registry values with defaults of zero. If you want to install the cab, please back up your settings first as they will get overwritten. Or you can just replace the exe like before. Note, the cab also creates shortcuts in startup and the start menu.

The short mode for the win ctrl key now works. This is a tricky one though, so please torture test. Right now I think using the dpad before using win as ctrl confuses X1BC. For instance, DPAD left, WIN, "v". Will move the cursor to the left, then type the letter v. Another WIN, "v" will now work as paste. I already think I know what to do to fix this though. Let me know if you find any other issues.

A new registry value allows you to change the long key press delay.

There is a new registry option to enable other key hooks. It does absolutely nothing. Please leave as zero.

Cheers!
[XPERIA X1 General] anaadoul:
again in the new version the windows key is behaving in a strange way!

now when pressing twice, the application which is in the front minimizes not matter if the X1BC is running or not!

even after a soft reset it's still the same.

are you changing any system registry values?

edit : also some times WIN key hangs and keeps pressing CTRL!

solving it by opening a SIP keyboard and pressing CTRL then hiding it again!
[XPERIA X1 General] DOCIOHN:
It's a very cooooool app, but I have the same problem with the WIN key. It hangs every time i copy text (CTRL+C) and releases only by pressing the CTRL key on the software keyboard.

Further i have a German OS, so my %CE1 path isn't "Program Files". (In German it is named "Programme" :o ) So all the predefined shortcut pathes in the registry are pointing to nowhere. But it's no problem for me, just wanted to say; :D

I hope you can find the failure;

Cheers!
[XPERIA X1 General] JKingDev:
I have not changed any system registry values. When my program closes, the system should be back to exactly how it was. I cannot reproduce this problem you have with minimizing. Can you tell me what you have for the following settings:

LWINCtrlMode

CaptureLWIN

LWINLongAction

LWINShortAction

CaptureLeft

CaptureRight

If you did not create the value just say it doesnt exist.

When you say the win key hangs, do you mean you short press the win key then every letter you press afterward is sent as a ctrl key and you cannot turn ctrl mode off?

Do you mean hangs in the same way I said above. I hope I can get it working right too. Like I said, the win key is tricky but it could be greatly useful if I can work this out. I hate the way the system handles keys though.

As opposed to the paths, I will see if I can can make the cab insert the default install directory there. I am not sure if I can use variables when presetting a registry string.
[XPERIA X1 General] anaadoul:
CaptureLWIN=0

LWINCtrlMode=2

LWINLongAction="\Program Files\X1BC\LWINLong.lnk"

LWINShortAction="\Program Files\X1BC\LWINShort.lnk"

CaptureLeft=0

CaptureRight=0

when i tried to use the functionality of Copy and Paste, i noticed that it didn't work, then whatever button i try to press is not pressing! i tried a soft reset, after starting the application again automatically it blocked all the buttons on the mobile! not even the pick phone and hangup also not the hardware soft buttons!

until i opened the Virtual KB press CTRL and hided it again. everything went back to normal.

regarding the minimize thing, i don't know if it's a problem with my device which requires a hard reset or caused by the software, but one thing i'm sure about that i didn't notice it before (maybe it was there and i didn't double press win key).
[XPERIA X1 General] JKingDev:
Sorry I didnt make as big a note of this as I should. Only short ctrl mode is supported. Please change LWINCtrlMode to 1. Actually, ctrl should never work if it is set to 2. Are you sure that is the setting? Also, if you change it back to 0, do you get any of these symptoms?

Regarding the minimize issue, did you install any other new software that might affect the keys? Ever had AEBP installed?

*edit* Actually I found some code that will cause problems if you set the ctrl mode to 2. Some of these symptoms should definitely go away.
[XPERIA X1 General] anaadoul:
ok, now every thing is working smoothly :D

i installed QuickMenu, assigned a long windows key press to QuickMenu.exe press and also the left soft key long press.

the application seems to work fine. no trouble now ;)

great work.
[XPERIA X1 General] relazz:
Hi JKingDev,

A Happy and Grateful user reporting ...

Thanks for developing and sharing the application.

I installed it and mapped the Long OK Button to task manager and Long Right Button to SMS Inbox.

Works without any issues.

Relazz
[XPERIA X1 General] Dandie:
Hey JKingDev,

is it possible to remap every FN+Key combination with your app? This is something bad about my application because of the different localizations of the keyboard.

Maybe it would also be nice to be able to send any ASCII key and/or even virtual key via your app directly, this would reduce the overhead of using MortScript for this stuff. If you do so, you should provide a list of ASCII and/or virtual keys for the user and an example for how to do it.
[XPERIA X1 General] dingolino:
Hi JKingDev,

I am facing a strange behaviour:

If you remember I told you that I had wit AEBP problems with the battery lifetime of my X1, which was the primary reason for me to test X1BC.

During the testing period I started X1BC manually. Than I created a shortcut and put it into the startup folder to have it ready after each reboot.

Now I have exactly the saem battery issue like with AEBP: The battery is only good for max 1 day

Removing it from the startup folder and start it after booting is completed and the battery problem is gone again.

So on my system it is making a difference WHEN I am starting X!BC

I will test it also with AEBP to see whether it is the same here.

My conclusion at the moment is that there is an interfearence with another program.

Are you aware of a tool which is showing what programs are "hanging" in the key press hook?

Best regards,

dingolino
[XPERIA X1 General] Dandie:
@dingolino

Check your CPU load with some task manager like the one from FdcSoft. If there is no high CPU load, i.e. the idle process doesn't have most of the CPU load, then this will cause the battery drain. If not, I doubt it has anything to do with the installed software. The only other thing I could imagine higher battery drain by installed software would it to prevent the system to go into standby properly, but I also doubt that XBC will cause that.
[XPERIA X1 General] JKingDev:
Great to hear! Does this mean the minimize issue is also gone?

Excellent! Thanks for the feedback.

I was planning on adding the Fn combinations next after I get the ctrl key straightened away. I was not aware that it could cause problems with different localizations. What sort of issues does it cause. Yes I have thought about giving the option of sending a key directly. No need to know the ascii code though. Just put in the registry what key you want to send in a string value and I will send it. I think I will do this for the fn combination keys.

Hmm. What other programs startup with your device? Your conclusion sounds like it could be the case. Perhaps another program is setting a key hook and it matters whether X1BC starts before or after it. That other program might use some might use some mechanism for supporting other key hooks and needs to be started first. I don't currently have a way of detecting another program setting a key hook. Still researching methods of doing this.
[XPERIA X1 General] JKingDev:
dingolino you may also want to do some testing with this program to see if AEBP and X1BC are causing higher power usage when run at startup.

http://www.acbpocketsoft.com/Products/acbPowerMeter/acbPowerMeter-Overview-2.html
[XPERIA X1 General] Dandie:
Well, the thing is that some keyboards of some countries may have FN+Key combinations that others don't have. E.g. on the german keyboard, compared to the english, y and z are exchanged and I guess that causes FN+Y to have some function on english keyboards that FN+Z has on on german keyboards.

Regarding the keys as strings in registry as strings: Don't forget that there are whitespace characters. Ok, you may code them the way it is done in C-Strings, but also there you can't write all keys and this is kind of programming style, most people don't know about.
[XPERIA X1 General] dingolino:
I realy can switch on/off the battery drainage be installing or uninstalling AEBP.

Now with X1BC it is the same depending when I start it, within startup folder: drainage is ON, later after the system is booting up: OFF.

I also think that it has something today with the standby mode because I do not see any extrem CPU load with a task manager (I am using www.dotfred.net/).

I will make duirng the next days the test with AEBP again (if I remember well AEBP starts also via a link in the startup folder, so I can remove it and start it later)

I have wktask installed as my task manager.

Best regards

dingolino
[XPERIA X1 General] dingolino:
Many thanks, will give it a try, because the problem is to get a info while the system is in standby mode.

Best regards,

dingolino
[XPERIA X1 General] JKingDev:
dingolino, also let me know what else in in your startup folder.
[XPERIA X1 General] dingolino:
ok, here it is.

The autostartlist is from sk Tools

and the other list is showing the running programs

Best regards

dingolino
[XPERIA X1 General] JKingDev:
Mortbuttons sounds like it could be a problem. Can you try two things for me?

First lets see if mort buttons uses a keyhook. Place X1BC.lnk back in startup, but rename it to "aX1BC.lnk". This way my program will start first. Does mortbuttons still work? If mortbuttons nolonger works it is because it uses keyhooks, and currently when started first, my program does not support other key hooks. (A better way to do this test would be to remove both "X1BC.lnk" and "Mortbuttons quickstart.lnk" from startup, reboot, then manually start X1BC, then manually start mortbuttons; this will ensure that my program has time to initialize before mortbuttons starts).

The second test is to just remove Mortbuttons from startup and leave X1BC.lnk in startup and see if you still have an issue.
[XPERIA X1 General] dingolino:
With AEBP the battery is draining, no matter if started during startup or later.

Mort button is more like a launcher, it has - as far as I know - nothing todo with Hardware buttons.

Anyway I will test this also.

Mort button has one strange behaviour: The today plugin does not come up after a reset, I have to go settings and than to the today plugins, close it and than the plugin is visible on the today screen (after switching the phoneoff/on the today plugin is normaly immediatly there after booting).

Best regards

dingolino
[XPERIA X1 General] henrilep:
Bonjour,

Ne faudrait-il pas désactiver les effets de X1BC lorsque le X1 est verrouillé?

-------

Hello,

You would not should deactivate the effects of X1BC when X1 is locked?
[XPERIA X1 General] JKingDev:
Which lock program are you using? The built in windows mobile lock? Hmm. Lets see if allowing other key hooks fixes this. Thanks for the tip.

Sorry for the lack of updates, I did not work too much on it for the past day or so. The next version short make the win key work better as ctrl and also give the option of using tab as ctrl. This will work in several modes and still allow you to send a tab key (short press is tab, hold and press letter key = ctrl key, ect).
[XPERIA X1 General] Dandie:
With X1ButtonMapper, the mapped keys don't get through when the windows internal lock software is activated. I don't think this is different with X1BC.
[XPERIA X1 General] henrilep:
Bonjour,

Un appui long sur la touche OK alors que le X1 est verrouillé (fonction Windows) provoque l'affichage de l'écran de déverouillage. Un second appui long sur la même touche alors que l'écran de déverouillage est affiché conduit à l'action programmée pour l'appui long de la touche OK. Ensuite, il n'y a plus d'action possible puisque les touches restent verrouillées.

A+

---

Hello,

A long press on the button OK while X1 is locked (Windows function) provokes the display of the screen for unlock. A second long press on the same touch while the screen of unlock is provokes the action programmed for the long press of the touch OK.

Then, there is not possible action anymore because touches remain locked.

Thanks
[XPERIA X1 General] ewok666:
Start Button?

Is there any way to have X1BC 'press' the non-existing start button without using additional software like hbutton etc?

TIA
[XPERIA X1 General] JKingDev:
There is no way to do it right now without additional software. Another option would be to assign the button to a mortscript that opens the start menu. One thing that I want to implement along with fn key remapping is allowing you to just directly send a key event with a button as opposed to assigning it to a file.

Sorry for the lack of updates. This has been the first week of the spring semester and I have been very busy. I hope to have time to work on this tomorrow.
[XPERIA X1 General] Angelusz:
It's coming along very nicely.

As I have too little time to learn mortscript next to all the other things I'm working on atm, I would love to see a UI added to this. It doesn't have to be anything fancy ofcourse, just to make using this APP easier.

If you don't have time or will to do this then I guess I'm unlucky and will have to learn mortscript :p
[XPERIA X1 General] JKingDev:
Thanks. The lack of a gui will not necessitate learning MS. A gui will not add any functionality. It will just be a convenience to modifying the reg. What is is that you want to do that you can't right now?
[XPERIA X1 General] Angelusz:
Oh right, it's the registry. Well, that makes it lots easier, but still a GUI would make it more intuitive. It's not a neccesity, it's luxury. I didn't mean more functionality. :)

With a UI you can also complement your APP by adding existing executables for certain functions. (for instance screen rotate, button touch response etc.) I know it's already possible to add those, but it would make it more intuitive to bundle them and select options from a dropdown menu. It's just inconvenient having to do everything through the registry everytime you need to modify something.

I wouldn't like the APP less if you don't add a UI, though I would like it better if you do ;) (yes, I know that sentence seems to contradict itself, but it doesn't!)
[XPERIA X1 General] JKingDev:
:) Adding all the functionality is my top priority. A GUI will follow. Development will be slower now but I hope to make good progress soon. I did get a PM from someone who wanted to help. I told them writing the GUI would be great but I never did get a reply.
[XPERIA X1 General] Angelusz:
Ah alrighty. Well, I'm going to thoroughly test it as it is now, lets see if I can make it do exactly what I want :D

EDIT: Got it to work now. Time to find/create me some mortscripts!

EDIT2: Starting to learn mortscript. The syntax is common, which makes it lots easier. Created a script that switches between landscape and portrait mode. Still a little issue I have to fix, will upload when done.

EDIT3: After a lot of testing, tinkering and toying around with mortscript. I created 3 scripts. Two of which are useful to this thread:

1. screenrotate270.0.mscr - A super-simple script that rotates your screen to 270 degrees when pressed once (normal landscape) and back to 0 degrees when pressed again (portrait)

2. The same as above, but with cmEX landscape support. (which I will be using myself ^^)

ZIP files included!

EDIT4: And to top it off, a request: Can you add camera button support? I know it might be tricky as it uses two levels, but it would be nice to be able to customize it's behaviour outside the camera application only.
[XPERIA X1 General] dingolino:
JKingDev

could you do me a favour and send me the sequence of the startup programs what you have given by sk tools.

After some weeks of having no problems with the battery I installed 2 programs - uninstalled them later on - but now I have battery problems again. I would like to figure out now whether the sequenze during booting is making any difference.

Many thanks

dingolino
[XPERIA X1 General] JKingDev:
Thanks for writing and sharing your scripts. I was just about to do that now. I was too busy to get to it sooner. Curious though, what is cmEX landscape? I will take a look at how the camera button behaves and add it if it is not too complicated.

I have Autoshortcut.lnk, btkeepalive.lnk, pwresident.lnk, pkg.lnk, poutlook.lnk, sipchange.lnk, wisbar advance.lnk, and x1bc.lnk in startup. I assume the system starts them in alphabetical order but I dont really know. What do you have?