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.

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.

share|improve this question

2 Answers 2

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:

<appdef>
  <appname>INTELLIJ</appname>
  <equal>com.jetbrains.intellij.ce</equal>
</appdef>
<item>
  <name>test</name>
  <identifier>test</identifier>
  <block>
    <only>INTELLIJ</only>
    <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>
  </block>
  <block>
    <not>INTELLIJ</not>
    <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>
  </block>
</item>

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

share|improve this answer
    
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). –  ؘؘؘؘ 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? –  ؘؘؘؘ 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
up vote 0 down vote accepted

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.

share|improve this answer

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.