Last active
December 25, 2015 21:19
-
-
Save yamaya/7041351 to your computer and use it in GitHub Desktop.
MacBookでMacVimしていると手のひらがTrack Padに触れてウザイのをなんとかする。要 KeyRemap4MacBook
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" MacVimの起動時、アプリケーション切り替え時にKeyRemap4MacBookコマンドラインを実行してポインティング・デバイスを有効・無効にする | |
let g:keyremap4macbook_cmd = '/Applications/KeyRemap4MacBook.app/Contents/Applications/KeyRemap4MacBook_cli.app/Contents/MacOS/KeyRemap4MacBook_cli' | |
let g:keyremap4macbook_pointing_device_ignoring_cmd = g:keyremap4macbook_cmd . ' set notsave.private.pointing_device_ignoring ' | |
augroup VimrcEx | |
autocmd! | |
" ポインティング・デバイスの有効・無効 | |
autocmd FocusGained,VimEnter * | |
\ let out = system(g:keyremap4macbook_pointing_device_ignoring_cmd . '1') | |
\| if out != '' | echoerr out | endif | |
autocmd FocusLost * | |
\ let out = system(g:keyremap4macbook_pointing_device_ignoring_cmd . '0') | |
\| if out != '' | echoerr out | endif | |
augroup END |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<root> | |
<!-- ポインティングデバイスの移動を無効にする設定。英数キーでトグル。 --> | |
<list> | |
<item> | |
<name>Private Setting</name> | |
<item> | |
<name>Pointing Device Ignoring</name> | |
<list> | |
<item> | |
<name>"EISUU" to toggle</name> | |
<identifier>private.pointing_device_ignoring_trigger</identifier> | |
<autogen>__KeyToKey__ KeyCode::JIS_EISUU, ModifierFlag::NONE, KeyCode::VK_CONFIG_FORCE_OFF_notsave_private_mousekeys_mode, KeyCode::VK_CONFIG_TOGGLE_notsave_private_pointing_device_ignoring</autogen> | |
</item> | |
<item> | |
<name>Core</name> | |
<identifier vk_config="true">notsave.private.pointing_device_ignoring</identifier> | |
<config_only>private.pointing_device_ignoring_trigger</config_only> | |
<autogen>__DropPointingRelativeCursorMove__</autogen> | |
<autogen>--ShowStatusMessage-- Ignored</autogen> | |
</item> | |
</list> | |
</item> | |
</item> | |
</list> | |
</root> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment