Skip to content

Commit

Permalink
adds keyboard shortcuts for toolbar buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
chrkhl committed Jan 3, 2019
1 parent 8caeb4d commit 0a0bb69
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions scripts/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,9 @@ var qrCoder = (() => {

return {
initialize,
toggleLockActive,
toggleTextSelectionActive,
toggleLinkActive,
destroy
};
}
Expand Down Expand Up @@ -245,6 +248,22 @@ var qrCoder = (() => {
}
}

if (event.altKey && event.code === 'KeyH') {
return showQRCodeForPage();
}

if (event.altKey && event.code === 'KeyL') {
return toolbar.toggleLockActive();
}

if (event.altKey && event.code === 'KeyT') {
return toolbar.toggleTextSelectionActive();
}

if (event.altKey && event.code === 'KeyU') {
return toolbar.toggleLinkActive();
}

if (event.altKey && event.code === 'KeyF') {
return toggleFullsize(!fullsize);
}
Expand Down

0 comments on commit 0a0bb69

Please sign in to comment.