This commit is contained in:
parent
4dc3d16713
commit
fe305528ee
|
@ -19,13 +19,13 @@ function handleKeyDown(editor, event) {
|
||||||
if (this.keys.hasOwnProperty(key)) {
|
if (this.keys.hasOwnProperty(key)) {
|
||||||
const action = this.keys[key]
|
const action = this.keys[key]
|
||||||
if (editor.hasOwnProperty(action)) {
|
if (editor.hasOwnProperty(action)) {
|
||||||
console.log('Key down ' + key + ', calling action ' + action)
|
// console.log('Key down ' + key + ', calling action ' + action)
|
||||||
return editor[action](event)
|
return editor[action](event)
|
||||||
} else {
|
} else {
|
||||||
console.warn('Unknown action on editor: ' + action)
|
console.warn('Unknown action on editor: ' + action)
|
||||||
}
|
}
|
||||||
} else {
|
// } else {
|
||||||
console.log('Key down ' + key)
|
// console.log('Key down ' + key)
|
||||||
}
|
}
|
||||||
|
|
||||||
return true
|
return true
|
||||||
|
@ -34,8 +34,8 @@ function handleKeyDown(editor, event) {
|
||||||
function mapKey(key, action) {
|
function mapKey(key, action) {
|
||||||
if (this.keys.hasOwnProperty(key)) {
|
if (this.keys.hasOwnProperty(key)) {
|
||||||
console.warn(`Re-defining ${key} to call ${action}`)
|
console.warn(`Re-defining ${key} to call ${action}`)
|
||||||
} else {
|
// } else {
|
||||||
console.log(`Defining ${key} to call ${action}`)
|
// console.log(`Defining ${key} to call ${action}`)
|
||||||
}
|
}
|
||||||
this.keys[key] = action
|
this.keys[key] = action
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user