Molte viste di testo OS X supportano alcune scorciatoie di stile Emacs come:
- control-p si alza
- control-n si sposta in 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 in stile Emacs in più posti:
<?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>
Ciò mapperebbe fn-U sul tasto freccia sinistra:
<autogen>__KeyToKey__ KeyCode::U, ModifierFlag::FN, KeyCode::CURSOR_LEFT</autogen>
Vedi https://pqrs.org/macosx/keyremap4macbook/xml.html.en o http://osxnotes.net/keyremap4macbook.html per ulteriori informazioni.