Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
macOSのテキスト系コンポーネントでのキーカスタマイズ
// https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/EventOverview/TextDefaultsBindings/TextDefaultsBindings.html
// ^ for Control
// $ for Shift
// ~ for Option
// @ for Command
// # for numeric keypad
{
// home/end
"\UF729" = "moveToBeginningOfLine:";
"\UF72B" = "moveToEndOfLine:";
"$\UF729" = "moveToBeginningOfLineAndModifySelection:";
"$\UF72B" = "moveToEndOfLineAndModifySelection:";
"^\UF729" = "moveToBeginningOfDocument:";
"^\UF72B" = "moveToEndOfDocument:";
"$^\UF72B" = "moveToEndOfDocumentAndModifySelection:";
"$^\UF729" = "moveToBeginningOfDocumentAndModifySelection:";
// page up/down
"\UF72C" = "pageUp:";
"\UF72D" = "pageDown:";
}
#!/bin/bash
mkdir -p ~/Library/KeyBindings/ && curl -sL https://gist.github.com/kawaz/5203e1561af0e6f0f72a18439dc2d905/raw/DefaultKeyBinding.dict -o ~/Library/KeyBindings/DefaultKeyBinding.dict
@kawaz
Copy link
Author

kawaz commented Jul 24, 2019

インストールは↓こんな感じにしてやれば良い。上書きするので既存がある場合は注意。

curl -sL https://gist.github.com/kawaz/5203e1561af0e6f0f72a18439dc2d905/raw/761fcbab8ce613b07bd38bce5aa35b16e961c528/install-DefaultKeyBinding.sh | bash

@kawaz
Copy link
Author

kawaz commented Jul 24, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment