|
NeoOffice Menu and Keyboard Shortcuts
From NeoWiki
Revision as of 04:03, 23 February 2007 (edit) ( | contribs) m (changed stray OOo to OpenOffice.org) ← Previous diff |
Revision as of 04:07, 23 February 2007 (edit) (undo) ( | contribs) m (converted OOo to OpenOffice or OpenOffice.org as indicated and Neo to NeoOffice) Next diff → |
||
Line 29: | Line 29: | ||
''From a post in the [http://trinity.neooffice.org/modules.php?name=Forums Trinity forums]'' | ''From a post in the [http://trinity.neooffice.org/modules.php?name=Forums Trinity forums]'' | ||
- | : In Tools->Configure->Keyboard, it appears that all the available keystrokes are pre-entered; one cannot add to them. Thus, one can't apply cmd-\ or cmd-< or to an action. Further, there are no optioned (alt-ed) modifiers available. I read in one of the other threads that there was a problem including the option/alt modifier because of Unicode confusion; however, I don't see how it could be any different than the shift modifier. But then, I'm not the programmer. Question: Any way to hack | + | : In Tools->Configure->Keyboard, it appears that all the available keystrokes are pre-entered; one cannot add to them. Thus, one can't apply cmd-\ or cmd-< or to an action. Further, there are no optioned (alt-ed) modifiers available. I read in one of the other threads that there was a problem including the option/alt modifier because of Unicode confusion; however, I don't see how it could be any different than the shift modifier. But then, I'm not the programmer. Question: Any way to hack OpenOffice or NeoOffice to add more keystroke combinations? |
There are a couple of things to address here. | There are a couple of things to address here. | ||
Line 35: | Line 35: | ||
First, about the option key. Other platforms use their "equivalent" of the option key ("alt" on Windows) as a "command-producing" key shortcut, i.e., they'd use opt-s for save (the Mozilla folks seem pretty bad about trying to assign opt-key as command shortcuts!). '''On the Mac, opt-key is reserved for keyboard entry (opt-s is ß)—sort of like shift, opt is only a modifier key, not a "command" key.''' Cmd-opt-key and Shift-cmd-opt-key *are* valid command shortcuts on the Mac, though. | First, about the option key. Other platforms use their "equivalent" of the option key ("alt" on Windows) as a "command-producing" key shortcut, i.e., they'd use opt-s for save (the Mozilla folks seem pretty bad about trying to assign opt-key as command shortcuts!). '''On the Mac, opt-key is reserved for keyboard entry (opt-s is ß)—sort of like shift, opt is only a modifier key, not a "command" key.''' Cmd-opt-key and Shift-cmd-opt-key *are* valid command shortcuts on the Mac, though. | ||
- | I believe it was Ed who posted somewhere here on trinity that he had lobbied the | + | I believe it was Ed who posted somewhere here on trinity that he had lobbied the OpenOffice.org folks to allow Cmd-opt-key to be a valid command shortcut for the Mac and the OpenOffice.org folks either ignored him or denied the request. The fact that the Mac allows ,><\ and all sorts of other keys to be valid shortcuts (when paired with cmd, of course), also seems to be lost on the OpenOffice.org folks making these decisions. |
==== Using System Preferences to add additional keystrokes ==== | ==== Using System Preferences to add additional keystrokes ==== | ||
- | However, all is not lost for users of NeoOffice (SOL with OOo/X11, though). Now that we have Aqua menus, you can use the OS's ability to customize keyboard shortcuts to assign other keys (as long as they don't conflict with existing shortcuts in | + | However, all is not lost for users of NeoOffice (SOL with OOo/X11, though). Now that we have Aqua menus, you can use the OS's ability to customize keyboard shortcuts to assign other keys (as long as they don't conflict with existing shortcuts in OpenOffice). |
First, make sure NeoOffice is not running. Then open the "Keyboard & Mouse" pane of the '''System Preferences''' and click on the "Keyboard Shortcuts" tab. Click on the "Application Shortcuts" item in the box, and then the + button at the bottom left. Select NeoOffice as your application, enter the name of the NeoOffice menu item you want to assign a shortcut to and then the desired shortcut. (Be sure to match the spelling and ... or … exactly). Restart NeoOffice and voilà ! | First, make sure NeoOffice is not running. Then open the "Keyboard & Mouse" pane of the '''System Preferences''' and click on the "Keyboard Shortcuts" tab. Click on the "Application Shortcuts" item in the box, and then the + button at the bottom left. Select NeoOffice as your application, enter the name of the NeoOffice menu item you want to assign a shortcut to and then the desired shortcut. (Be sure to match the spelling and ... or … exactly). Restart NeoOffice and voilà ! |
Revision as of 04:07, 23 February 2007
Contents |
Customizing the NeoOffice menus and keyboard shortcuts
Pre-Made Keyboard Configurations
Keyboard configuration files to more closely approximate standard Mac OS X keyboard shortcut settings can be found at
http://www.mindspring.com/~sardisson/neoj/neoj_men-kybd-cfgs.sit
You can either apply these choosing the Customize item from the Tools menu (be sure to select the appropriate radio button in the keyboard section, either for NeoOffice globally or for the appropriate module, when importing those settings) or by unzipping the exported settings files and dropping the .xml files in your ~/Library/Preferences/NeoOffice-1.x/user/config/soffice.cfg folder.
The above configurations will not work with NeoOffice 2.x.
Issues and Limitations
- Language-specific
- Some oddness when switching OpenOffice.org codebase minor versions
- Java 1.4.x passes keystrokes first to a menu item, so they'll match any Services shortcuts [1]
- Work-around:
- Service Manager
- Manually editing the Info.plist of the app providing the service
- Work-around:
- Outright bugs
N.B. These are English-only; the underlying OpenOffice.org code apparently rewrites entire menus rather than just including the modifications, so English menu item text replaces the native menu item text.
You can create your own configurations by using the relevant tabs in the Customize dialogue (Customize… from the Tools menu).
More about customizing NeoOffice keyboard shortcuts
From a post in the Trinity forums
- In Tools->Configure->Keyboard, it appears that all the available keystrokes are pre-entered; one cannot add to them. Thus, one can't apply cmd-\ or cmd-< or to an action. Further, there are no optioned (alt-ed) modifiers available. I read in one of the other threads that there was a problem including the option/alt modifier because of Unicode confusion; however, I don't see how it could be any different than the shift modifier. But then, I'm not the programmer. Question: Any way to hack OpenOffice or NeoOffice to add more keystroke combinations?
There are a couple of things to address here.
First, about the option key. Other platforms use their "equivalent" of the option key ("alt" on Windows) as a "command-producing" key shortcut, i.e., they'd use opt-s for save (the Mozilla folks seem pretty bad about trying to assign opt-key as command shortcuts!). On the Mac, opt-key is reserved for keyboard entry (opt-s is ß)—sort of like shift, opt is only a modifier key, not a "command" key. Cmd-opt-key and Shift-cmd-opt-key *are* valid command shortcuts on the Mac, though.
I believe it was Ed who posted somewhere here on trinity that he had lobbied the OpenOffice.org folks to allow Cmd-opt-key to be a valid command shortcut for the Mac and the OpenOffice.org folks either ignored him or denied the request. The fact that the Mac allows ,><\ and all sorts of other keys to be valid shortcuts (when paired with cmd, of course), also seems to be lost on the OpenOffice.org folks making these decisions.
Using System Preferences to add additional keystrokes
However, all is not lost for users of NeoOffice (SOL with OOo/X11, though). Now that we have Aqua menus, you can use the OS's ability to customize keyboard shortcuts to assign other keys (as long as they don't conflict with existing shortcuts in OpenOffice).
First, make sure NeoOffice is not running. Then open the "Keyboard & Mouse" pane of the System Preferences and click on the "Keyboard Shortcuts" tab. Click on the "Application Shortcuts" item in the box, and then the + button at the bottom left. Select NeoOffice as your application, enter the name of the NeoOffice menu item you want to assign a shortcut to and then the desired shortcut. (Be sure to match the spelling and ... or … exactly). Restart NeoOffice and voilà !
- N.B. System Preferences sometimes loses track of which shortcuts you have assigned to applications (even though the shortcuts still work and are still properly recorded in the application's .plist). In this case, if you are comfortable editing the .plist manually, it is easier to add new shortcuts this way; otherwise, you will likely have to re-enter all of your previous shortcuts for the application, as well as the new ones you wish to add.
See the screenshots for examples of NeoOffice with modified keyboard shortcuts and menus.
Adding shortcuts to the "Quickstart" menu items
A brief discussion of the issues; more logical and streamlined answer to come :-)
Issues:
- Sharing/fighting over shortcut-command assignments
- Context-sensitive Cmd-N
- Hacking around "reserved" shortcuts
Remapping shortcuts for cursor movement
A number of keyboard shortcuts within NeoOffice do not adhere to Mac OS X standards (due to OpenOffice.org's origins as a Windows application). Among the most jarring of these are the shortcuts for cursor movement (e.g., to move to the beginning or end of a line, to move from word-to-word, etc.)
Moving to the beginning or end of a line
On all Mac applications, one can use the combination Cmd-↠(Command [Apple] + left arrow) to move to the beginning of line and the combination Cmd-→ (Command [Apple] + right arrow) to move to the end of the line. Unfortunately, in NeoOffice this combination is used to move word-by-word (which, on the Mac, is done by the combination Opt-â†(Option [Alt] + left arrow) or Opt-→ (Option [Alt] + right arrow).
It is possible, however, to remap the beginning/end of the line shortcuts within NeoOffice to match the correct Mac shortcuts by using the following procedure (note this will remove the shortcut for moving word-by-word), which works just like modifying shortcuts as described at the top of this page.
Remapping the keyboard shortcuts for beginning and end of line
- Open the Customize dialogue (choose Customize… from the Tools menu)
- Click on the Keyboard tab
- Make sure that the radio button for Writer (on the top right) is selected
- In the Category list (in the Functions section), choose Navigate
- In the Function list, choose To Line Begin (or To End of Line)
- In the Shortcut keys list, choose ⌘Left (or ⌘Right)
- Click on the Modify button (in the top right of the dialogue)
- Repeat steps 4 to 7 to change the definition of Cmd-Right/End of Line.
- Click on OK to assign these new shortcuts.
Note that moving word by word is no longer functional. It is possible to assign this function to another combination of keys (as we have just done for moving to the beginning and end of the line), but due to the unwillingness of OpenOffice.org engineers to accept a patch to allow Option (and Alt on Windows and Meta on Solaris) to be used as a modifier key, it is impossible to assign those behaviors to the proper Mac shortcuts of Opt-Left Arrow and Opt-Right Arrow using the "simple" Customize dialogue.
However, if you add To Word Left and To Word Right to any NeoOffice menu (I added them to the Window menu where they are relatively hidden), you can then use the steps described in Using System Preferences to add additional keystrokes above to reassign these commands to Opt-Left Arrow and Opt-Right Arrow.
You can repeat these set of steps for the related "selection" commands, too.