Mac OS X Porting - Keyboard Shortcuts

From Apache OpenOffice Wiki
Jump to: navigation, search

Contributors

Introduction

For most of the keyboard shortcuts in OpenOffice.org, the Mac OS X port will follow the other OpenOffice.org platforms, to maintain consistency and allow people to use several platforms without much re-learning.

However, there are some special cases that require Mac OS X port to make exceptions in shortcuts, compared to the other platforms:

  • Mac OS X System has global keyboard shortcuts that override existing OpenOffice.org shortcuts
  • Apple Human Interface Guidelines (AHIG) requires that all Mac OS X applications define certain common set of shortcuts. That common set might cause a change for shortcut to have different functionality.
  Example:
  
  When the user press F9 in OpenOffice.org (native version or X11 version), the fields are not refreshed, 
  because the Mac OS X function Exposé is launched and catches the key accelerator (to refresh the fields, go to
  Tools>Refresh>Fields in the menu.
  
  What we have to do is to change the conflicting key accelerators for OpenOffice.org.

Apple Developer Connection (ADC) Reference Library: highlights

Accessibility Overview: Appendix A: Accessibility Keyboard Shortcuts

  • keyboard shortcuts that are reserved for use with various Universal Access features in Mac OS X

Apple Human Interface Guidelines: Keyboard Shortcuts Quick Reference

  • system-reserved and commonly used keyboard shortcuts

Apple Human Interface Guidelines: Selecting

Apple Human Interface Guidelines: The Keyboard

Application Architecture Overview: Features of a Cocoa Application

  • … Menu Management … The application takes care of … accelerator keys …

NSTextView Class Reference

  • complete — invokes completion in a text view … By default invoked using the F5 key, this method provides users with a choice of completions for the word currently being typed. May be invoked programmatically if autocompletion is desired by a client of the text system. You can change the key invoking this method using the text system’s key bindings mechanism; see “Text System Defaults and Key Bindings" for an explanation of the procedure.

System Services: Services Properties

Text System Defaults and Key Bindings

Mac OS X Shortcuts (under construction)

Introduction

This new section marked with under construction will contain as many as possible shortcuts available on Mac OS X. All these shortcuts are Apple HIG compliant and we should check them in OO.o and fix them if they do not work as expected.

Sections

Please, split shortcuts to smaller sections to make it easily editable. It's a pain to edit one long table. Thanks.

How to edit

Copy complete specification of shortcuts from Apple HIG to this wiki page and add red comments if something's wrong. If we use this way, we can have idea how it should work, how it works and what to fix.

You can find duplicates in tables below. That's because they are duplicated in Apple's HIG documentation. I do not want to remove them to avoid mistakes.

Synonyms and distinctions

accelerate, bind and shortcut

In Apple terms:

  • a key may be bound
  • there may be multiple keystroke bindings
  • the expression accelerator is not always used
  • the expression shortcut is not always used.
command key

ADC Reference Library tends to refer to the command key. The command key is also known as:

On a British keyboard the command key is labelled with a place of interest sign:

plus either of the following labels:

cmd

completion of text

In Apple terms: the user may invoke completion, typically using the F5 key.

Completion may be invoked programmatically if autocompletion is desired by a client of the text system.

OpenOffice.org uses terms such as:

  • Auto-complete
  • AutoInput
  • Word completion
option key

ADC Reference Library tends to refer to the option key. The option key is also known as:

  • opt
  • alt

On a British keyboard the option key is usually labelled:

alt
⌥

Roadmap

CWS

macshortcuts01

Status: Integrated

More info: Multiplatform shortcuts

Target: OO.o 3.2

Shortcuts for macshortcuts01
App Current Proposal Shortdesc
OO.o Cmd-M Ctrl-M Default formatting - Writer Issue 98951 , Calc Issue 98950 , meta Issue 98949
OO.o F11 Cmd-T Styles and formatting Issue 99637
OO.o Cmd-Y Cmd-Shift-Z Redo - All Issue 99177
OO.o Cmd-M Minimize current window Issue 98949
OO.o Cmd-Option-M Minimize all application windows Issue 98949

Additional issues fixed: Issue 99254 , Issue 99296

macshortcuts02

Planned CWS.

This CWS should include fixes for shortcuts not included in 01.

Common shortcuts

Description
Status Description
OK OpenOffice.org shortcut works as expected or Mac OS X reserved shortcut is not used by the OpenOffice.org.
EE Shortcut doesn't work and can be fixed
II To implement this shortcut we need to enhance OO.o because of missing menu items, ...

Moving the insertion point with the arrow keys

Moving the insertion point
Status Key Moves insertion point
OK Right Arrow One character to the right
OK Left Arrow One character to the left
OK Up Arrow To the line above, to the nearest character boundary at the same horizontal location
OK Down Arrow To the line below, to the nearest character boundary at the same horizontal location
EE Option–Right Arrow To the end of current word, then to the end of the next word

It moves to the beginning of next word, then to the beginning of the next word

OK Option–Left Arrow To the beginning of the current word, then to the beginning of the previous word
OK Option–Up Arrow To the beginning of the current paragraph, then to the beginning of the previous paragraph
EE Option–Down Arrow To the end of the current paragraph, then to the end of the next paragraph (not to the blank line after the paragraph, if there is one)

Blank line is not skipped

EE Command–Right Arrow To the next semantic unit, typically the end of the current line, then the end of the next line

Doesn't work for next lines. It jumps to the end of the current line, but not to the ends of next lines.

EE Command–Left Arrow To the previous semantic unit, typically the beginning of the current line, then the previous unit

Doesn't work for previous lines. It jumps to the beginning of the current line, but not to the beginnings of previous lines.

OK Command–Up Arrow Upward in the next semantic unit, typically the beginning of the document
OK Command–Down Arrow Downward in the next semantic unit, typically the end of the document

Exception: For non-Roman script systems, Command–Left Arrow and Command–Right Arrow are reserved for changing the direction of keyboard input.

Extending selection with Shift and the arrow keys

Extending selection
Status Key Extends selection
OK Shift-Right Arrow One character to the right
OK Shift-Left Arrow One character to the left
OK Shift-Up Arrow To the line above, to the nearest character boundary at the same horizontal location
OK Shift-Down Arrow To the line below, to the nearest character boundary at the same horizontal location
EE Shift-Option–Right Arrow To the end of current word, then to the end of the next word

It moves to the beginning of next word, then to the beginning of the next word

OK Shift-Option–Left Arrow To the beginning of the current word, then to the beginning of the previous word
OK Shift-Option–Up Arrow To the beginning of the current paragraph, then to the beginning of the previous paragraph
EE Shift-Option–Down Arrow To the end of the current paragraph, then to the end of the next paragraph (not to the blank line after the paragraph, if there is one)

Blank line is not skipped

EE Shift-Command–Right Arrow To the next semantic unit, typically the end of the current line, then the end of the next line

Doesn't work for next lines. It jumps to the end of the current line, but not to the ends of next lines.

EE Shift-Command–Left Arrow To the previous semantic unit, typically the beginning of the current line, then the previous unit

Doesn't work for previous lines. It jumps to the beginning of the current line, but not to the beginnings of previous lines.

OK Shift-Command–Up Arrow Upward in the next semantic unit, typically the beginning of the document
OK Shift-Command–Down Arrow Downward in the next semantic unit, typically the end of the document

Reserved shortcuts

Don’t use the keys and key combinations in Table below for actions other than those listed in the table.

Shortcuts below are Mac specific and they are not passed to application.

Reserved shortcuts
Status Keys Action
OK Esc Cancel the current action
OK Command-Tab Activate the most recently used open application
OK Command-Shift-Tab Activate the least recently used open application
OK Command-Option-D Show or hide the Dock
OK Command-H Hide the active application
OK Command-Option-H Hide other applications (all but the active one)
EE Command-Shift-Q Log out

OO.o: Interrupt Macro

OK Command-Shift-Option-Q Log out without confirmation
OK Command-Shift-Option-Control-Q Force log out without confirmation
OK Command–Space bar Show or hide Spotlight search field
OK Command-Option-Esc Open the Force Quit dialog
EE Command-F5 Turn VoiceOver on or off

OO.o: Control Focus

OK Control-F1 Turn full keyboard navigation on or off
OK Control-F7 Toggle keyboard navigation in windows and dialogs
EE F9 Tile or untile all open windows

Writer: Fields
Calc: Recalculate
Impress: Slideshow, F5 is also assigned, but F9 should be removed, see Issue 9917

OK F10 Tile or untile all open windows in current application
EE F11 Hide or show all open windows

Writer, Calc, Impress, Draw: Styles and Formatting

EE F12 Display or hide Dashboard

Writer: Numbering On/Off
Calc: Group

Reserved shortcuts for international systems

Reserved shortcuts for international systems
Status Keys Action
 ? Command–Space bar Rotate through enabled script systems
 ? Command–Option–Space bar Rotate through keyboard layouts and input methods within a script
 ? Command–modifier key–Space bar Apple reserved
 ? Command–Right Arrow Change keyboard layout to current layout of Roman script
 ? Command–Left Arrow Change keyboard layout to current layout of system script

Recommended shortcuts using Shift to complement other commands

Recommended shortcuts using Shift to complement other commands
Status Keys Command Complemented command
II Command-Shift-A Deselect All Command-A (Select All)

There's no Edit - Deselect All

II Command-Shift-G Find Previous Command-G (Find Again)

There's no Find Again / Previous. These should be assigned in Find & Replace dialog?

II Command-Shift-P Page Setup Command-P (Print)

This should be probably assigned to File - Printer Settings

OK Command-Shift-S Save As Command-S (Save)
OK Command-Shift-V Paste as (Paste as Quotation, for example) Command-V (Paste)
EE Command-Shift-Z Redo Command-Z (Undo)

OO.o has Cmd-Y as Redo

Note: Command-Shift-Z would be used for Redo only if Undo and Redo are separate commands (rather than toggled using Command-Z).

Accessibility shortcuts - zooming

Screen zooming
Status Keys Action
OK Option-Command-8 Turns screen zooming on or off
OK Option-Command-= Zooms in
OK Option-Command-- (hyphen) Zooms out
OK Command-Option-Control-8 Inverts the screen colors
OK Command-Option-Control-, Reduces contrast
OK Command-Option-Control-. Increases contrast

Accessibility shortcuts - moving focus

Focus moving in full keyboard access mode
Status Keys Action
 ? Control-F1 Turns full keyboard access on or off
 ? Control-F2 Moves focus to the menu bar
 ? Control-F3 Moves focus to the Dock
 ? Control-F4 Moves focus to the active (or next) window
 ? Shift-Control-F4 Moves focus to the previous window
 ? Control-F5 Moves focus to the toolbar
 ? Control-F6 Moves focus to the first (or next) utility window
 ? Shift-Control-F6 Moves focus to the previous utility window
 ? Control-F7 Toggles the keyboard access mode in windows and dialogs between all controls and just text fields and scrolling lists
 ? Control-Tab Moves focus to the next grouping of controls in a dialog or the next table (when Tab moves to next cell)
 ? Shift-Control-Tab Moves focus to the previous grouping of controls
 ? Command-Tab Moves focus to the first (or next) open application’s Dock icon
 ? Command-Shift-Tab Moves focus to the previous open application’s Dock icon
 ? Arrow key Moves focus to the next or previous value in a text field or certain controls, such as menus; also opens Dock menus
 ? Control–arrow key Moves focus to another value or cell within a control such as a table
OK Command-` (grave accent) Activates the next open window in the frontmost application
OK Command-Shift-` (grave accent) Activates the previous open window in the frontmost application
 ? Command-Option-` (grave accent) Moves focus to the window drawer
 ? Space bar Selects the highlighted control (equivalent to clicking the mouse button)
EE Return (Enter) Selects the default button works only for Return key, Enter most of the time doesn't do anything (i94369)
OK Esc Cancels a dialog or a selection in a pop-up menu or list; in a Dock menu, Esc closes the menu and moves the focus to the frontmost window

Quick Reference Shortcuts

Here's a list of shortcuts from Quick Reference [1] from Apple. Table below doesn't contain all shortcuts from this page, only reasonable ones and those not listed above.

Alphabet keys
Alphabet shortcuts
Status Keys Action
OK Cmd-Z Reverse the effect of the user's previous operation (Undo)
EE Cmd-Shift-Z Reverse the effect of the last Undo command (Redo)

OO.o uses Cmd-Y

OK Cmd-X Remove selection and store on the Clipboard (Cut)
OK Cmd-W Close the active window (equivalent to the Close command)
EE Shift-Cmd-W Close a file and its associated windows

This should be associated with File - Close command

EE Option-Cmd-W Close all windows in the application

There's no File - Close All or Window - Close All menu item

OK Cmd-V Insert the Clipboard contents at the insertion point (Paste)
II Option-Cmd-V Apply the style of one object to the selected object (Paste Style)

AFAIK no Paste Style in OO.o

II Option-Shift-Cmd-V Apply the style of the surrounding text to the insert object (Paste and Match Style)

not exactly implemented in OO.o, but in the "Paste Special" menu there's "Paste Unformatted", which is almost the same

II Ctrl-Cmd-V Apply formatting settings to the select object (Paste Ruler)

Probably Format brush, need more info

OK Cmd-U Underline the selected text or turn underlining on or off
EE Cmd-T Display the Fonts window

OO.o uses F11, which is captured by Mac OS X.

Issue 99204 Alt-Cmd-T Mac OS X: show or hide the Character Palette. (Show or hide a toolbar.

As we have more than one toolbar, we should save all visible toolbars and hide / show them.)

OK Cmd-S Save
OK Shift-Option-S Save As
OK Cmd-Q Quit the application
OK Cmd-P Display the Print dialog
EE Shift-Cmd-P Display a dialog for specifying printing parameters

This should be probably assigned to File - Printer Settings

OK Cmd-O Open a new document
OK Cmd-N Open a new document
EE Cmd-M Minimize the active window to the Dock

Window is minimized, but Writer, Calc, ... use this shortcut for default formatting

EE Option-Cmd-M Minimize all windows of the active application to the Dock

Doesnt' work, beeps only

OK Cmd-J Scroll to a selection
OK Cmd-I Italicize the selected text or toggle italic text on or off
EE Option-Cmd-I Display and inspector window

This should display Character ... dialog in Writer for example. Same as right mouse click - Character ... This is for what Inspector window is used in other applications.

OK Cmd-H Hide the windows of the currently running application
OK Option-Cmd-H Hide the windows of all other running applications
EE Cmd-G Find the next occurence of the selection

This should be assigned to Find button in the Find & Replace dialog at least

EE Shift-Cmd-G Find the previous occurence of the selection

This should be assigned to Find button in the Find & Replace dialog at least and search direction should be set to backwards.

OK Cmd-F Open a Find window
II Option-Cmd-F Jump to search field control

There's no search field control

EE Cmd-E Use the selection for a find operation

OO.o uses this shortcut to center text/object. This shortcut should open Find & Replace dialog and put selected text into the search for field. Cmd-| (pipe) should be used for centering.

OK Cmd-D Double underline - it's not HIG, but it not violates HIG too
OK Cmd-C Duplicate the selected data and store on the Clipboard (Copy)
II Shift-Cmd-C Display the Colors window

Does it make sense to display floating window with colors? Probably not yet

II Option-Cmd-C Copy the style of the selected text (Copy Style)

We can probably enhance clipboard and add additional style object, so, user can copy style and paste it to objects with Option-Cmd-P?

II Ctrl-Cmd-C Copy the formatting settings of the selected item and store on the Clipboard (Copy Ruler)

Same as for the previous one. No Style, but hardcoded formatting combined with Style?

EE Cmd-B Boldface the selected text or toggle boldfaces text on or off
OK Cmd-A Select all
Special keys
Alphabet shortcuts
Status Keys Action
OK Option-Cmd-8 Turn screen zooming on or off
OK Option-Ctrl-Cmd-8 Invert the screen colors
OK Shift-Cmd-4 Capture a selection to a file
OK Shift-Ctrl-Cmd-4 Capture a selection to the Clipboard
OK Shift-Cmd-3 Capture the screen to a file
OK Shift-Ctrl-Cmd-3 Capture the screen to the Clipboard
EE Shift-Cmd-= Increase the size of the selected item

Normally, font size is increased. Other applications use this shortcut to zoom in page.

OK Option-Cmd-= Zoom in when screen zooming is on
OK Option-Cmd-/ Turn font smoothing on or off
EE Cmd-? Open the application's help viewer

OO. uses F1

OK Option-Ctrl-Cmd-. Increase screen contrast
OK Option-Ctrl-Cmd-, Decrease screen contrast
OK Cmd-, Open the application's preferences window
EE Cmd-; Find mispelled words in the document

FIXME - proposal

EE Cmd-(pipe) Center-align a selection

OO.o uses Cmd-E, which should be used for something else.

EE Cmd-} Right-align a selection

OO.o uses Cmd-R

EE Cmd-{ Left-align a selection

OO.o uses Cmd-L

OK Option-Cmd-- (hyphen) Zoom out when screen zooming is on
EE Cmd-- (hyphen) Decrease the size of the selected item

It should decrease font size of selection. Other applications use this shortcut to zoom out whole page.

OK Cmd-` Activate the next open window in the frontmost application
OK Shift-Cmd-` Activate the previous open window in the frontmost application
 ?? Option-Cmd-` Move focus to the window drawer
... ... To be done

Mac OS X Shortcuts

The following table describes the differences in keyboard shortcuts and the reasons for the changes. For detailed information, see: Apple Human Interface Guidelines, AHIG for key accelerators and menus and for menu examples

OpenOffice.org Mac OS X shortcuts
Generic OpenOffice.org
Functionality Ideal OpenOffice.org OpenOffice.org Aqua Reason
Main command key Command (CMD)
the "Apple" key
Command (CMD)
the "Apple" key
(implementation in progress)
In Mac OS X, the Command -modifier is the logical equivalent of Control modifier in Windows and Linux
Function keys F1 - F12 - Function keys in Mac OS X have system-wide functionality (like F9 for Exposé)
Spotlight search CMD-Space - This shortcut is used system-wide in Mac OS X
Apple reserved CMD-Shift-Space - This shortcut is used system-wide in Mac OS X (see Apple shortcut documentation)
Preferences...
access to settings
CMD-,
i.e. comma
CMD-,
same shortcut
AHIG, system-wide standard.
Mac OS X: Preferences... in (System-wide) Application menu, i.e. the "Apple-menu"
OOo: Tools > Options
Help CMD-?
i.e. question mark
F1 AHIG, system-wide standard
Undo CMD-Z CMD-Z AHIG, system-wide standard
Redo CMD-SHIFT-Z CMD-Y AHIG, system-wide standard
Spellcheck CMD-;
i.e. semicolon
F7 AHIG, system-wide standard.
Mac OS X: Edit > Spellcheck
Non-breaking space Option-Space CTRL-Space conflicts with Mac OS X System. See also Wikipedia:Non-breaking space
Close CMD-W
Close in File -menu
CTRL-F4 and CTRL-W AHIG, system-wide standard. OOo: window > Close window with the key accelerator and File > Close without key accelerator.
Minimize
minimize window
CMD-M
Minimize in Window -menu
 ?? AHIG, system-wide standard.
Hide
hide window
CMD-H
Hides the Window
CMD-H
Hides the Window
AHIG, system-wide standard.
Copy
copy
CMD-C
Copy
CMD-C
Copy
AHIG, system-wide standard.
Paste
paste
CMD-V
paste
CMD-V
paste
AHIG, system-wide standard.
Paste and Match style CMD-SHIFT-OPTION-V
Paste and Match style in Edit -menu
-
Paste Special -> Unformatted text in Edit -menu
There is no direct command in OOo. CTRL-SHIFT-V activates the paste special dialog. However, the "Paste and Match style" should have shortcut as the text is more intuitive and is very handy when copy-pasting between different documents.
Open
open'
CMD-O
Open
CMD-O
Open
AHIG, system-wide standard.
Print
print
CMD-P
print
CMD-P
print
AHIG, system-wide standard.
Save CMD-S save CMD-S save AHIG, system-wide standard.
Save As CMD-SHIFT-S - AHIG, system-wide standard.
Left-align CMD-{
i.e. left bracket
CTRL-l AHIG, system-wide standard
Right-align CMD-}
i.e. right bracket
CTRL-r AHIG, system-wide standard
Align to center CMD-|
i.e. pipe
CTRL-e AHIG, system-wide standard
Decrease size of the selected item CMD--  ?? AHIG, system-wide standard.
Apple Pages: Format > Font > Smaller
Equivalent of the Smaller command in OpenOffice.org
Increase size of the selected item CMD-+  ?? AHIG, system-wide standard.
Apple Pages: Format > Font > Bigger
Equivalent of the ?? command in OpenOffice.org
Conditional hyphen  ?? CTRL-- conflicts with AHIG
OpenOffice.org Writer
Functionality OpenOffice.org Mac OS X OpenOffice.org Reason
Refresh fields  ?? F9 Conflicts with Mac OS X system.
OOo: Tools > Refresh > Fields
Style dialog CMD-SHIFT-T F11 Conflicts with Mac OS X system.
Apple Pages: View > Show Styles Drawer
Default format in Format -menu CTRL-M CTRL-SHIFT-Space Conflicts with Apple reserved shortcut, see Apple shortcut documentation
Apple Pages: Format > Reapply Defaults to Selection
OOo: Format > Default format
OpenOffice.org Calc
Functionality OpenOffice.org Mac OS X OpenOffice.org Reason
Recalculate the cell content  ?? F9 Conflicts with Mac OS X system.
OOo: Tools > Cell content > Recalculate
Group (data)  ?? F12 Conflicts with Mac OS X system.
OOo: Data > Plan > Group

Keyboard Viewer in Mac OS X

Screen shots

British

See also

Auto-completion

  • … list all parts of OpenOffice.org providing some kind of auto-completion feature, then compare and discuss their respective user interfaces …

AutoInput

  • … will discuss the user interface for the AutoInput feature in Calc (also known as auto-completion.) …

Word completion

  • … behavior of the Word Completion feature in Writer (sometime called auto-completion.) …

GullFOSS

Personal tools