# Keynote × Keyboard Maestroでスライド作りを徹底的にラクにするマクロサンプル URL: https://webrandum.net/keyboard-maestro-keynote/ 公開日: 2020-02-23 更新日: 2020-02-23 カテゴリー: 作業効率化 タグ: Keyboard Maestro, Keynote 出典: Webrandum(著者: サイトウ マサカズ) Keynoteはデフォルトの状態だとショートカットキーがあまり割り振られていない上に、割り当てられていないものも多いです。 Adobe製品を使っている人であれば、ショートカットキーをIllustratorに合わせるだけで、スライド作りは一気にやりやすくなります。 今回はそんなKeynoteで自分が設定しているマクロサンプルをまとめておきます。 ## 紹介するマクロのダウンロード 今回紹介するマクロは、下記の[Dropboxリンク](https://www.dropbox.com/s/3ugmi2v94ysz5er/Keynote%20Macros.kmmacros?dl=0)からダウンロードできるようにしています。 [Keynote Macros.kmmacros](https://www.dropbox.com/s/3ugmi2v94ysz5er/Keynote%20Macros.kmmacros?dl=0) ## マクロサンプル ### 整列系 IllustratorというよりXD(IllustratorもXDに合わせて設定する)に合わせていますが、整列系にXDと同じショートカットキーを割り当てます。 | 機能 | ショートカットキー | | --- | --- | | 右揃え | shift + command + → | | --- | --- | | 下揃え | shift + command + ↓ | | --- | --- | | 左揃え | shift + command + ← | | --- | --- | | 上揃え | shift + command + ↑ | | --- | --- | | 中央揃え(横) | shift + command + C | | --- | --- | | 中央揃え(縦) | shift + command + M | | --- | --- | | 中央揃え(縦横) | shift + command + X | | --- | --- | 中央揃え(縦横)に関しては、中央揃え(横)と中央揃え(縦)を順に実行しているだけです。 ![整列系のマクロ](https://webrandum.net/mskz/wp-content/uploads/2020/02/image_1-22.png) 整列ができるようになっただけでかなりラクになりますし、ショートカットキーもXDやIllustratorと同じにしてあるので新しく覚える必要がありません。 ### グループとグループ解除 デフォルトだとグループ化はoption + command + Gで、グループ解除はoption + shift + command + Gです。 これもIllustratorだとグループ化はcommand + Gでグループ解除はshift + command + Gなのでそれに合わせておきます。 ![グループとグループ解除](https://webrandum.net/mskz/wp-content/uploads/2020/02/image_2-20.png) ### 前面と背面への移動 こちらもIllustratorに合わせてショートカットキーを変えておきます。 | 機能 | ショートカットキー | | --- | --- | | 前面へ | command + ] | | --- | --- | | 最前面へ | shift + command + ] | | --- | --- | | 背面へ | command + [ | | --- | --- | | 最背面へ | shift + command + [ | | --- | --- | ![前面と背面への移動](https://webrandum.net/mskz/wp-content/uploads/2020/02/image_3-19.png) ### 不透明度変更 これはIllustratorというよりPhotoshopの設定(IllustratorもPhotoshopに合わせて設定する)ですが、数字を押すと透明度の変更ができるようにしておきます。 ただし、Keynoteの場合は数字単体での設定はできないのでcommand + 数字で設定しておきます。 ちなみにデフォルトで透明度の変更をショートカットキーではできないので、AppleScriptを使って透明度を変更します。 ``` on run tell application "Keynote" set app_name to name of it activate tell document 1 tell current slide my key_stroke(app_name, "x", "cmd") delay 0.3 my key_stroke(app_name, "v", "cmd") set opacity of iWork item -1 to 10 end tell end tell end tell end run on key_stroke(app_name, key_string, key_down) set key_array to {} if (offset of "cmd" in key_down) > 0 then set end of key_array to command down if (offset of "shift" in key_down) > 0 then set end of key_array to shift down if (offset of "opt" in key_down) > 0 then set end of key_array to option down if (offset of "ctrl" in key_down) > 0 then set end of key_array to control down tell application app_name to activate tell application "System Events" end tell end key_stroke ``` `set opacity of iWork item -1 to 10`の`10`の部分を`0`〜`100`に変えて透明度を変更します。 ![不透明度変更](https://webrandum.net/mskz/wp-content/uploads/2020/02/image_4-13.png) ### 新規スライドの作成 デフォルトだとshift + command + Nで新規スライドですが、自分の感覚だと新規スライド(ページの追加)はcommand + Nで、新しいファイルを作るときはshift + command + Nなのでそれに変更します。 ![新規スライドの作成](https://webrandum.net/mskz/wp-content/uploads/2020/02/image_5-10.png) ### スライド間の移動 次のスライド、前のスライドの移動をcommand + 矢印でできるようにします。 ![スライド間の移動](https://webrandum.net/mskz/wp-content/uploads/2020/02/image_6-6.png) スライド間の移動はよく使いますし、ただでさえKeynoteはマウスが右側に行きがちなのに、そこからスライド間を移動するためだけにマウスを左端に持って行くのは面倒です。 ### まとめ 新しい機能をマクロで作るというよりは「Adobe製品にショートカットキーを合わせる」ためのマクロがほとんどです。Adobe製品をショートカットキーを使いながらちゃんと使っている人は、新しいショートカットキーを覚える必要なく使えるはずです。 Keynoteはたまにしか使うことがないので、このようによく使うアプリケーションとショートカットキーを合わせておくと忘れる心配がありませんし、指が自動で動いてくれます。 Keynoteに限らず、ぜひショートカットキーの統合を試してみてください。