keyboard shortcut for toggleLayout
This commit is contained in:
parent
efa87a5d64
commit
b0d2511b43
1 changed files with 6 additions and 2 deletions
|
@ -78,7 +78,8 @@ function ComicBook(id, srcs, opts) {
|
||||||
keyboard: {
|
keyboard: {
|
||||||
next: 78,
|
next: 78,
|
||||||
previous: 80,
|
previous: 80,
|
||||||
toolbar: 84
|
toolbar: 84,
|
||||||
|
toggleLayout: 76
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -756,7 +757,7 @@ function ComicBook(id, srcs, opts) {
|
||||||
ComicBook.prototype.toggleToolbar();
|
ComicBook.prototype.toggleToolbar();
|
||||||
break;
|
break;
|
||||||
case "keydown":
|
case "keydown":
|
||||||
|
|
||||||
// navigation
|
// navigation
|
||||||
if (e.keyCode === options.keyboard.previous) { side = "left"; }
|
if (e.keyCode === options.keyboard.previous) { side = "left"; }
|
||||||
if (e.keyCode === options.keyboard.next) { side = "right"; }
|
if (e.keyCode === options.keyboard.next) { side = "right"; }
|
||||||
|
@ -765,6 +766,9 @@ function ComicBook(id, srcs, opts) {
|
||||||
if (e.keyCode === options.keyboard.toolbar) {
|
if (e.keyCode === options.keyboard.toolbar) {
|
||||||
ComicBook.prototype.toggleToolbar();
|
ComicBook.prototype.toggleToolbar();
|
||||||
}
|
}
|
||||||
|
if (e.keyCode === options.keyboard.toggleLayout) {
|
||||||
|
ComicBook.prototype.toggleLayout();
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new ComicBookException(
|
throw new ComicBookException(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue