Skip to content

Instantly share code, notes, and snippets.

@vitqst
Last active January 15, 2021 07:34
Show Gist options
  • Save vitqst/be05ef80dd23505eaaab1230d921db43 to your computer and use it in GitHub Desktop.
Save vitqst/be05ef80dd23505eaaab1230d921db43 to your computer and use it in GitHub Desktop.
// F12 & paster to use Ctrl+Z & Ctrl+Y for google keep draw
function KeyPress(e) {
var evtobj = window.event? event : e
if (evtobj.keyCode == 90 && evtobj.ctrlKey) {
document.querySelector("#canvas-parent > div.above-ink-canvas > div > div > div.ink-toolbar-end > div:nth-child(1) > button").click()
}
if (evtobj.keyCode == 89 && evtobj.ctrlKey) {
document.querySelector("#canvas-parent > div.above-ink-canvas > div > div > div.ink-toolbar-end > div:nth-child(2) > button").click()
}
}
document.onkeydown = KeyPress;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment