Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.9: Terminal text shortcuts still work in Safari Apps
I should have stumbled on this one years ago but I have just realised typing in Safari's address bar and unconsciously doing Ctrl+a to go to the start of my query, that it works.

We recall these life saving Unix text editing shortcuts:
  • 'Ctrl+a' : go to start of the line
  • 'Ctrl+e' : go to the eol
  • 'Ctrl+k' : delete all chars to the right of the cursor
I have tested those with success in various standard Dialog Boxes, TextEdit windows andin Safari's address bar; it seems to be a relatively system wide standard. Of course no luck with MS apps, they use their non-standard Alt+arrows (when most other Mac apps use the widely known Ctrl+arrows).

First my sincerest apologies to all those who knew and if there ever was a similar hint since 2003 in the DB. [crarko adds: At the time this hint was originally submitted the site's search function was not working.]

Ever watchful of posting etiquette, I did Google to make sure I was on to something greater than being ridiculed. Alas, after some efforts, I did find a full reference elsewhere. Still I post this stale and quasi 'hint', feigning to take comfort I may help some (one or two ?) and trying to find pitiful schadenfreude at the same time.

[crarko adds: Cute. There are plenty of older versions of this notion, this being a handy one. Now that the site's search feature is back up I'm sure there are others. Nevertheless, there are enough Mac users around who are new since 2001 that a little refresher isn't all bad.]
    •    
  • Currently 1.72 / 5
  You rated: 4 / 5 (18 votes cast)
 
[7,172 views]  

10.9: Terminal text shortcuts still work in Safari | 7 comments | Create New Account
Click here to return to the '10.9: Terminal text shortcuts still work in Safari' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.9: Terminal text shortcuts still work in Safari
Authored by: joh on Jun 27, '14 07:48:19AM

These aren't Terminal shortcuts but Emacs shortcuts. OS X inherited them from NeXTStep.

By the way: iOS inherited these from OS X in turn, they work also on iPads and iPhones if you attach a BT keyboard!



[ Reply to This | # ]
10.9: Terminal text shortcuts still work in Safari
Authored by: nova20 on Jun 28, '14 08:12:17AM

This works in TextEdit, Safari address bar and dialog boxes as well:

alt/option+arrow up : go to start of the line
alt/option+arrow down : go to the end of line
alt/option+arrow right : go right to end of word, then right to end of next word
alt/option+arrow left : go left to start of word, then left to start of next word

Edited on Jun 28, '14 08:45:18AM by nova20



[ Reply to This | # ]
10.9: Terminal text shortcuts still work in Safari
Authored by: Makosuke on Jul 01, '14 01:35:06PM

nova20 mentioned the option-arrow shortcuts, but there are also command-arrow shortcuts, and they might have been clearer about what was meant by "beginning of line":

  • option-up arrow: previous line break (that is, go to the beginning of this paragraph, if soft-wrapped text)
  • option-down arrow: next line break (that is, go to the end of this paragraph, if soft-wrapped text)
  • command-left arrow: beginning of this line (that is, the leftmost character on the current line)
  • command-right arrow: end of this line (that is, the rightmost character on the current line, wherever it wraps)
  • command-up arrow: beginning of document
  • command-down arrow: end of document


[ Reply to This | # ]
10.9: Terminal text shortcuts still work in Safari
Authored by: VikingOSX on Jul 06, '14 10:24:41AM
There are additional shortcuts in the Text Selection Shortcuts section of the Mac OS X keyboard shortcuts guide.

[ Reply to This | # ]
10.9: Terminal text shortcuts still work in Safari
Authored by: harryrossi on Jul 16, '14 01:33:21AM
I love shortcuts and much respect for Safari on having all the essentials. Love learning more of them. Another one that I only recently learned is "CMD+A" which selects all the text on the page. Extremely useful for copy pasting content on pages!! Regards, Harry Rossi

[ Reply to This | # ]
10.9: Terminal text shortcuts still work in Safari
Authored by: ob1cannoli on Aug 01, '14 06:41:45PM

The real hint: http://osxnotes.net/keybindings.html

You can create a ~/Library/KeyBindings/DefaultKeyBinding.dict and supplement the default keybindings with many many more.

There's another great writeup of DefaultKeyBinding.dict here: http://brettterpstra.com//2011/08/13/keybinding-madness/



[ Reply to This | # ]
10.9: Terminal text shortcuts still work in Safari
Authored by: DeminJanu on Aug 18, '14 05:27:54PM
Interesting that emacs shortcuts are system-wide! I definitely did not know that, thanks for posting.

The command &/or option shortcuts have been a staple of the Mac OS since I was a kid (command for start-end of lines/top-bottom of documents & option for just words/paragraphs).

Note holding Shift will then SELECT the corresponding text - this is where it gets exceptionally handy.
(eg. Option-Shift-Right to select the next word, option-shift-down to select to the end of the paragraph, command-shift-down to select to the bottom of the document etc. etc.

I use Command-up & command-down often in Safari to see the top or bottom of a page, where useful links are usually stored.

These pretty much work in MS docs too, as they're system-wide text-editing shortcuts. I never realized how much these shortcuts are ingrained in my use of a keyboard - I suppose they're not so obvious, are they?

It's interesting that Emacs shortcuts also work in tandem with holding Shift to select. What is the emacs command for top/bottom? Does emacs have a start/end-of-current-paragraph shortcut too, like the Mac OS's option-down/up?

[ Reply to This | # ]