浏览代码

Merge pull request #1391 from rohithpr/notes-key-binding

Fixed #1379 - config keyboard now disables 's' key
Hakim El Hattab 9 年之前
父节点
当前提交
a5181e4372
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      plugin/notes/notes.js

+ 3 - 0
plugin/notes/notes.js

@@ -111,6 +111,9 @@ var RevealNotes = (function() {
 			// modifier is present
 			if ( document.querySelector( ':focus' ) !== null || event.shiftKey || event.altKey || event.ctrlKey || event.metaKey ) return;
 
+			// Disregard the event if keyboard is disabled
+			if ( Reveal.getConfig().keyboard === false ) return;
+
 			if( event.keyCode === 83 ) {
 				event.preventDefault();
 				openNotes();