Google Docs strikeout keyboard shortcut

By mazuhl Last update Feb 11, 2010 — Installed 650 times.


Script Summary: Adds a keyboard shortcut to strike out (put a line through) text in a Google Document.

Google Docs has lots of keyboard shortcuts for formatting text. Alas, for some reason it doesn't have one to strike out (put a line through) text. This script makes Google Docs more useful for teachers, people writing essays and using Google Docs to manage a todo list.

Simply select some text and press F2 on your keyboard. The text you selected gets wrapped in a <strike></strike> tag. If you've selected a bit of whitespace before the text it gets chomped. And it doesn't stop you from selecting across tags. But you weren't going to do that, were you?

It's bound to the F2 key because Google Docs doesn't currently have anything running from that key. If you'd like to change it to another key just change the line value '113' in the script to that of another key: Keyboard codes.