Override shortcut which is used for menus ALT-E
Override shortcut which is used for menus ALT-E
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
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
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...
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...
One of my scripts helped you out? Please donate via Paypal
Re: Override shortcut which is used for menus ALT-E
Thank you for sharing this trick. I changed '&Edit' to 'Ed&it'. Maybe i find a way to automate this string replacement.
pulp
pulp
-
admin
- Site Admin
- Posts: 64847
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Override shortcut which is used for menus ALT-E
You could write a script that patches the *.lng file.
FAQ | XY News RSS | XY X
Re: Override shortcut which is used for menus ALT-E
Like so (assuming your .lng file is called "English.lng"):
Code: Select all
Removed, see the next posting that contains the script...
One of my scripts helped you out? Please donate via Paypal
-
admin
- Site Admin
- Posts: 64847
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Override shortcut which is used for menus ALT-E
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".
FAQ | XY News RSS | XY X
Re: Override shortcut which is used for menus ALT-E
Is the form number subject to change anytime? So at least the 01. will stay constant?
One of my scripts helped you out? Please donate via Paypal
-
admin
- Site Admin
- Posts: 64847
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Override shortcut which is used for menus ALT-E
Yes, the 01. will stay constant.
FAQ | XY News RSS | XY X
Re: Override shortcut which is used for menus ALT-E
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...";
One of my scripts helped you out? Please donate via Paypal
-
admin
- Site Admin
- Posts: 64847
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Override shortcut which is used for menus ALT-E
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...?)
(Well,there are still some Alt+? accelerators in the Info Panel... should they also be optionally removed then...?)
FAQ | XY News RSS | XY X
Re: Override shortcut which is used for menus ALT-E
@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.
@admin: sounds good. I do not need the accelerators in the info panel, so in my point of view yes.
-
admin
- Site Admin
- Posts: 64847
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Override shortcut which is used for menus ALT-E
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. 
FAQ | XY News RSS | XY X
Re: Override shortcut which is used for menus ALT-E
Cant you override the shortcut? what programming language and UI framework is xyplorer using?admin wrote:Well, was a nice idea, but: menu caption first letters are used as default accelerators by WindowsThis makes Alt+F still unusable as normal KS if there is a menu "File". Argh.
-
admin
- Site Admin
- Posts: 64847
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Override shortcut which is used for menus ALT-E
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...
FAQ | XY News RSS | XY X
XYplorer Beta Club