<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSStandardKeyBindingResponding",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(pl)NSStandardKeyBindingResponding"
  },
  "title" : "NSStandardKeyBindingResponding"
}
-->

# NSStandardKeyBindingResponding

Methods that responder subclasses implement to support key binding commands, such as inserting tabs and newlines, or moving the insertion point.

```
@MainActor protocol NSStandardKeyBindingResponding : NSObjectProtocol
```

## Overview

[`NSResponder`](/documentation/AppKit/NSResponder) doesn’t implement any of these methods. [`NSTextView`](/documentation/AppKit/NSTextView) implements a subset of them related to text editing. Your responder subclasses can implement any methods that make sense. You can create your own methods as well, but use these if the concepts map to functionality in your app. If your responder subclass is a view that’s key and uses key binding, and the user types a key sequence bound to a command not implemented in your class, nothing happens by default.

## Topics

### Responding to Key Commands

[`func doCommand(by: Selector)`](/documentation/AppKit/NSStandardKeyBindingResponding/doCommand(by:))

Performs the given selector if possible.

### Inserting Content

[`func insertBacktab(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/insertBacktab(_:))

Inserts a backtab character.

[`func insertContainerBreak(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/insertContainerBreak(_:))

Inserts a container break, such as a new page break.

[`func insertDoubleQuoteIgnoringSubstitution(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/insertDoubleQuoteIgnoringSubstitution(_:))

Inserts a double quotation mark without substituting a curly quotation mark.

[`func insertLineBreak(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/insertLineBreak(_:))

Inserts a line break character.

[`func insertNewline(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/insertNewline(_:))

Inserts a newline character.

[`func insertNewlineIgnoringFieldEditor(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/insertNewlineIgnoringFieldEditor(_:))

Inserts a newline character without invoking the field editor’s normal handling to end editing.

[`func insertParagraphSeparator(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/insertParagraphSeparator(_:))

Inserts a paragraph separator.

[`func insertSingleQuoteIgnoringSubstitution(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/insertSingleQuoteIgnoringSubstitution(_:))

[`func insertTab(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/insertTab(_:))

Inserts a tab character.

[`func insertTabIgnoringFieldEditor(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/insertTabIgnoringFieldEditor(_:))

[`func insertText(Any)`](/documentation/AppKit/NSStandardKeyBindingResponding/insertText(_:))

Inserts the text you specify.

### Deleting Content

[`func deleteBackward(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/deleteBackward(_:))

Deletes content moving backward from the current insertion point.

[`func deleteBackwardByDecomposingPreviousCharacter(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/deleteBackwardByDecomposingPreviousCharacter(_:))

[`func deleteForward(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/deleteForward(_:))

[`func deleteToBeginningOfLine(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/deleteToBeginningOfLine(_:))

Deletes content from the insertion point to the beginning of the current line.

[`func deleteToBeginningOfParagraph(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/deleteToBeginningOfParagraph(_:))

Deletes content from the insertion point to the beginning of the current paragraph.

[`func deleteToEndOfLine(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/deleteToEndOfLine(_:))

Deletes content from the insertion point to the end of the current line.

[`func deleteToEndOfParagraph(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/deleteToEndOfParagraph(_:))

Deletes content from the insertion point to the end of the current paragraph.

[`func deleteWordBackward(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/deleteWordBackward(_:))

Deletes the word preceding the current insertion point.

[`func deleteWordForward(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/deleteWordForward(_:))

[`func yank(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/yank(_:))

Deletes the current selection, placing it in a temporary buffer, such as the Clipboard.

### Moving the Insertion Pointer

[`func moveBackward(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/moveBackward(_:))

Moves the insertion pointer backward in the current content.

[`func moveDown(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/moveDown(_:))

Moves the insertion pointer down in the current content.

[`func moveForward(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/moveForward(_:))

Moves the insertion pointer forward in the current content.

[`func moveLeft(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/moveLeft(_:))

Moves the insertion pointer left in the current content.

[`func moveRight(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/moveRight(_:))

Moves the insertion pointer right in the current content.

[`func moveUp(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/moveUp(_:))

Moves the insertion pointer up in the current content.

### Modifying the Selection

[`func moveBackwardAndModifySelection(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/moveBackwardAndModifySelection(_:))

Extends the selection to include the content before the current selection.

[`func moveDownAndModifySelection(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/moveDownAndModifySelection(_:))

Extends the selection to include the content below the current selection.

[`func moveForwardAndModifySelection(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/moveForwardAndModifySelection(_:))

Extends the selection to include the content after the current selection.

[`func moveLeftAndModifySelection(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/moveLeftAndModifySelection(_:))

Extends the selection to include the content to the left of the current selection.

[`func moveRightAndModifySelection(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/moveRightAndModifySelection(_:))

Extends the selection to include the content to the right of the current selection.

[`func moveUpAndModifySelection(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/moveUpAndModifySelection(_:))

Extends the selection to include the content above the current selection.

### Scrolling Content

[`func scrollPageDown(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/scrollPageDown(_:))

Scrolls the content down by a page.

[`func scrollPageUp(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/scrollPageUp(_:))

Scrolls the content up by a page.

[`func scrollLineDown(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/scrollLineDown(_:))

Scrolls the content down by a line.

[`func scrollLineUp(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/scrollLineUp(_:))

Scrolls the content up by a line.

[`func scrollToBeginningOfDocument(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/scrollToBeginningOfDocument(_:))

Scrolls the content to the beginning of the document.

[`func scrollToEndOfDocument(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/scrollToEndOfDocument(_:))

Scrolls the content to the end of the document.

[`func pageDown(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/pageDown(_:))

Moves the visible content region down by a page.

[`func pageUp(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/pageUp(_:))

Moves the visible content region up by a page.

[`func pageDownAndModifySelection(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/pageDownAndModifySelection(_:))

Moves the visible content region down by a page, and extends the current selection.

[`func pageUpAndModifySelection(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/pageUpAndModifySelection(_:))

Moves the visible content region up by a page, and extends the current selection.

[`func centerSelectionInVisibleArea(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/centerSelectionInVisibleArea(_:))

Moves the visible content region so the current selection is visually centered.

### Transposing Elements

[`func transpose(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/transpose(_:))

Transposes the content around the current selection.

[`func transposeWords(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/transposeWords(_:))

Transposes the words around the current selection.

### Indenting Content

[`func indent(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/indent(_:))

Indents the content at the current selection.

### Canceling Operations

[`func cancelOperation(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/cancelOperation(_:))

Cancels the current operation.

### Supporting QuickLook

[`func quickLookPreviewItems(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/quickLookPreviewItems(_:))

Invokes QuickLook to preview the current selection.

### Supporting Writing Directions

[`func makeBaseWritingDirectionLeftToRight(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/makeBaseWritingDirectionLeftToRight(_:))

[`func makeBaseWritingDirectionNatural(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/makeBaseWritingDirectionNatural(_:))

[`func makeBaseWritingDirectionRightToLeft(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/makeBaseWritingDirectionRightToLeft(_:))

[`func makeTextWritingDirectionLeftToRight(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/makeTextWritingDirectionLeftToRight(_:))

[`func makeTextWritingDirectionNatural(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/makeTextWritingDirectionNatural(_:))

[`func makeTextWritingDirectionRightToLeft(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/makeTextWritingDirectionRightToLeft(_:))

### Changing Capitalization

[`func capitalizeWord(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/capitalizeWord(_:))

[`func changeCaseOfLetter(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/changeCaseOfLetter(_:))

[`func lowercaseWord(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/lowercaseWord(_:))

[`func uppercaseWord(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/uppercaseWord(_:))

### Moving the Selection in Documents

[`func moveToBeginningOfDocument(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/moveToBeginningOfDocument(_:))

[`func moveToBeginningOfDocumentAndModifySelection(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/moveToBeginningOfDocumentAndModifySelection(_:))

[`func moveToEndOfDocument(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/moveToEndOfDocument(_:))

[`func moveToEndOfDocumentAndModifySelection(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/moveToEndOfDocumentAndModifySelection(_:))

### Moving the Selection in Paragraphs

[`func moveParagraphBackwardAndModifySelection(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/moveParagraphBackwardAndModifySelection(_:))

[`func moveParagraphForwardAndModifySelection(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/moveParagraphForwardAndModifySelection(_:))

[`func moveToBeginningOfParagraph(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/moveToBeginningOfParagraph(_:))

[`func moveToBeginningOfParagraphAndModifySelection(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/moveToBeginningOfParagraphAndModifySelection(_:))

[`func moveToEndOfParagraph(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/moveToEndOfParagraph(_:))

[`func moveToEndOfParagraphAndModifySelection(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/moveToEndOfParagraphAndModifySelection(_:))

### Moving the Selection in Lines of Text

[`func moveToBeginningOfLine(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/moveToBeginningOfLine(_:))

[`func moveToBeginningOfLineAndModifySelection(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/moveToBeginningOfLineAndModifySelection(_:))

[`func moveToEndOfLine(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/moveToEndOfLine(_:))

[`func moveToEndOfLineAndModifySelection(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/moveToEndOfLineAndModifySelection(_:))

[`func moveToLeftEndOfLine(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/moveToLeftEndOfLine(_:))

[`func moveToLeftEndOfLineAndModifySelection(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/moveToLeftEndOfLineAndModifySelection(_:))

[`func moveToRightEndOfLine(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/moveToRightEndOfLine(_:))

[`func moveToRightEndOfLineAndModifySelection(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/moveToRightEndOfLineAndModifySelection(_:))

### Changing the Selection

[`func selectAll(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/selectAll(_:))

[`func selectLine(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/selectLine(_:))

[`func selectParagraph(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/selectParagraph(_:))

[`func selectWord(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/selectWord(_:))

### Supporting Marked Selections

[`func setMark(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/setMark(_:))

[`func selectToMark(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/selectToMark(_:))

[`func deleteToMark(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/deleteToMark(_:))

[`func swapWithMark(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/swapWithMark(_:))

### Supporting Autocomplete

[`func complete(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/complete(_:))

### Moving the Selection by Word Boundaries

[`func moveWordBackward(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/moveWordBackward(_:))

[`func moveWordBackwardAndModifySelection(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/moveWordBackwardAndModifySelection(_:))

[`func moveWordForward(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/moveWordForward(_:))

[`func moveWordForwardAndModifySelection(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/moveWordForwardAndModifySelection(_:))

[`func moveWordLeft(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/moveWordLeft(_:))

[`func moveWordLeftAndModifySelection(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/moveWordLeftAndModifySelection(_:))

[`func moveWordRight(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/moveWordRight(_:))

[`func moveWordRightAndModifySelection(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/moveWordRightAndModifySelection(_:))

### Instance Methods

[`func showContextMenuForSelection(Any?)`](/documentation/AppKit/NSStandardKeyBindingResponding/showContextMenuForSelection(_:))

## Relationships

### Conforming Types

[`NSGlassEffectContainerView`](/documentation/AppKit/NSGlassEffectContainerView)

[`NSBrowser`](/documentation/AppKit/NSBrowser)

[`NSOutlineView`](/documentation/AppKit/NSOutlineView)

[`NSBox`](/documentation/AppKit/NSBox)

[`NSSplitViewController`](/documentation/AppKit/NSSplitViewController)

[`NSComboButton`](/documentation/AppKit/NSComboButton)

[`NSColorPanel`](/documentation/AppKit/NSColorPanel)

[`NSScrubberTextItemView`](/documentation/AppKit/NSScrubberTextItemView)

[`NSPopover`](/documentation/AppKit/NSPopover)

[`NSScroller`](/documentation/AppKit/NSScroller)

[`NSScrubberItemView`](/documentation/AppKit/NSScrubberItemView)

[`NSWindow`](/documentation/AppKit/NSWindow)

[`NSOpenPanel`](/documentation/AppKit/NSOpenPanel)

[`NSScrubber`](/documentation/AppKit/NSScrubber)

[`NSFontPanel`](/documentation/AppKit/NSFontPanel)

[`NSWindowController`](/documentation/AppKit/NSWindowController)

[`NSRulerView`](/documentation/AppKit/NSRulerView)

[`NSTabViewController`](/documentation/AppKit/NSTabViewController)

[`NSView`](/documentation/AppKit/NSView)

[`NSLevelIndicator`](/documentation/AppKit/NSLevelIndicator)

[`NSScrubberArrangedView`](/documentation/AppKit/NSScrubberArrangedView)

[`NSDrawer`](/documentation/AppKit/NSDrawer)

[`NSPathControl`](/documentation/AppKit/NSPathControl)

[`NSCollectionView`](/documentation/AppKit/NSCollectionView)

[`NSRuleEditor`](/documentation/AppKit/NSRuleEditor)

[`NSBackgroundExtensionView`](/documentation/AppKit/NSBackgroundExtensionView)

[`NSStatusBarButton`](/documentation/AppKit/NSStatusBarButton)

[`NSTextInsertionIndicator`](/documentation/AppKit/NSTextInsertionIndicator)

[`NSViewController`](/documentation/AppKit/NSViewController)

[`NSComboBox`](/documentation/AppKit/NSComboBox)

[`NSSecureTextField`](/documentation/AppKit/NSSecureTextField)

[`NSTokenField`](/documentation/AppKit/NSTokenField)

[`NSProgressIndicator`](/documentation/AppKit/NSProgressIndicator)

[`NSOpenGLView`](/documentation/AppKit/NSOpenGLView)

[`NSTableHeaderView`](/documentation/AppKit/NSTableHeaderView)

[`NSForm`](/documentation/AppKit/NSForm)

[`NSColorWell`](/documentation/AppKit/NSColorWell)

[`NSScrubberSelectionView`](/documentation/AppKit/NSScrubberSelectionView)

[`NSSplitView`](/documentation/AppKit/NSSplitView)

[`NSResponder`](/documentation/AppKit/NSResponder)

[`NSTextField`](/documentation/AppKit/NSTextField)

[`NSImageView`](/documentation/AppKit/NSImageView)

[`NSCollectionViewItem`](/documentation/AppKit/NSCollectionViewItem)

[`NSClipView`](/documentation/AppKit/NSClipView)

[`NSDatePicker`](/documentation/AppKit/NSDatePicker)

[`NSTableView`](/documentation/AppKit/NSTableView)

[`NSMatrix`](/documentation/AppKit/NSMatrix)

[`NSPanel`](/documentation/AppKit/NSPanel)

[`NSSavePanel`](/documentation/AppKit/NSSavePanel)

[`NSTabView`](/documentation/AppKit/NSTabView)

[`NSPredicateEditor`](/documentation/AppKit/NSPredicateEditor)

[`NSSlider`](/documentation/AppKit/NSSlider)

[`NSStepper`](/documentation/AppKit/NSStepper)

[`NSScrubberImageItemView`](/documentation/AppKit/NSScrubberImageItemView)

[`NSApplication`](/documentation/AppKit/NSApplication)

[`NSControl`](/documentation/AppKit/NSControl)

[`NSScrollView`](/documentation/AppKit/NSScrollView)

[`NSTextView`](/documentation/AppKit/NSTextView)

[`NSTitlebarAccessoryViewController`](/documentation/AppKit/NSTitlebarAccessoryViewController)

[`NSStackView`](/documentation/AppKit/NSStackView)

[`NSButton`](/documentation/AppKit/NSButton)

[`NSSwitch`](/documentation/AppKit/NSSwitch)

[`NSTableRowView`](/documentation/AppKit/NSTableRowView)

[`NSGridView`](/documentation/AppKit/NSGridView)

[`NSPopUpButton`](/documentation/AppKit/NSPopUpButton)

[`NSText`](/documentation/AppKit/NSText)

[`NSSegmentedControl`](/documentation/AppKit/NSSegmentedControl)

[`NSTableCellView`](/documentation/AppKit/NSTableCellView)

[`NSVisualEffectView`](/documentation/AppKit/NSVisualEffectView)

[`NSSearchField`](/documentation/AppKit/NSSearchField)

[`NSSplitViewItemAccessoryViewController`](/documentation/AppKit/NSSplitViewItemAccessoryViewController)

[`NSGlassEffectView`](/documentation/AppKit/NSGlassEffectView)

[`NSPageController`](/documentation/AppKit/NSPageController)

### Inherits From

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)