Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

My Setup

computer: Macbook pro

OS: OS X Snow Leopard

Software: Terminal.app, GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin10.0)

The Server's Setup

Hardware: Not sure

OS: Ubuntu 11.10

Software: GNU bash, version 4.2.10(1)-release (x86_64-pc-linux-gnu)

The Issue

When logged into a linux server via ssh, I find that a lot of the keybindings (mostly default) I use don't seem to work. Specifically stuff like tab completion, history etc.

I sort of understand why this would be the case, as these are two different operating systems; however I was wondering if there would be a way of preserving some or all of my current keybindings when logging into the other server?

There are quite a few different keybindings I would like to have available, but these are some that I use most commonly:

  • fn + left-arrow = home
  • fn + right-arrow = end
  • Tab completion of file names/locations

The first two are custom keybindings, not the mac standard.

share|improve this question
2  
Try looking into .inputrc on your local computer and the server you are SSH'd into. You can change keybindings there. I don't know about OS X, but I'm assuming there's a /etc/.inputrc and possibly a ~/.inputrc and there will be those on the server, too. –  Rob Nov 30 '11 at 20:54
    
Please explain in more detail what keybindings exactly (for what functionality) you want on the server. –  Daniel Beck Dec 10 '11 at 9:24

1 Answer 1

Try with the loadkeys command.

You should find the correct map according to your language. The keyboard maps are located in different folders depending on your linux distribution. In the case of RHEL and derivates (CentOS, SL, ...) you can find them under /lib/kbd/keymaps/, and for mac in particular, have a look at: /lib/kbd/keymaps/mac/all/

So, the final command will look like this.

$ /bin/loadkeys /lib/kbd/keymaps/mac/all/mac-us.map.gz
share|improve this answer
    
To the best of my knowledge Loadkeys isn't available on Mac os x, which is a shame as it seems a really useful way of managing bindings. –  Sam Murray-Sutton Jan 3 '12 at 14:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.