mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Alias meta to cmd in keymaps
This commit is contained in:
@@ -137,6 +137,7 @@ class ApplicationMenu
|
||||
modifiers.push("Shift") if key != key.toLowerCase()
|
||||
modifiers = modifiers.map (modifier) ->
|
||||
modifier.replace(/shift/ig, "Shift")
|
||||
.replace(/meta/ig, "Command")
|
||||
.replace(/cmd/ig, "Command")
|
||||
.replace(/ctrl/ig, "Ctrl")
|
||||
.replace(/alt/ig, "Alt")
|
||||
|
||||
@@ -16,6 +16,7 @@ class KeyBinding
|
||||
keys = @getParser().parse(keystroke)
|
||||
modifiers = keys[0...-1]
|
||||
modifiers.sort()
|
||||
modifiers = ((if m == 'meta' then 'cmd' else m) for m in modifiers or [])
|
||||
[modifiers..., _.last(keys)].join('-')
|
||||
normalizedKeystroke.join(' ')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user