Skip to content

Instantly share code, notes, and snippets.

@fancyremarker
Created September 29, 2011 22:26
Show Gist options
  • Save fancyremarker/1252109 to your computer and use it in GitHub Desktop.
Save fancyremarker/1252109 to your computer and use it in GitHub Desktop.
Re-enable Google Keyboard Shortcuts in Chrome on OS X, by editing cookie database directly
#!/bin/sh
# Force Google Keyboard Shortcuts experimental search in Chrome
COOKIEJAR=~/Library/Application\ Support/Google/Chrome/Default/Cookies
OLDCOOKIEVAL=$(sqlite3 "$COOKIEJAR" "select value from cookies where host_key = '.google.com' and name = 'PREF';")
NEWCOOKIEVAL=$(echo $OLDCOOKIEVAL | sed 's/:GM=[^:]*:/:/' | sed 's/:ES=[^:]*:/:/' | sed 's/:S=/:GM=1:ES=WBS:S=/')
sqlite3 "$COOKIEJAR" "update cookies set value = '$NEWCOOKIEVAL' where host_key = '.google.com' and name = 'PREF';"
@fancyremarker
Copy link
Author

This doesn't work anymore. Google has officially killed the Keyboard Shortcuts experiment. :-(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment