Explorar o código

Changed custom key binding config properties to use 'keyCode' instead of 'code'

Greg Denehy %!s(int64=7) %!d(string=hai) anos
pai
achega
e48e1e19b9
Modificáronse 2 ficheiros con 3 adicións e 3 borrados
  1. 2 2
      js/reveal.js
  2. 1 1
      plugin/notes/notes.js

+ 2 - 2
js/reveal.js

@@ -1098,8 +1098,8 @@
 	 * Add a custom key binding with optional description to be added to the help screen
 	 */
 	function addKeyBinding(binding, callback) {
-		if (typeof binding === 'object' && binding.code) {
-			registeredKeyBindings[binding.code] = {
+		if (typeof binding === 'object' && binding.keyCode) {
+			registeredKeyBindings[binding.keyCode] = {
 				callback: callback,
 				key: binding.key,
 				description: binding.description

+ 1 - 1
plugin/notes/notes.js

@@ -106,7 +106,7 @@ var RevealNotes = (function() {
 		}
 
 		// Open the notes when the 's' key is hit
-		Reveal.addKeyBinding({code: 83, key: 'S', description: 'Speaker notes'}, openNotes);
+		Reveal.addKeyBinding({keyCode: 83, key: 'S', description: 'Speaker notes'}, openNotes);
 
 	}