mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-11 03:24:16 +00:00
register keybinds depending of navigator useragent
This commit is contained in:
parent
f5826fdb9d
commit
9ba5039e93
@ -258,7 +258,7 @@ class App {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sessionController = new Session()
|
sessionController = new Session()
|
||||||
userController = new User()
|
userController = new User()
|
||||||
state = {
|
state = {
|
||||||
@ -280,12 +280,23 @@ class App {
|
|||||||
window.app.hideStatusBar()
|
window.app.hideStatusBar()
|
||||||
}
|
}
|
||||||
|
|
||||||
window.app.ShortcutsController.register({
|
const userAgentPlatform = window.navigator.userAgent.toLowerCase()
|
||||||
key: ",",
|
|
||||||
meta: true,
|
if (userAgentPlatform.includes("mac")) {
|
||||||
}, (...args) => {
|
window.app.ShortcutsController.register({
|
||||||
App.publicMethods.openSettings(...args)
|
key: ",",
|
||||||
})
|
meta: true,
|
||||||
|
}, (...args) => {
|
||||||
|
App.publicMethods.openSettings(...args)
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
window.app.ShortcutsController.register({
|
||||||
|
key: ",",
|
||||||
|
ctrl: true,
|
||||||
|
}, (...args) => {
|
||||||
|
App.publicMethods.openSettings(...args)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
this.eventBus.emit("render_initialization")
|
this.eventBus.emit("render_initialization")
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user