question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Change default keyboard shortcuts for macOS

See original GitHub issue

On a macbook pro some of the default keyboard shortcuts of Spyder collide with “normal” functions on OSX.

Home/End (<kbd>Command+Up</kbd>, <kbd>Command+Down</kbd>) are taken by Move to previous/next cell.

Also, moving to the start and end of a file (<kbd>Command+Left</kbd>, <kbd>Command+Right</kbd>) is taken by move to next/previous word, which on Mac make more sense to use <kbd>Opt/Alt+Left</kbd>, <kbd>Opt/Alt+Right</kbd>, instead of command.

I suggest changing this default shortcuts to things that make sense on Mac

Document shortcuts
The behavior of these shortcuts may vary with the app you're using.

Command-B: Boldface the selected text, or turn boldfacing on or off. 
Command-I: Italicize the selected text, or turn italics on or off.
Command-K: Add a web link.
Command-U: Underline the selected text, or turn underlining on or off.
Command-T: Show or hide the Fonts window.
Command-D: Select the Desktop folder from within an Open dialog or Save dialog.
Control-Command-D: Show or hide the definition of the selected word.
Shift-Command-Colon (:): Display the Spelling and Grammar window.
Command-Semicolon (;): Find misspelled words in the document.
Option-Delete: Delete the word to the left of the insertion point.
Control-H: Delete the character to the left of the insertion point. Or use Delete.
Control-D: Delete the character to the right of the insertion point. Or use Fn-Delete.
Fn-Delete: Forward delete on keyboards that don't have a Forward Delete   key. Or use Control-D.
Control-K: Delete the text between the insertion point and the end of the line or paragraph.
Fn–Up Arrow: Page Up: Scroll up one page. 
Fn–Down Arrow: Page Down: Scroll down one page.
Fn–Left Arrow: Home: Scroll to the beginning of a document.
Fn–Right Arrow: End: Scroll to the end of a document.
Command–Up Arrow: Move the insertion point to the beginning of the document.
Command–Down Arrow: Move the insertion point to the end of the document.
Command–Left Arrow: Move the insertion point to the beginning of the current line.
Command–Right Arrow: Move the insertion point to the end of the current line.
Option–Left Arrow: Move the insertion point to the beginning of the previous word.
Option–Right Arrow: Move the insertion point to the end of the next word.
Shift–Command–Up Arrow: Select the text between the insertion point and the beginning of the document.
Shift–Command–Down Arrow: Select the text between the insertion point and the end of the document.
Shift–Command–Left Arrow: Select the text between the insertion point and the beginning of the current line.
Shift–Command–Right Arrow: Select the text between the insertion point and the end of the current line.
Shift–Up Arrow: Extend text selection to the nearest character at the same horizontal location on the line above.
Shift–Down Arrow: Extend text selection to the nearest character at the same horizontal location on the line below.
Shift–Left Arrow: Extend text selection one character to the left.
Shift–Right Arrow: Extend text selection one character to the right.
Option–Shift–Up Arrow: Extend text selection to the beginning of the current paragraph, then to the beginning of the following paragraph if pressed again.
Option–Shift–Down Arrow: Extend text selection to the end of the current paragraph, then to the end of the following paragraph if pressed again.
Option–Shift–Left Arrow: Extend text selection to the beginning of the current word, then to the beginning of the following word if pressed again.
Option–Shift–Right Arrow: Extend text selection to the end of the current word, then to the end of the following word if pressed again.
Control-A: Move to the beginning of the line or paragraph.
Control-E: Move to the end of a line or paragraph.
Control-F: Move one character forward.
Control-B: Move one character backward.
Control-L: Center the cursor or selection in the visible area.
Control-P: Move up one line.
Control-N: Move down one line.
Control-O: Insert a new line after the insertion point.
Control-T: Swap the character behind the insertion point with the character in front of the insertion point.
Command–Left Curly Bracket ({): Left align.
Command–Right Curly Bracket (}): Right align.
Shift–Command–Vertical bar (|): Center align.
Option-Command-F: Go to the search field. 
Option-Command-T: Show or hide a toolbar in the app.
Option-Command-C: Copy Style: Copy the formatting settings of the selected item to the Clipboard.
Option-Command-V: Paste Style: Apply the copied style to the selected item.
Option-Shift-Command-V: Paste and Match Style: Apply the style of the surrounding content to the item pasted within that content.
Option-Command-I: Show or hide the inspector window.
Shift-Command-P:  Page setup: Display a window for selecting document settings.
Shift-Command-S: Display the Save As dialog, or duplicate the current document.
Shift–Command–Minus sign (-): Decrease the size of the selected item.
Shift–Command–Plus sign (+): Increase the size of the selected item. Command–Equal sign (=) performs the same function.
Shift–Command–Question mark (?): Open the Help menu.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:5
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
goanpecacommented, Nov 27, 2019

As in it is very annoying not being able to move to the start or end of file with <kbd>Cmd+Up/Cmd+Down</kbd> as in any other IDE/TexteEditor on mac

1reaction
goanpecacommented, Nov 27, 2019

Or do you prefer to have the shortcuts above as the primary ones in macOS?

I think they should be the primary one, because the point is to have the “normal” mac commands first. Also having an additional set of shortcuts would not help as they are currently colliding with the default Mac actions.

Any thoughts here @impact27 ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to change OSX System (Default) Shortcuts? - Ask Different
Go into System Preferences > Keyboard > Shortcuts, select Accessibility on left Pane and check "Invert colors" shortcut.
Read more >
Is it possible to change or override the default keyboard ...
An example would be to override the Cmd + N for a New Finder Window to some other action, say Open a blank...
Read more >
Mac Tutorial: How to Customize Your Keyboard Commands
To customize your keyboard, open up System Preferences and go to the Keyboard preferences. Go to the Shortcuts Tab. Click on App Shortcuts...
Read more >
How to Customize Your OS X Keyboard and Add Shortcuts
At the bottom of the Keyboard tab, the “Change Keyboard Type…” button will open a wizard that will ask you to press certain...
Read more >
Default Mac OS X Keyboard Shortcuts List
Option-Command-W · Close all windows ; Command-X · Cut ; Option-Command-Y · Slideshow (Mac OS X 10.5 or later) ; Command-Z · Undo...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found