mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-10 02:54:15 +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 isMac = userAgentPlatform.indexOf("mac") !== -1
|
||||
|
||||
if (userAgentPlatform.includes("mac")) {
|
||||
this.props.cores.ShortcutsCore.register({
|
||||
id: "app.openSearcher",
|
||||
key: ",",
|
||||
meta: true,
|
||||
meta: isMac,
|
||||
ctrl: !isMac,
|
||||
preventDefault: true,
|
||||
}, (...args) => {
|
||||
App.publicMethods.openSettings(...args)
|
||||
})
|
||||
} else {
|
||||
|
||||
this.props.cores.ShortcutsCore.register({
|
||||
id: "app.openSearcher",
|
||||
key: ",",
|
||||
ctrl: true,
|
||||
id: "app.openCreator",
|
||||
key: "k",
|
||||
meta: isMac,
|
||||
ctrl: !isMac,
|
||||
preventDefault: true,
|
||||
}, (...args) => {
|
||||
App.publicMethods.openSettings(...args)
|
||||
}, () => {
|
||||
App.publicMethods.openCreator()
|
||||
})
|
||||
}
|
||||
|
||||
app.eventBus.emit("app.initialization.start")
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user