Apple - A faster alternative for arrow keys?

You can use this :

  • ctrl+A: beginning of line.

  • ctrl+E: end of line.

  • ctrl+U: delete from cursor to beginning of line.

  • ctrl+K: delete from cursor to end of line.

  • ctrl+W: erase word to the left.

  • ctrl+T: transpose characters around cursor.


Many OS X text views support a few Emacs style shortcuts like:

  • control-p moves up
  • control-n moves down
  • control-b moves left
  • control-f moves right

To see a full list of the shortcuts, run plutil -convert xml1 /System/Library/Frameworks/AppKit.framework/Resources/StandardKeyBinding.dict -o -|pl|grep -v noop:|ruby -pe '$_.gsub!(/[^ -~\n]/){"\\U%04x"%$&.ord}'.

You can use KeyRemap4MacBook to make the Emacs style shortcuts work in more places:

<?xml version="1.0"?>
<root>
  <appdef>
    <appname>EMACSMODEIGNORE</appname>
    <equal>com.googlecode.iterm2</equal>
    <equal>org.gnu.Emacs</equal>
    <equal>com.apple.Terminal</equal>
    <equal>com.vmware.fusion</equal>
  </appdef>
  <item>
    <identifier>emacs</identifier>
    <name>emacs</name>
    <not>EMACSMODEIGNORE</not>
    <autogen>__KeyToKey__ KeyCode::P, VK_CONTROL | ModifierFlag::NONE, KeyCode::CURSOR_UP</autogen>
    <autogen>__KeyToKey__ KeyCode::N, VK_CONTROL | ModifierFlag::NONE, KeyCode::CURSOR_DOWN</autogen>
    <autogen>__KeyToKey__ KeyCode::B, VK_CONTROL | ModifierFlag::NONE, KeyCode::CURSOR_LEFT</autogen>
    <autogen>__KeyToKey__ KeyCode::F, VK_CONTROL | ModifierFlag::NONE, KeyCode::CURSOR_RIGHT</autogen>
    <autogen>__KeyToKey__ KeyCode::P, VK_CONTROL | VK_SHIFT | ModifierFlag::NONE, KeyCode::CURSOR_UP, VK_SHIFT</autogen>
    <autogen>__KeyToKey__ KeyCode::N, VK_CONTROL | VK_SHIFT | ModifierFlag::NONE, KeyCode::CURSOR_DOWN, VK_SHIFT</autogen>
    <autogen>__KeyToKey__ KeyCode::B, VK_CONTROL | VK_SHIFT | ModifierFlag::NONE, KeyCode::CURSOR_LEFT, VK_SHIFT</autogen>
    <autogen>__KeyToKey__ KeyCode::F, VK_CONTROL | VK_SHIFT | ModifierFlag::NONE, KeyCode::CURSOR_RIGHT, VK_SHIFT</autogen>
    <autogen>__KeyToKey__ KeyCode::B, VK_OPTION | ModifierFlag::NONE, KeyCode::CURSOR_LEFT, VK_OPTION</autogen>
    <autogen>__KeyToKey__ KeyCode::F, VK_OPTION | ModifierFlag::NONE, KeyCode::CURSOR_RIGHT, VK_OPTION</autogen>
    <autogen>__KeyToKey__ KeyCode::B, VK_OPTION | VK_SHIFT | ModifierFlag::NONE, KeyCode::CURSOR_LEFT, VK_OPTION | VK_SHIFT</autogen>
    <autogen>__KeyToKey__ KeyCode::F, VK_OPTION | VK_SHIFT | ModifierFlag::NONE, KeyCode::CURSOR_RIGHT, VK_OPTION | VK_SHIFT</autogen>
    <autogen>__KeyToKey__ KeyCode::I, VK_CONTROL | ModifierFlag::NONE, KeyCode::TAB</autogen>
    <autogen>__KeyToKey__ KeyCode::D, VK_OPTION | ModifierFlag::NONE, KeyCode::FORWARD_DELETE, VK_OPTION</autogen>
  </item>
</root>

This would map fn-U to the left arrow key:

<autogen>__KeyToKey__ KeyCode::U, ModifierFlag::FN, KeyCode::CURSOR_LEFT</autogen>

See https://pqrs.org/macosx/keyremap4macbook/xml.html.en or http://osxnotes.net/keyremap4macbook.html for more information.


You can use BetterTouchTool http://www.boastr.de to globally assign keyboard shortcuts. However You can't assign fn key.

enter image description here

Tags:

Keyboard