mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 18:44: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()
|
||||
userController = new User()
|
||||
state = {
|
||||
@ -280,12 +280,23 @@ class App {
|
||||
window.app.hideStatusBar()
|
||||
}
|
||||
|
||||
window.app.ShortcutsController.register({
|
||||
key: ",",
|
||||
meta: true,
|
||||
}, (...args) => {
|
||||
App.publicMethods.openSettings(...args)
|
||||
})
|
||||
const userAgentPlatform = window.navigator.userAgent.toLowerCase()
|
||||
|
||||
if (userAgentPlatform.includes("mac")) {
|
||||
window.app.ShortcutsController.register({
|
||||
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")
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user