Page 1 of 1
Override shortcut which is used for menus ALT-E
Posted: 24 Jun 2016 07:58
by pulp
hi,
i would like to use ALT-E to focus the address bar. But this shortcut is used for the Edit menu. Can I override this key combination for my own needs?
thanks pulp
Re: Override shortcut which is used for menus ALT-E
Posted: 24 Jun 2016 08:07
by highend
You can, but you must adapt your current used language (the translation) for that to work (there you can replace the shortcut)
You can find a guide + translation files here:
viewtopic.php?p=86224#p86224
And the bad thing is: With every release you have to modify it again...
Re: Override shortcut which is used for menus ALT-E
Posted: 25 Jun 2016 09:38
by pulp
Thank you for sharing this trick. I changed '&Edit' to 'Ed&it'. Maybe i find a way to automate this string replacement.
pulp
Re: Override shortcut which is used for menus ALT-E
Posted: 25 Jun 2016 09:51
by admin
You could write a script that patches the *.lng file.
Re: Override shortcut which is used for menus ALT-E
Posted: 25 Jun 2016 10:10
by highend
Like so (assuming your .lng file is called "English.lng"):
Code: Select all
Removed, see the next posting that contains the script...
Re: Override shortcut which is used for menus ALT-E
Posted: 25 Jun 2016 10:27
by admin
The 01.0463 part is not a fixed number and may change in any future edition. So I would just look for "men.caption:01|&Edit|--|&Edit".
Re: Override shortcut which is used for menus ALT-E
Posted: 25 Jun 2016 10:29
by highend
Is the form number subject to change anytime? So at least the 01. will stay constant?
Re: Override shortcut which is used for menus ALT-E
Posted: 25 Jun 2016 10:31
by admin
Yes, the 01. will stay constant.
Re: Override shortcut which is used for menus ALT-E
Posted: 25 Jun 2016 10:40
by highend
Then you're better off with:
Code: Select all
$lngFile = "<xydata>\English.lng";
$edit = "Ed&it";
$content = readfile($lngFile);
$pattern = "^(01.\d+=\s+men\.caption:\d{2}\|&Edit\|--\|)(&Edit)$";
$content = regexreplace($content, $pattern, "$1$edit");
writefile($lngFile, $content);
text "Language file updated, please restart XY now...";
Re: Override shortcut which is used for menus ALT-E
Posted: 25 Jun 2016 11:47
by admin
Another idea: What about an option to remove the accelerators in the top menu? That would free Alt+F, Alt+E, Alt+V etc for being used as KS. And now that I killed that beep we are on easy street...
(Well,there are still some Alt+? accelerators in the Info Panel... should they also be optionally removed then...?)
Re: Override shortcut which is used for menus ALT-E
Posted: 25 Jun 2016 12:12
by pulp
@highend : thank you for the script
@admin: sounds good. I do not need the accelerators in the info panel, so in my point of view yes.
Re: Override shortcut which is used for menus ALT-E
Posted: 25 Jun 2016 12:44
by admin
Well, was a nice idea, but: menu caption first letters are used as default accelerators by Windows

This makes Alt+F still unusable as normal KS if there is a menu "File". Argh.

Re: Override shortcut which is used for menus ALT-E
Posted: 27 Jun 2016 22:02
by pulp
admin wrote:Well, was a nice idea, but: menu caption first letters are used as default accelerators by Windows

This makes Alt+F still unusable as normal KS if there is a menu "File". Argh.

Cant you override the shortcut? what programming language and UI framework is xyplorer using?
Re: Override shortcut which is used for menus ALT-E
Posted: 12 Jul 2016 10:52
by admin
No. I did not find any way to disable the Windows default accelerators in the menu control. The only way would be to write a custom menu control. Well...