mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-11 03:24:16 +00:00
added shorcut to open creator
This commit is contained in:
parent
990fc1e487
commit
8f5e5423ee
@ -351,26 +351,27 @@ class App extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const userAgentPlatform = window.navigator.userAgent.toLowerCase()
|
const userAgentPlatform = window.navigator.userAgent.toLowerCase()
|
||||||
|
const isMac = userAgentPlatform.indexOf("mac") !== -1
|
||||||
|
|
||||||
if (userAgentPlatform.includes("mac")) {
|
|
||||||
this.props.cores.ShortcutsCore.register({
|
this.props.cores.ShortcutsCore.register({
|
||||||
id: "app.openSearcher",
|
id: "app.openSearcher",
|
||||||
key: ",",
|
key: ",",
|
||||||
meta: true,
|
meta: isMac,
|
||||||
|
ctrl: !isMac,
|
||||||
preventDefault: true,
|
preventDefault: true,
|
||||||
}, (...args) => {
|
}, (...args) => {
|
||||||
App.publicMethods.openSettings(...args)
|
App.publicMethods.openSettings(...args)
|
||||||
})
|
})
|
||||||
} else {
|
|
||||||
this.props.cores.ShortcutsCore.register({
|
this.props.cores.ShortcutsCore.register({
|
||||||
id: "app.openSearcher",
|
id: "app.openCreator",
|
||||||
key: ",",
|
key: "k",
|
||||||
ctrl: true,
|
meta: isMac,
|
||||||
|
ctrl: !isMac,
|
||||||
preventDefault: true,
|
preventDefault: true,
|
||||||
}, (...args) => {
|
}, () => {
|
||||||
App.publicMethods.openSettings(...args)
|
App.publicMethods.openCreator()
|
||||||
})
|
})
|
||||||
}
|
|
||||||
|
|
||||||
app.eventBus.emit("app.initialization.start")
|
app.eventBus.emit("app.initialization.start")
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user