One of the many great things about Nisus Writer is the menu keys system, in particular how keys can be used in sequence.
On the classic version it was possible to export a list of all the menu keys that the user had set up. I used to find this list very useful.
I can't find this in Nisus Writer Pro, I've read through the relevant part of the manual and there is no mention of it.
If it is true that this list cannot be created with Nisus Writer Pro then it would be great if in a future version that feature would be included.
Thank you.
Export List of Menu Keys?
Export List of Menu Keys?
Patrick
Re: Export List of Menu Keys?
I'm sure you'll not be surprised to hear that it's possible to write a macro for that
The macro retrieves all the menu commands and then creates a list. The order is that of a "breadth first search". The output contains only those commands that have a shortcut assigned. One could easily modify it to get a more comprehensive list, or to format the list in a different fashion.
Note: The list also includes the "shortcutString" which allows you to sort the list in such a way that similar key assignments are next to each other. If you prefer alphabetic order by command name, you can just delete those strings first, (or quote out that line in the macro).

The macro retrieves all the menu commands and then creates a list. The order is that of a "breadth first search". The output contains only those commands that have a shortcut assigned. One could easily modify it to get a more comprehensive list, or to format the list in a different fashion.
Note: The list also includes the "shortcutString" which allows you to sort the list in such a way that similar key assignments are next to each other. If you prefer alphabetic order by command name, you can just delete those strings first, (or quote out that line in the macro).
philip
- martin
- Official Nisus Person
- Posts: 5230
- Joined: 2002-07-11 17:14:10
- Location: San Diego, CA
- Contact:
Re: Export List of Menu Keys?
Thank you Philip for your quick and excellent help, as always!
I'm attaching an alternative macro which does a couple things differently:
1. The list includes not only shortcuts for all menus currently in existence, but also those which could exist later. For example, a document may have a "Heading 1" style (and corresponding menu) that does not exist in another document.
2. The list is sorted alphabetically by keyboard shortcut. This may or may not be desirable.
I'm attaching an alternative macro which does a couple things differently:
1. The list includes not only shortcuts for all menus currently in existence, but also those which could exist later. For example, a document may have a "Heading 1" style (and corresponding menu) that does not exist in another document.
2. The list is sorted alphabetically by keyboard shortcut. This may or may not be desirable.
- Attachments
-
- Show All Shortcuts.nwm.zip
- (3.41 KiB) Downloaded 436 times
Re: Export List of Menu Keys?
Thank you Philip and Martin. I have both the macro files now.
I was a little bit surprised that this could be done with macros because I didn't think it was possible with the classic Nisus Writer. I became pretty good with the basic like macro language of that but I don't think the shortcuts were accessible, clearly they are accessible with the current Nisus Writer Pro.
I wonder if the Martin has considered adding this to the application as a built in feature? In the Preferences pane for "Menu Keys" there could be a little button for creating the list of shortcuts. That could run this code that is used in the macro.
UPDATE
I've checked out the macros now. Philip's works as he has described. Martin's has one tiny imperfection. Martin's macro sets the font to "Courier" which brings up a dialogue saying that not all characters could be displayed in Courier so they are being substituted with Lucida Grande. This obviously is not a big problem but it stops the rest of the macro from converting the shortcuts to a "nice table". The answer, of course, is to change the font in Martin's macro to Lucida Grande and so we get the nice table.
In Philip's macro there is a great idea which is to provide just the letter(s) of each short cut in a column as well as the full shortcut. This is very useful for sorting and I might import this into a FileMaker Pro database where I can hide that column but still use it to sort. I have FileMaker Pro running all the time on my computer so having this reference in FileMaker Pro would be quite handy.
I was a little bit surprised that this could be done with macros because I didn't think it was possible with the classic Nisus Writer. I became pretty good with the basic like macro language of that but I don't think the shortcuts were accessible, clearly they are accessible with the current Nisus Writer Pro.
I wonder if the Martin has considered adding this to the application as a built in feature? In the Preferences pane for "Menu Keys" there could be a little button for creating the list of shortcuts. That could run this code that is used in the macro.
UPDATE
I've checked out the macros now. Philip's works as he has described. Martin's has one tiny imperfection. Martin's macro sets the font to "Courier" which brings up a dialogue saying that not all characters could be displayed in Courier so they are being substituted with Lucida Grande. This obviously is not a big problem but it stops the rest of the macro from converting the shortcuts to a "nice table". The answer, of course, is to change the font in Martin's macro to Lucida Grande and so we get the nice table.
In Philip's macro there is a great idea which is to provide just the letter(s) of each short cut in a column as well as the full shortcut. This is very useful for sorting and I might import this into a FileMaker Pro database where I can hide that column but still use it to sort. I have FileMaker Pro running all the time on my computer so having this reference in FileMaker Pro would be quite handy.
Patrick
Re: Export List of Menu Keys?
I must say that I overlooked the command Menu Shortcuts. Considering the extra benefits this command offers it's interesting that it has now been moved to "Superseded Commands" in the reference file. I guess to truly supersede this command the Menu object should have a .allMenus or .allShortcuts command …martin wrote:I'm attaching an alternative macro which does a couple things differently:
1. The list includes not only shortcuts for all menus currently in existence, but also those which could exist later. For example, a document may have a "Heading 1" style (and corresponding menu) that does not exist in another document.
2. The list is sorted alphabetically by keyboard shortcut. This may or may not be desirable.
philip
Re: Export List of Menu Keys?
And there is another feature of Menu Shortcuts that's interesting: it gives the entire menu path of the commands. It would be nice if the Menu object also had such a property.
philip