Skip to content

Commit

Permalink
Use keymap for CMD+`, CMD+r and CMD+l
Browse files Browse the repository at this point in the history
  • Loading branch information
jcubic committed Feb 25, 2017
1 parent ebe5f7f commit 94c5161
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 21 deletions.
11 changes: 7 additions & 4 deletions js/jquery.terminal-1.0.6.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* Copyright (c) 2007-2013 Alexandru Marasteanu <hello at alexei dot ro>
* licensed under 3 clause BSD license
*
* Date: Sat, 25 Feb 2017 10:39:09 +0000
* Date: Sat, 25 Feb 2017 10:42:29 +0000
*/

/* TODO:
Expand Down Expand Up @@ -1147,7 +1147,10 @@
},
'CTRL+TAB': function() {
return false;
}
},
'META+`': return_true, // CMD+` switch browser window on Mac
'META+R': return_true, // CMD+R page reload in Chrome Mac
'META+L': return_true // CLD+L jump into Ominbox on Chrome Mac
};
function return_true() {
return true;
Expand Down Expand Up @@ -1601,8 +1604,8 @@
}
if (e.metaKey && [192, 82, 76].indexOf(e.which) != -1) {
// 192 - CMD+` switch browser window on Mac
// 82 - CMD+r page reload in Chrome Mac
// 76 - CMD+l jump into Ominbox on Chrome Mac
// 82 - CMD+r page reload in Chrome Mac
// 76 - CMD+l jump into Ominbox on Chrome Mac
return;
}
// arrows / Home / End / ENTER
Expand Down
9 changes: 4 additions & 5 deletions js/jquery.terminal-1.0.6.min.js

Large diffs are not rendered by default.

9 changes: 6 additions & 3 deletions js/jquery.terminal-src.js
Original file line number Diff line number Diff line change
Expand Up @@ -1147,7 +1147,10 @@
},
'CTRL+TAB': function() {
return false;
}
},
'META+`': return_true, // CMD+` switch browser window on Mac
'META+R': return_true, // CMD+R page reload in Chrome Mac
'META+L': return_true // CLD+L jump into Ominbox on Chrome Mac
};
function return_true() {
return true;
Expand Down Expand Up @@ -1601,8 +1604,8 @@
}
if (e.metaKey && [192, 82, 76].indexOf(e.which) != -1) {
// 192 - CMD+` switch browser window on Mac
// 82 - CMD+r page reload in Chrome Mac
// 76 - CMD+l jump into Ominbox on Chrome Mac
// 82 - CMD+r page reload in Chrome Mac
// 76 - CMD+l jump into Ominbox on Chrome Mac
return;
}
// arrows / Home / End / ENTER
Expand Down
11 changes: 7 additions & 4 deletions js/jquery.terminal.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* Copyright (c) 2007-2013 Alexandru Marasteanu <hello at alexei dot ro>
* licensed under 3 clause BSD license
*
* Date: Sat, 25 Feb 2017 10:39:09 +0000
* Date: Sat, 25 Feb 2017 10:42:29 +0000
*/

/* TODO:
Expand Down Expand Up @@ -1147,7 +1147,10 @@
},
'CTRL+TAB': function() {
return false;
}
},
'META+`': return_true, // CMD+` switch browser window on Mac
'META+R': return_true, // CMD+R page reload in Chrome Mac
'META+L': return_true // CLD+L jump into Ominbox on Chrome Mac
};
function return_true() {
return true;
Expand Down Expand Up @@ -1601,8 +1604,8 @@
}
if (e.metaKey && [192, 82, 76].indexOf(e.which) != -1) {
// 192 - CMD+` switch browser window on Mac
// 82 - CMD+r page reload in Chrome Mac
// 76 - CMD+l jump into Ominbox on Chrome Mac
// 82 - CMD+r page reload in Chrome Mac
// 76 - CMD+l jump into Ominbox on Chrome Mac
return;
}
// arrows / Home / End / ENTER
Expand Down
9 changes: 4 additions & 5 deletions js/jquery.terminal.min.js

Large diffs are not rendered by default.

0 comments on commit 94c5161

Please sign in to comment.