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

This commit is contained in:
Greg Denehy 2017-04-30 16:35:35 +09:30
parent 8bf9986fa2
commit e48e1e19b9
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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);
}