I have a strange problem with my new MacBook Pro running Sierra. After visiting some web sites (such as stackexchange, gmail, and web.whatsapp.com), the F4 key stops to work in all applications. All other function keys continue working normally, as well as starting launchpad (which is also on the F4 key). It seems pressing the F4 key does not generate any key code anymore, according to Key Codes.

  • This happens both with the internal MacBook keyboard as well as the apple wireless keyboard.
  • Logging out and logging in again (or rebooting) fixes the F4 key, only quitting Safari does not fix it.
  • Disabling Javascript (via Safari preferences) leaves the F4 key enabled.
  • Other browsers (Chrome, Firefox) are not affected by this issue.
  • It is a completely fresh installation of Sierra and happens without installing any additional programs or modifying any settings. Tested with 10.12.2 and 10.12.3.

Did anyone notice the same issue?

Does anyone have an idea how to debug or prevent this issue?

An easy way to test if you have this issue is by:

  1. Log in.
  2. Start the terminal.
  3. Press Control-v and F4 in the terminal. It should print ^[OS.
  4. Start Safari, go to stackexchange.com.
  5. Repeat step 3, nothing gets printed on the terminal. Pressing Control-v and F3 still prints the correct code for F3, ^[OR.
  • 1
    Some questions: (1) As far as you know, is this only happening in Safari? (2) If yes to 1, is it only happening after visiting certain sites? If so, can you provide a few examples of the sites. (3) Do you experience the same issue when booted into Safe Mode? (4) Have you installed the latest 10.12.3 update? (5) What exact model of MBP do you have? (6) Can you confirm that the F4 key stops working for all applications only after visiting certain websites and only after visiting those sites in Safari? (7) How do you disable javascript?
    – Monomeeth
    Jan 27, 2017 at 20:24
  • 1
    At present I'm only in front of Macs running El Capitan or earlier. FWIW, I cannot replicate the problem on these, but should be in front of Sierra machines this afternoon and will test it on those.
    – Monomeeth
    Jan 27, 2017 at 22:33
  • 1
    Sorry for the delay in my response, but I've now tried this on two 2016 MacBook Pros and a 5K iMac 27" and I couldn't replicate the problem on any of these. All were running macOS Sierra. What happens if you boot into Safe Mode and try it?
    – Monomeeth
    Jan 29, 2017 at 2:32
  • 1
    Oops, I forgot I'd already asked you about Safe Mode. I've just done some more testing using three MacBook Pro 2016 models - two with Touch Bar, one without - and I still couldn't replicate your issue. All MBPs had macOS Sierra 10.12.3 installed and I tried the U.S., U.S. International and Australian Keyboard layouts. Can you clarify what your Keyboard settings are in System Preferences > Keyboard?
    – Monomeeth
    Jan 29, 2017 at 5:50
  • 1
    It's happening to me too. I'm going to take my laptop in for service this week, I'll let you know what's going on. Can I ask if you're seeing some graphics glitches? It's highly unlikely, but maybe correlated?
    – Daniel
    Feb 1, 2017 at 18:03

1 Answer 1


Based on the info you've provided during our comments history, and the fact I couldn't replicate this issue on five separate computers, including three 2016 MacBook Pros running macOS Sierra 10.12.3, the only solution I have is to try a full reinstallation / test / update process.

IMPORTANT - Ensure you have a full backup before proceeding with these steps!

  1. Shutdown your MBP
  2. Switch on your MBP
  3. Immediately press and hold the CommandR keys until you see the Apple logo appear
  4. When you see the Utilities window appear, select Disk Utility and click on Continue
  5. Select your MBP drive from the sidebar on the left
  6. Click on the Erase button
  7. Click on the Format drop-down list and select Mac OS Extended (Journaled)
  8. Enter a name for your disk
  9. Click Erase
  10. When completed, Quit Disk Utility
  11. Select Reinstall macOS from the Utilities window (do not choose the Restore from Time Machine Backup option)
  12. Follow the instructions to reinstall macOS
  13. When installation is complete and you have rebooted, follow the prompts to setup your MBP. However, do not choose to copy files or migrate any data from your backups. Instead, set the MBP up as a totally new computer.
  14. When complete, test to see if your issue still persists
  15. Assuming your issue is now resolved, use the Mac App Store to update macOS, Safari, etc. However, do not copy any of your backed up files yet.
  16. Now test to see if your issue is still gone
  17. If all is good, then copy your backed up data to your MBP again. You can do this by using Migration Assistant (located within the Utilities folder within your Applications folder).

NOTE - If your issue still persists at Step 14 (when you first test for it again) then go through the entire process again. However, this time at Step 3 hold the CommandOptionR keys instead so that you start up from Internet Recovery. This will take longer to do, but eliminates the possibilty of some random problem with the local Recovery partition.

  • I tried the internet recovery you suggested (I had tried the normal recovery earlier already), and my issue with the F4 key still persists... It seems to remain an unsolved mystery...
    – mdd
    Jan 30, 2017 at 19:06
  • 1
    Well, if you reformatted the drive as per steps 4 - 9 and did the installation via the internet (not your USB) then I'm at a loss. This certainly doesn't appear to be a hardware issue and you have no other software installed. I would go into an Apple Store and physically show them how the F4 key stops functioning across apps, even with an external keyboard. If one isn't near you, then call Apple Support and see what they can do. At the very least get a reference number for the issue so there is a record of it on file with Apple.
    – Monomeeth
    Jan 30, 2017 at 21:14
  • 1
    If it's happening for you it'll also happen for others, we just don't know yet what the common denominator will be, except to say it's likely to be some random conflict. Hopefully it's addressed in some future update, but that can only happen if Apple is aware of it. In the meantime you have some workarounds (using other browsers, disabling JavaScript in Safari, etc). Sorry I couldn't be of more help. Maybe someone else can shed some light on this.
    – Monomeeth
    Jan 30, 2017 at 21:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .