Created
September 1, 2016 10:46
-
-
Save smellman/629591f4764e10424ccdeb2fc7caea70 to your computer and use it in GitHub Desktop.
Preview page up/down by Keyboard Option+Up/Down
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
| tell application "System Events" | |
| set frontmostProcess to name of first process where it is frontmost | |
| end tell | |
| tell application "Preview" to activate | |
| tell application "System Events" | |
| key code 125 | |
| end tell | |
| tell application frontmostProcess to activate |
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
| tell application "System Events" | |
| set frontmostProcess to name of first process where it is frontmost | |
| end tell | |
| tell application "Preview" to activate | |
| tell application "System Events" | |
| key code 126 | |
| end tell | |
| tell application frontmostProcess to activate |
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> | |
| <vkopenurldef> | |
| <name>KeyCode::VK_OPEN_URL_APPLESCRIPT.preview-key-up</name> | |
| <url type="shell"> | |
| <![CDATA[ osascript ~/Dropbox/AppleScripts/preview-key-up.scpt ]]> | |
| </url> | |
| </vkopenurldef> | |
| <vkopenurldef> | |
| <name>KeyCode::VK_OPEN_URL_APPLESCRIPT.preview-key-down</name> | |
| <url type="shell"> | |
| <![CDATA[ osascript ~/Dropbox/AppleScripts/preview-key-down.scpt ]]> | |
| </url> | |
| </vkopenurldef> | |
| <item> | |
| <name>Preview page up/down</name> | |
| <appendix></appendix> | |
| <device_only> | |
| </device_only> | |
| <identifier>private.script.preview.pageupdown</identifier> | |
| <autogen> | |
| __KeyToKey__ | |
| KeyCode::CURSOR_UP, ModifierFlag::OPTION_L, | |
| KeyCode::VK_OPEN_URL_APPLESCRIPT.preview-key-up | |
| </autogen> | |
| <autogen> | |
| __KeyToKey__ | |
| KeyCode::CURSOR_DOWN, ModifierFlag::OPTION_L, | |
| KeyCode::VK_OPEN_URL_APPLESCRIPT.preview-key-down | |
| </autogen> | |
| </item> | |
| </root> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment