Skip to content

Commit b79dff0

Browse files
author
Chris K
committed
Tentative fix for DFL-3440 Catch up with keyboard changes on Mac
1 parent 0ef4763 commit b79dff0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/ui-scripts/actions/keyidentifier.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,14 @@
7272
var tokens = shortcut.split(/[ ,\+]+/).map(function(t)
7373
{
7474
t = t.toLowerCase();
75-
// on Mac Opera cmd and ctrl are switched
75+
// on Mac Opera cmd sets the meta flag
7676
if (t == "cmd")
77-
t = "ctrl";
77+
t = "meta";
7878

7979
return t;
8080
});
8181

82-
var mod_key = ["shift", "ctrl", "alt"/*, "meta"*/].reduce(function(m_key, mod, index)
82+
var mod_key = ["shift", "ctrl", "alt", "meta"].reduce(function(m_key, mod, index)
8383
{
8484
var pos = tokens.indexOf(mod);
8585
if (pos > -1)
@@ -199,7 +199,7 @@
199199
// opera
200200
this._handle_keydown_bound = function(event)
201201
{
202-
var mod_key = ["shift", "ctrl", "alt"/*, "meta"*/].reduce(function(m_key, mod, index)
202+
var mod_key = ["shift", "ctrl", "alt", "meta"].reduce(function(m_key, mod, index)
203203
{
204204
return m_key | (event[mod + "Key"] ? Math.pow(2, index) : 0);
205205
}, 0);

0 commit comments

Comments
 (0)