I'm used to the F5 key being the Refresh command (as it is in Windows OS for every browser I've ever used there) and not Command-R (which takes two fingers). On Mac OS X Lion, how can I assign the F5 key to be refresh inside Chrome?
4 Answers
You can change the shortcuts of menu items in System Preferences, but you can't assign multiple shortcuts to them.
You could also assign a shortcut to a script like this:
try
tell application "Google Chrome" to reload tab 1 of window 1
end try
1) Go to Preferences > Keyboard > Keyboard Shortcuts.
2) Select "Application Shortcuts" from the left menu.
3) Click "+".
4) Fill out the form like so: Application Google Chrome, Menu Title: Reload This Page
, Keyboard Shortcut F5.
5) Click "Add".
-
12To clarify steps: 1) Go to Preferences > Keyboard > Keyboard Shortcuts. 2) Select "Application Shortcuts" from the left menu. 3) Click "+". 4) Fill out the form like so: Application
Google Chrome
, Menu TitleReload This Page
, Keyboard Shortcutf5
. 5) Click "Add". Jul 29, 2013 at 16:03 -
14To clarify a bit more, the text of the shortcut should be exactly as it is in the "View" menu of Chrome, including the language. For instance, for the French version of Chrome, it would be "Actualiser cette page" and "Forcer l'actualisation de cette page".– laurentAug 19, 2013 at 15:22
-
thanks for clarification!!!!! this is just so... unusual :)))) Nov 3, 2016 at 8:21
-
In case you use Karabiner Elements, make sure to open it's "Function keys" tab and check "Use all F1, F2, etc. keys as standard function keys" at the bottom Oct 14, 2019 at 13:52
Looks like they moved the location of the shortcut at least since the previous commenter posted.
I'm using El Capitan 10.11.13 and for me it is in System Preferences > Keyboard Shortcuts > App Shortcuts
F5 will refresh the page in Firefox but it's not currently enabled in Chrome for some reason. Using App Shortcuts in Keyboard preferences will get F5 to work, but it disables Command-R as a refresh shortcut. This wasn't a good solution for me so I removed the F5 shortcut definition. It had bugged me for months and I've finally solved it with Karabiner and help from the accepted answer:
<vkopenurldef>
<name>KeyCode::VK_OPEN_URL_SHELL_chrome_refresh</name>
<url type="shell">osascript -e 'tell application "Google Chrome" to reload active tab of window 1'</url>
</vkopenurldef>
<item>
<name>Refresh Chrome Page With F5</name>
<appendix>Enables the F5 key to refresh the page in Google Chrome.</appendix>
<identifier>private.function_five</identifier>
<only>GOOGLE_CHROME</only>
<autogen>__KeyToKey__ KeyCode::F5, KeyCode::VK_OPEN_URL_SHELL_chrome_refresh</autogen>
</item>
Open Karabiner's preferences, then on the Misc & Uninstall tab click the Open private.xml button. It'll open Finder and you can open the file from there in your favorite text editor. Enter the code above between the <root>
tags and save the file. Go back to the Karabiner preferences and switch to the Change Key tab and at the top right, click the Reload XML button. The new option should appear at the top and all you have to do is enable it.
Details:
- The
<vkopenurldef>
element defines an applescript command that can be bound to another key. This command tells Chrome to reload the active tab in window 1 (window 1 appears to be the active window). - The
<item>
element binds the new command to a physical key - in this case F5.
Official instructions on the private.xml file can be found here: https://pqrs.org/osx/karabiner/document.html.en#privatexml
If your on OS X that has Notification Center such as El Capitan follow the answer of Crhistian and then go to Mission Control in Keyboard Shortcuts and disable the F5 shortcut for Show Notification Center (and assign an alternative if you wish). BTW, this will disable the CTRL + R shortcut.