Emulate the ‘insert’ key in ‘Terminal’ on a Mac

This will be one of those ‘Duh, obviously’ type posts for most Mac native users, but for myself, being an ex-Windows admin for years before having anything to do with macs, I have always tended to use a Windows admin VM for when I needed things like an ssh session using ‘putty’, but more and more lately I am trying to streamline, so have been running with Terminal in Mac OS X more and more

However this presents me with some challenges sometime, like where’s that damn insert key? I have seen similar posts stating things like ‘ctrl+right arrow key’ will do it, but that doesn’t work for me as I have loads of separate desktops and this just jumps me between them.

So I found the following for remapping key functionality in terminal

    • In Terminal.app’s Preferences, go to ‘Settings’ and select ‘Keyboard’

<EDIT> The ‘Setting‘ tab under ‘Terminal Preferences’ has now changed to ‘Profiles‘ – not sure which release this happened in but I am running Mac OS X Mojave 10.14.3
Screenshot 2019-04-06 20.00.25

    •  Find the Key you want to replace, I used the ‘F5’ key as on my external Apple Keyboard this key has no other secondary functions already, and change the default Action value to:
  • \033[2~

You can obviously use any key you like and I’m sure there’s loads of other ways to do this, but I have found this works well for me

Unknown's avatar

Author: Will Rodbard

I am a Principal Architect at VMware, and I have been here since 2011. I have spent over well 25 years in IT roles along with a smattering of other jobs throughout my life.

4 thoughts on “Emulate the ‘insert’ key in ‘Terminal’ on a Mac”

    1. Hi Frederick, it looks like the ‘Settings’ option has now changed to ‘Profiles’, not sure which release this changed in, but it’s been quite a while since I wrote this post.
      I am running Mac OS X Mojave 10.14.3, I will add a screenshot just to highlight this change as well.
      Thanks for asking 🙂

      1. Thanks, Will, for your reply. I followed your instructions but it didn’t work. I was told
        Fredericks-iMac:~ Jack$ \033[2~
        -bash: 033[2~: command not found
        Fredericks-iMac:~ Jack$ \033[2~
        -bash: 033[2~: command not found
        Fredericks-iMac:~ Jack$

        I guess I’m doing something wrong. Went to Profiles, chose F5 \033[2~, went to edit and chose Option, but after that got the above response. Don’t know what to do now.

  1. Awesome, I can close down VMware and Wintendo and disconnect my gaming keyboard again. F13 mapped and ready to Insert… haha Thanks

Leave a reply to Frederick Fuller Cancel reply