Implemented key bindings for undo/redo

This commit is contained in:
jos 2017-07-19 13:56:14 +02:00
parent 52977b009c
commit c5ce6525a5
1 changed files with 4 additions and 0 deletions

View File

@ -47,6 +47,8 @@ const KEY_BINDINGS = {
'insert': ['Ctrl+Insert', 'Command+Insert'], 'insert': ['Ctrl+Insert', 'Command+Insert'],
'remove': ['Ctrl+Delete', 'Command+Delete'], 'remove': ['Ctrl+Delete', 'Command+Delete'],
'actionMenu': ['Ctrl+M', 'Command+M'], 'actionMenu': ['Ctrl+M', 'Command+M'],
'undo': ['Ctrl+Z', 'Command+Z'],
'redo': ['Ctrl+Shift+Z', 'Command+Shift+Z'],
'find': ['Ctrl+F', 'Command+F'], 'find': ['Ctrl+F', 'Command+F'],
'findNext': ['F3', 'Ctrl+G', 'Command+G'], 'findNext': ['F3', 'Ctrl+G', 'Command+G'],
'findPrevious': ['Shift+F3', 'Ctrl+Shift+G', 'Command+Shift+G'], 'findPrevious': ['Shift+F3', 'Ctrl+Shift+G', 'Command+Shift+G'],
@ -71,6 +73,8 @@ export default class TreeMode extends Component {
'down': (event) => moveDown(event.target), 'down': (event) => moveDown(event.target),
'left': (event) => moveLeft(event.target), 'left': (event) => moveLeft(event.target),
'right': (event) => moveRight(event.target), 'right': (event) => moveRight(event.target),
'undo': (event) => this.undo(),
'redo': (event) => this.redo(),
'find': (event) => selectFind(event.target), 'find': (event) => selectFind(event.target),
'findNext': (event) => this.handleNext(), 'findNext': (event) => this.handleNext(),
'findPrevious': (event) => this.handlePrevious() 'findPrevious': (event) => this.handlePrevious()