0

I was using an iMac from 2009. I had upgraded it regularly, going up to (and including) Mavericks. When I first got that iMac, I fixed the keys in Terminal so Home and End would move the cursor to the start and end of the current line. I also fixed Delete (the forward delete, to the left of the main keyboard on the USB keyboards) so it would work "properly" and delete the character to the right of the cursor.

This worked without problems through all the upgrades.

This past week I upgraded to a new 27" iMac. Migration Assistant did not work and AppleCare wasn't clear why (but we suspect the drive in the old computer is failing - so it could have encountered bad files). So I started fresh with the new iMac and installed the programs I need and, when necessary, I copied over the files in ~/Library/Application Support/ for each application. (I mention all this to point out what I've done and that the keybindings didn't transfer.)

I also did this for terminal, including copying over my old .bash_profile file, too. Unfortunately, the keybindings did not transfer. I've been trying to recreate them.

I found universal solutions (in other words, the same solution on many websites) for the Home and End keys and a few solutions for the Delete key. Basically, all these solutions include opening Preferences, going to the Keyboard tab and changing the action for all three keys as follows:

Home: \033[1~
End: \033[4~
Delete: \033[3~

And this is where I run into problems. While these are the actions on my old iMac, the new iMac can't handle them. For all three, I get the same output: Nothing happens (as in no cursor movement) and then a "~" prints to the terminal. (I have the Terminal declared as VT102 and have tried VT100. Either worked on my old system and I'd like to use one of those, if at all possible, since I sometimes have to use minicom and log into a system that uses VT100 codes and I need that emulation.)

I'd love to find one of two solutions:

1) What am I doing wrong or what do I need to change so my terminal will process the escape sequences correctly? 2) What could I copy over, besides ~/Library/Application Support that will include the data for the old keybindings on the old computer so they work properly?

  • Is there no way to see the keybindings on your new iMac? If they contain quotes for example, you know how to write them yourself (example Home: "\033[1~" ) – Rob Mar 4 '14 at 7:55
  • I see the keybindings. The preferences window for Terminal on the new one looks just like on the old one. I think it's 100% identical, but I haven't compared each tab and I think it's the same as it's been for a while. They do not contain any quotes. – Tango Mar 4 '14 at 8:00
  • Can you grep on your filesystem if there's another file containing keybindings? – Rob Mar 4 '14 at 8:08
  • Sure - do you have suggestions on what patterns to use? Is it actually stored as "\033[1~" or more in binary form? And any idea of any directories to limit it to? At this point I have over 1.5 TB on this drive and 800 GB on the other one, so that's a LOT to search if I go through it all. (And, remember, the old one seems to have a failing drive.) – Tango Mar 4 '14 at 8:12

You must log in to answer this question.

Browse other questions tagged .