Skip to content
Snippets Groups Projects
Commit 73b3e850 authored by Remco de Man's avatar Remco de Man
Browse files

Merge branch 'fbl_keyboard_pageupdown' into 'master'

Add support for Arrow Down, Arrow Up, Page Down and Page Up during presentations.

See merge request tnb/nashorn!138
parents fdea08df f7e29bf9
No related branches found
Tags release_1_0_3_20180213_1457
1 merge request!138Add support for Arrow Down, Arrow Up, Page Down and Page Up during presentations.
......@@ -5,7 +5,7 @@
<groupId>nl.utwente.tnb3</groupId>
<artifactId>nashorn</artifactId>
<version>1.0.2</version>
<version>1.0.3</version>
<packaging>jar</packaging>
<name>Quizzard</name>
......
......@@ -84,10 +84,15 @@ class QuizPresentationView extends React.Component {
}
onKeyboardPressed(event) {
console.log(event.key);
switch(event.key) {
case "UIKeyInputLeftArrow":
case "ArrowLeft":
case "Left":
case "UIKeyInputUpArrow":
case "ArrowUp":
case "Up":
case "PageUp":
if (this.props.present && this.props.present[PresentationState.Field.previousSlide] != null) {
this.props.manager.action("previous");
}
......@@ -95,6 +100,10 @@ class QuizPresentationView extends React.Component {
case "UIKeyInputRightArrow":
case "ArrowRight":
case "Right":
case "UIKeyInputDownArrow":
case "ArrowDown":
case "Down":
case "PageDown":
if (this.props.present && this.props.present[PresentationState.Field.slide] != null) {
this.props.manager.action("next");
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment