Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I recently purchased a Macbook Pro and found out that I really miss the Home and End keys found on full keyboards. I know that you can press fn+left/dn+right for home and end but it simply isn't practical and not very quick, especially given how tiny the left and right keys are.
So I was looking at a way to make them go elsewhere. I thought about the "eject disc" button, but I already mapped that to the "Delete" command which I missed even more. There's still the Caps Lock key, sitting there unmapped, easy to reach, and very large and accessible, seems perfect! Only, it's one key and I'd like two. So I thought "How about making this key acts as "Home" key when the cursor is at the end of a line, but as "End" key otherwise?" This feels like an acceptable compromise. Is there any way to do so? I'd like a way to do that on Linux, but I appreciate answers that work regardless of the platform.

share|improve this question
up vote 0 down vote accepted

What you're asking for isn't impossible, but it'd be a pain, and i doubt any tools for this exist. I'm 95% positive that the behavior you're after can't be achieved by keybindings alone: you'd need to write a program that captures keyboard input, and then inspects the state of the typing area you're in, and then sends either "Home" or "End". This is certainly doable, but i'm not sure it's worth the effort.

share|improve this answer

Your Answer


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.