From 73aa19d8f59e691cfc3bba10adcb650c8fee3a6d Mon Sep 17 00:00:00 2001 From: Brent Jackson Date: Sat, 22 Sep 2018 10:30:47 -0400 Subject: [PATCH] s/pg/page --- CHANGELOG.md | 1 + src/SlideDeck.js | 8 ++++---- src/constants.js | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ad820bf..e26ff7b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ ## Unreleased - Changes styles to use `translate3d` +- Add support for page up and page down keys ## v1.7.5 2018-09-22 diff --git a/src/SlideDeck.js b/src/SlideDeck.js index 7e4328e..7714e42 100644 --- a/src/SlideDeck.js +++ b/src/SlideDeck.js @@ -93,12 +93,12 @@ export class SlideDeck extends React.Component { } else if (shift) { switch (e.keyCode) { case keys.right: - case keys.pgDown: + case keys.pageDown: e.preventDefault() this.update(incrementIndex) break case keys.left: - case keys.pgUp: + case keys.pageUp: e.preventDefault() this.update(decrementIndex) break @@ -106,13 +106,13 @@ export class SlideDeck extends React.Component { } else if (!alt && !shift) { switch (e.keyCode) { case keys.right: - case keys.pgDown: + case keys.pageDown: case keys.space: e.preventDefault() this.update(next) break case keys.left: - case keys.pgUp: + case keys.pageUp: e.preventDefault() this.update(previous) break diff --git a/src/constants.js b/src/constants.js index 3981eef..f40b908 100644 --- a/src/constants.js +++ b/src/constants.js @@ -9,9 +9,9 @@ export const MDX_SLIDE_STEP = 'mdx-slide-step' export const keys = { 'right': 39, - 'pgDown': 34, + 'pageDown': 34, 'left': 37, - 'pgUp': 33, + 'pageUp': 33, 'space': 32, 'p': 80, 'o': 79,