mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2024-12-29 07:50:28 +01:00
Adding mac keyboard bindings
This commit is contained in:
parent
0555fc48ad
commit
984581e01a
1 changed files with 4 additions and 0 deletions
|
@ -76,12 +76,16 @@ export default class App extends React.Component {
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
Mousetrap.bind(['ctrl+z'], this.onUndo.bind(this));
|
Mousetrap.bind(['ctrl+z'], this.onUndo.bind(this));
|
||||||
|
Mousetrap.bind(['command+z'], this.onUndo.bind(this));
|
||||||
Mousetrap.bind(['ctrl+y'], this.onRedo.bind(this));
|
Mousetrap.bind(['ctrl+y'], this.onRedo.bind(this));
|
||||||
|
Mousetrap.bind(['command+shift+z'], this.onRedo.bind(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillUnmount() {
|
componentWillUnmount() {
|
||||||
Mousetrap.unbind(['ctrl+z'], this.onUndo.bind(this));
|
Mousetrap.unbind(['ctrl+z'], this.onUndo.bind(this));
|
||||||
|
Mousetrap.unbind(['command+z'], this.onUndo.bind(this));
|
||||||
Mousetrap.unbind(['ctrl+y'], this.onRedo.bind(this));
|
Mousetrap.unbind(['ctrl+y'], this.onRedo.bind(this));
|
||||||
|
Mousetrap.unbind(['command+shift+z'], this.onRedo.bind(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
onReset() {
|
onReset() {
|
||||||
|
|
Loading…
Reference in a new issue