aboutsummaryrefslogtreecommitdiff
path: root/js/controllers/keyboard.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/controllers/keyboard.js')
-rw-r--r--js/controllers/keyboard.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/js/controllers/keyboard.js b/js/controllers/keyboard.js
index 17a415f..c05be38 100644
--- a/js/controllers/keyboard.js
+++ b/js/controllers/keyboard.js
@@ -151,6 +151,12 @@ export default class Keyboard {
return true;
}
+ // If keyboardCondition is set, only capture keyboard events
+ // for embedded decks when they are focused
+ if( config.keyboardCondition === 'focused' && !this.Reveal.isFocused() ) {
+ return true;
+ }
+
// Shorthand
let keyCode = event.keyCode;