I've been searching the other posts for an answer to this but they all have been slightly different than what I am looking for.

I am used to developing in OS X where the simple keyboard shortcut Command+ goes to the end of line.

Is there a way to wire up this command on Ubuntu? I have a Mac Book with Ubuntu so I don't have an End key.

I've tried the Custom Shortcuts in the Keyboard settings but can't get the command to work for end of line.

Any suggestions?

  1. Install xdotool : sudo apt-get install xdotool
  2. Go to system connections -> keyboard -> shortcuts -> custom
  3. Create new shortcut, binding bash -c "xdotool getactivewindow key End" command to some key combination
| improve this answer | |
  • That is perfect, thank you! For a bonus, how could I do command shift right arrow to highlight to end of line? – tyelford Apr 3 '16 at 11:16
  • @tyelford sorry , i don't have a mac, what's the command +shift + right-arrow does ? – Sergiy Kolodyazhnyy Apr 3 '16 at 11:19
  • 1
    Ah . . . well , same idea, make a shortcut for it , but use xdotool getactivewindow key Shift+End as a comman. Also . . .try to get out of the Mac mode of thinking - there's no command key on Ubuntu. There is super key, which acts more like Window's key – Sergiy Kolodyazhnyy Apr 3 '16 at 11:26
  • 1
    Thank you again, I nearly had it but forgot the plus between the Shift and End. Yes I know the super key is like the windows key but that particular shortcut is so handy because my left thumb is can reach the super key perfectly. – tyelford Apr 3 '16 at 11:30
  • 1
    This is so true. I'm sorely missing Ctrl-A and Ctrl-E for Home and End. The home and end keys on a PC keyboard are placed too far away. You want these shortcuts immediately available whilst your typing code. – forgetso Nov 22 '18 at 11:26

On a Mac keyboard (running Ubuntu), the

function (fn) key + left/right arrow
key seems to be equivalent to the
command +left/right arrow
functionality seen native Mac environment.

| improve this answer | |
  • Thanks! worked on my MacBook Pro running Lubuntu – Miguel Mota Sep 24 '19 at 4:39
  • That also worked on my Dell Inspiron keyboard running Ubuntu. – Anurag Bhandari Jul 2 at 2:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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