Skip to content

Commit e48e1e1

Browse files
committed
Changed custom key binding config properties to use 'keyCode' instead of 'code'
1 parent 8bf9986 commit e48e1e1

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

js/reveal.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1098,8 +1098,8 @@
10981098
* Add a custom key binding with optional description to be added to the help screen
10991099
*/
11001100
function addKeyBinding(binding, callback) {
1101-
if (typeof binding === 'object' && binding.code) {
1102-
registeredKeyBindings[binding.code] = {
1101+
if (typeof binding === 'object' && binding.keyCode) {
1102+
registeredKeyBindings[binding.keyCode] = {
11031103
callback: callback,
11041104
key: binding.key,
11051105
description: binding.description

plugin/notes/notes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ var RevealNotes = (function() {
106106
}
107107

108108
// Open the notes when the 's' key is hit
109-
Reveal.addKeyBinding({code: 83, key: 'S', description: 'Speaker notes'}, openNotes);
109+
Reveal.addKeyBinding({keyCode: 83, key: 'S', description: 'Speaker notes'}, openNotes);
110110

111111
}
112112

0 commit comments

Comments
 (0)