1

There are other questions and answers about how to enable the key Backspace to go back to the previous page in Safari, but none of them work on my newly installed Mojave even though it used to work on High Sierra.

How can I enable this behaviour in Mojave?

  • This doesn't work? defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2BackspaceKeyNavigationEnabled -bool YES – Marc Wilson Oct 2 '18 at 16:03
  • @MarcWilson No, it doesn't. – marczellm Oct 3 '18 at 9:55
1

Update: You can add a keyboard shortcut from the terminal but it requires to disable system integrity. defaults write com.apple.Safari NSUserKeyEquivalents -dict-add Back "\U232b"

Alternative you can install a Safari Extension which injects a script that bring back the functionality. For example:

document.addEventListener("DOMContentLoaded", function(event) {
    function handleBackspace(e) {
        if (e.keyCode === 8 && !e.ctrlKey && !e.shiftKey
            && e.target.tagName !== 'INPUT' && e.target.tagName !== 'TEXTAREA'
            && e.target.contentEditable !== 'true' // TinyMCE
            ) {
            e.preventDefault();
            window.history.go(-1);
        }
    }
    window.addEventListener('keydown', handleBackspace, false);
});

You must log in to answer this question.

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