Skip to content

Instantly share code, notes, and snippets.

@andytlr
Last active August 29, 2015 14:27
Show Gist options
  • Save andytlr/894060604839028cec37 to your computer and use it in GitHub Desktop.
Save andytlr/894060604839028cec37 to your computer and use it in GitHub Desktop.
Replicates 'Delete Line' functionality in Byword
-- Byword doesn't have a Delete Line function.
-- This is basically a macro to select the current line and delete it.
-- Make a Service that recieves no input and assign a keyboard shortcut.
on run {input, parameters}
tell application "System Events"
-- Command + Option + Up
key code 126 using {command down, option down}
-- Command + Option + Up
key code 126 using {command down, option down}
-- Delete
key code 51
end tell
end run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment