osx - Firefox on Mac OS X: keyboard shortcut for ‘Highlight all’ in find bar

22
2013-10
  • Rabarberski

    I've previously asked the question if there is a Firefox keyboard shortcut for the 'highlight all' feature in the Find toolbar at the bottom of the Firefox window. This was on Windows. On Mac there is no Alt-key logic, so Alt + a doesn't work.

    So, is there any way to toggle 'highlight all' on Mac?

  • Answers
  • Peter Mortensen

    You can push Control + A in Mac OS X to do the same thing as ALT + A in Windows.

  • fvsch

    Short answer: ⌘ Cmd↩ Enter works too.

    Long answer: There's a second set of keyboard shortcuts that works when the focus is in the Find toolbar's input (i.e. the text box that has focus when you show the Find toolbar).

    ↩ Enter : Find the next occurrence of the phrase (same as ⌘ CmdG)

    ⇧ Shift↩ Enter : Find the previous occurrence of the phrase (same as ⌘ Cmd⇧ ShiftG)

    ⌘ Cmd↩ Enter : Toggle Highlight all occurrences of the phrase (same as ⌅ CtrlA)

    Source: testing all key combinations I could think of, in Firefox 25 Aurora (might not work in previous versions; the Find toolbar was redesigned in Firefox 25, so some shortcuts may have changed or been added.)


  • Related Question

    Windows to Mac keyboard shortcuts
  • Matt Dawdy

    I have seen many articles telling what the Mac shortcuts are, but I would like to know if there is a way to change a few of them. Namely, when I want to do text selection and cursor positioning.

    In Windows, I use control-end and control-home and control-arrow keys a LOT. In Mac, I know that I need to use the alt key instead.

    Copy and paste, instead of being based on the control key, are based on the apple key (windows key for me -- using a Microsoft Natural keyboard).

    Is there any place I can go in Mac and alter the keyboard shortcuts for those few commands that I want to do?


  • Related Answers
  • 8088

    While I understand that you want to change these shortcuts because you're used to the Windows ones, I'd encourage you to learn to use the Mac shortcuts, because if you ever run across a Mac system, chances are it will be set up that way — that's the way they're "meant" to be for Macs. Home and End have a different meaning on Macs: they're for navigation, not for cursor movement. You can usually use Option or Command and the arrow keys to do what you want.

    Nonetheless, if you insist on changing them, there are a few things to do:

    • Look at the file StandardKeyBinding.dict in /System/Library/Frameworks/AppKit.framework/Resources/. It contains all of the default keyboard shortcuts related to text editing (@ is command, ~ is option, $ is shift, and ^ is control). Pick out the ones you want to change, and stick their modified versions (more information on the key specifiers is here; keep in mind you'll want to change the "...AndModifySelection:" ones too) in a similar file in ~/Library/KeyBindings/DefaultKeyBinding.dict. You can also use a plain-text format, which instead of having

      ... <dict> <key>k</key><string>value</string> ... </dict> ...
      

      uses the format

      { "key" = "value"; ... }
      
    • To change the modifier keys themselves, go into the Keyboard & Mouse preferences, and click Modifier Keys under the Keyboard tab:

      modifier keys

    • To change "regular" keyboard shortcuts which aren't built into the Cocoa text system, you can change them in the Keyboard Shortcuts tab. If they're not in the list, you can add them by pressing the "+" button.

      custom shortcuts

  • Jonathan Sampson

    http://guides.macrumors.com/Changing_Keyboard_Shortcuts

    To view or change system-level Keyboard shortcuts:

    1. Open the Keyboard & Mouse Preference Pane
    2. Click on the Keyboard Shortcuts tab
    3. To change a shortcut, double click on the existing shortcut, and press the keys that make up your new shortcut.
    4. If you make a mistake, click '"Restore Defaults to return the keyboard shortcuts to the factory defaults.