You are here: PSPad forum > English discussion forum > Custom Menus

Custom Menus

#1 Custom Menus

Posted by: qwerky | Date: 05/10/2017 18:52 | IP: IP Logged

Hi Jan, thank you for a quality editor--and for making it freely available. It is obvious you have put much effort into it.

Customizing the keyboard shortcuts is very good. Is there a way also to customize the menus? Not just the hotkeys for each menu (which would be a good start), but perhaps also to rearrange the items, and so forth?

Options: Reply | Quote | Up ^

#2 Re: Custom Menus

Posted by: pspad | Date: 05/10/2017 19:15 | IP: IP Logged

Just now it isn't possible to rearrange menu. In the single level menu it is not complicated, but in menu with submenu it's more complicated - translation e.t.c.

Another problem - lot of the menu items are created dynamically.

To define hotkeys is easy - open language file and put & char before letter you want to have as hotkey, e.g. &Open.

You can suggest any meaningful hotkeys, what I can make as default.

Edited 1 time(s). Last edit at 05/10/2017 19:18 by pspad.

Options: Reply | Quote | Up ^

#3 Re: Custom Menus

Posted by: qwerky | Date: 05/11/2017 19:05 | IP: IP Logged

Thanks for the tip on selecting hotkeys in the language file; it helps a lot.

An editor is a very personal thing; everyone has his own preferences and philosophy. That is why customization is so valuable. But I understand that it is difficult for you to build in user-customization of the menus.

As to defaults, I would be happy to provide some comments for your consideration, and for others to discuss.

First, perhaps, is standardization. But here we immediately run into a problem, since there are some standards which conflict with other standards, and therefore a choice must be made.

For example, as far back as Wordstar (and perhaps earlier), Ctrl-Y has been used for Delete Line, but in Windows Ctrl-Y is Redo. Most editors that I have looked at, including PSPad, follow Wordstar, and use Shift-Ctrl-Z for Redo (following Ctrl-Z for Undo), which certainly seems to be the correct choice.

This pattern of Ctrl-Key having one function, and then Shift-Ctrl-Key having a related function, is very appropriate, in my opinion. So, Ctrl-X for Cut, and Shift-Ctrl-X for Cut Append to Clipboard; Ctrl-C for Copy, and Shift-Ctrl-C for Copy Append to Clipboard; Ctrl-V for Paste, and Shift-Ctrl-V for Paste with No Cursor Change, and so on.

Now as to the main menu, the (rather loose) standard seems to be to have File as the first, and Help as the last menu, with Edit, Format, Search and View following File, with Tools, Options/Preferences/Settings, and Window preceeding Help, and with others in-between those two groups.

Also, the respective hotkeys seem to be rather standard, with F for File, H for Help, and in general using the first letter of each menu, where it does not conflict with another menu. Where there is a conflict, and another letter must be chosen, it really doesn't seem to matter whether the chosen letter is the second, third, or fourth or later letter.

So, for example, one might set PSPad's main menu similar to:

(Note: the forum doesn't seem to allow underlined characters, so I have used Bold characters for the hotkeys.)

Here, Format is next to Edit since they are very closely related in function (edit/change something); whereas Search seems more closely related to View (show/display something). Project is admittedly a difficult one, since it deals almost entirely with files and is therefore closely related to File. I placed it in the center so that Edit could follow File (fairly standard), but would have no problem with Project following File, as it currently does.

Settings was changed to Options to allow the O hotkey. Format could have used r; I chose m to match another editor that I use. For HTML, L (Hypertext Markup Language) seemed appropriate. I understand that P was not originally chosen for Projects since Alt-P was used elsewhere (as is Alt-L), but I have chosen to customize the keyboard shortcuts in any case.

For example, I have used Shift-Ctrl-Key for all Mode/Pane/Window functions, eg. Shift-Ctrl-A = Toggle ASCII Table, Shift-Ctrl-B = Toggle HEX(Byte) Mode, Shift-Ctrl-C = Toggle Code Window, Shift-Ctrl-D = Toggle Clipboard Window, Shift-Ctrl-E = Toggle File/Project Window, Shift-Ctrl-F = Toggle Search(Find)/Log Window, Shift-Ctrl-G = Toggle Syntax Highlighting, Shift-Ctrl-H = Toggle Show Control Characters, Shift-Ctrl-J = Toggle OEM Characters, Shift-Ctrl-L = Toggle Line Numbers, Shift-Ctrl-R = Toggle Ruler, Shift-Ctrl-T = Toggle Toolbar, Shift-Ctrl-W = Toggle Word Wrap.

In the present menu, selecting the different panes/windows are scattered across several different menus; I would prefer to see them all collected under one menu. But now we are getting deeper into the structure; and perhaps I've written enough for now.

Understand that these are just my thoughts on the subject, which I hope may prompt some discussion. Please let me know what you think.

Options: Reply | Quote | Up ^

#4 Re: Custom Menus

Posted by: pspad | Date: 05/11/2017 19:33 | IP: IP Logged

PSPad allows you redefine shortcuts as you need in program settings / Keymap.
What doesn't allows you is redefine content of the menus.

Hotkeys in menu can be defined, use the latest build from developer forum, open file .\Language\English.ini and you can start to play.

Root menu items and submenus you will find in the [Main menu] section - items starting with mXXXXXX, rest should be in the [Action List] section, items starting with aXXXXX

so there is hotkey for "F"

Options: Reply | Quote | Up ^

#5 Re: Custom Menus

Posted by: qwerky | Date: 05/14/2017 01:36 | IP: IP Logged

Yes, I understand, and that is helpful. My reply above was in response to your previous post asking for suggestions; I was simply giving some suggestions.

In the Keymap settings dialog, there are several entries (Cut, Copy, Paste, Undo, Redo) which are duplicated, with different shortcuts. But, if I add a duplicate entry (Find Next, Find Previous, etc.) with different shortcut to the KeyMap.INI file, it is ignored. This is not a big deal. Just wondering why that is? It would be nice to be able to define more than one shortcut for a given function.

Options: Reply | Quote | Up ^

#6 Re: Custom Menus

Posted by: pspad | Date: 05/14/2017 03:02 | IP: IP Logged

Don't add new entry. Replace existing shortcuts as you need.

Options: Reply | Quote | Up ^

#7 Re: Custom Menus

Posted by: qwerky | Date: 05/15/2017 20:07 | IP: IP Logged

Okay. Would be nice to have ability to set two different keys for a command, but a feature that perhaps is not in great demand.

Options: Reply | Quote | Up ^

#8 Re: Custom Menus

Posted by: pspad | Date: 05/16/2017 03:25 | IP: IP Logged

Can you explain me please why do you need 2 shortcuts for one command?

Options: Reply | Quote | Up ^

#9 Re: Custom Menus

Posted by: qwerky | Date: 05/16/2017 18:51 | IP: IP Logged

Not really need, but would like the ability. I like to customize all the keyboard shortcuts to fit a pattern, so I have Alt-PgUp, Alt-PgDn for Find Previous, Find Next; and Shift-Alt-PgUp, Shift-Alt-PgDn for Find Previous/Next Word Under Cursor, and so on. All of which works.

But, I would also like the standard F3 and Shift-F3 to work for Find Next/Previous. And there are others like that. But not huge concern.

Options: Reply | Quote | Up ^

#10 Re: Custom Menus

Posted by: davidina | Date: 07/04/2017 15:40 | IP: IP Logged

Hello. Thank you for your work! I have tried to customize and save window settings but it did not work. I have tried:
1. Setting> Program (2)> Autosave main window.

2. Setting > Save main window option.

Is there any way to save the window appearance and customization of left-hand side file explorer?

Thanks a lot

Options: Reply | Quote | Up ^

Editor PSPad - freeware editor, © 2001 - 2018 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR