I know I can do control+a but I want command+left. I'm using the fish shell.
I tried creating an apple script to call control+a when I hit command+left but that caused it to call command+control+a which didn't work.
Using KeyRemap4MacBook, you could save this as private.xml:
<?xml version="1.0"?>
<root>
<item>
<name>test</name>
<identifier>private.test</identifier>
<only>TERMINAL</only>
<autogen>--KeyToKey-- KeyCode::CURSOR_LEFT, VK_COMMAND, KeyCode::A, ModifierFlag::CONTROL_L</autogen>
<autogen>--KeyToKey-- KeyCode::CURSOR_RIGHT, VK_COMMAND, KeyCode::E, ModifierFlag::CONTROL_L</autogen>
<autogen>--KeyToKey-- KeyCode::DELETE, VK_COMMAND, KeyCode::U, ModifierFlag::CONTROL_L</autogen>
<autogen>--KeyToKey-- KeyCode::FORWARD_DELETE, VK_COMMAND, KeyCode::K, ModifierFlag::CONTROL_L</autogen>
</item>
</root>
I couldn't figure out how to change command+fn+delete to C-k.
There's also a predefined setting in terminal.xml, but it only works with the left command, and it includes other remappings that aren't really needed anymore.
You can make ⌥⌦ delete a word forward by adding this to ~/.inputrc:
"\e(": kill-word
fish
usereadline
? If so, when you enter theread
command, and then press ⌘←, what does it output?readline
but fish didn't recognize the command.read
, notreadline
:)