Molte visualizzazioni di testo OS X supportano alcune scorciatoie di stile di Emacs come:
- control-p si sposta verso l'alto
- control-n si sposta verso il basso
- control-b si sposta a sinistra
- control-f si sposta a destra
Per visualizzare un elenco completo delle scorciatoie, esegui plutil -convert xml1 /System/Library/Frameworks/AppKit.framework/Resources/StandardKeyBinding.dict -o -|pl|grep -v noop:|ruby -pe '$_.gsub!(/[^ -~\n]/){"\U%04x"%$&.ord}'
.
Puoi usare KeyRemap4MacBook per far funzionare le scorciatoie di stile di Emacs in più punti:
<?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>
Questo mapperebbe fn-U al tasto freccia sinistra:
<autogen>__KeyToKey__ KeyCode::U, ModifierFlag::FN, KeyCode::CURSOR_LEFT</autogen>
Vedi link o link per ulteriori informazioni.