I know ctrl+right/ctrl+left will do that, but I am used to pressing Home/End and it's frustrating when it doesn't do it in IntelliJ. I use KeyRemap4Macbook which works great for terminal and elsewhere with the Home/End key setting, but the settings for some reason do not work in IntelliJ.

I am on MAC OSX, IJ 12.1.4.


IntelliJ IDEA doesn't seem to support ⌃A and ⌃E but it does support ⌘← and ⌘→. You could use this setting instead:

Or add something like this to private.xml:

    <autogen>__KeyToKey__ KeyCode::HOME, ModifierFlag::NONE, KeyCode::CURSOR_LEFT, ModifierFlag::COMMAND_L</autogen>
    <autogen>__KeyToKey__ KeyCode::END, ModifierFlag::NONE, KeyCode::CURSOR_RIGHT, ModifierFlag::COMMAND_L</autogen>
    <autogen>__KeyToKey__ KeyCode::HOME, VK_SHIFT | ModifierFlag::NONE, KeyCode::CURSOR_LEFT, ModifierFlag::COMMAND_L | ModifierFlag::SHIFT_L</autogen>
    <autogen>__KeyToKey__ KeyCode::END, VK_SHIFT | ModifierFlag::NONE, KeyCode::CURSOR_RIGHT, ModifierFlag::COMMAND_L | ModifierFlag::SHIFT_L</autogen>
    <autogen>__KeyToKey__ KeyCode::HOME, ModifierFlag::NONE, KeyCode::A, ModifierFlag::CONTROL_L</autogen>
    <autogen>__KeyToKey__ KeyCode::END, ModifierFlag::NONE, KeyCode::E, ModifierFlag::CONTROL_L</autogen>
    <autogen>__KeyToKey__ KeyCode::HOME, VK_SHIFT | ModifierFlag::NONE, KeyCode::A, ModifierFlag::CONTROL_L | ModifierFlag::SHIFT_L</autogen>
    <autogen>__KeyToKey__ KeyCode::END, VK_SHIFT | ModifierFlag::NONE, KeyCode::E, ModifierFlag::CONTROL_L | ModifierFlag::SHIFT_L</autogen>

You can see the source of the predefined settings from https://raw.github.com/tekezo/KeyRemap4MacBook/master/Tests/lib/string/data/checkbox.xml.

  • Hi Lauri, I used the exact setting in KeyRemap4Macbook as u posted the screenshot of, it DOES NOT change home to cmd+left in IntelliJ. It does it elsewhere. Where is the private.xml file? I couldn't find it in IntelliJ's package contents.. – Siddhartha Aug 23 '13 at 0:21
  • 1
    It worked for me with both the community edition and ultimate edition. private.xml is in ~/Library/Application Support/KeyRemap4MacBook/ (see the link). – Lri Aug 23 '13 at 2:06
  • That xml snippet didn't work, but I got it to work somehow else. I posted it below. Thanks for your answer! – Siddhartha Aug 23 '13 at 17:16
  • Did you include the <?xml version="1.0"?> and <root> elements, or did you enable the setting in KeyRemap4MacBook.app? – Lri Aug 23 '13 at 18:20
  • It already had: <?xml version="1.0"?> <root> </root> I added the snippet after it. – Siddhartha Aug 23 '13 at 20:27

So there are 2 settings in KeyRemap4MacBook:

enter image description here

Unchecking the first option, and keeping the 2nd checked allowed me to use Home/End in IJ.

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.