Let the ctrl+shift+c, ctrl+shift+v go through to handle native copy paste. Fix #36

This commit is contained in:
Florian Mounier
2014-03-17 10:18:54 +01:00
parent ee545f2002
commit c995d6e277
2 changed files with 7 additions and 1 deletions

View File

@@ -1101,6 +1101,9 @@ class Terminal
# Handle shift insert and ctrl insert copy/paste usefull for typematrix keyboard
return true if (ev.shiftKey or ev.ctrlKey) and ev.keyCode is 45
# Let the ctrl+shift+c, ctrl+shift+v go through to handle native copy paste
return true if (ev.shiftKey and ev.ctrlKey) and ev.keyCode in [67, 86]
# Alt-z works as an escape to relay the following keys to the browser.
# usefull to trigger browser shortcuts, i.e.: Alt+Z F5 to reload
# May be redundant with keyPrefix

View File

@@ -1011,13 +1011,16 @@ Terminal = (function() {
};
Terminal.prototype.keyDown = function(ev) {
var id, key, t;
var id, key, t, _ref;
if (ev.keyCode > 15 && ev.keyCode < 19) {
return true;
}
if ((ev.shiftKey || ev.ctrlKey) && ev.keyCode === 45) {
return true;
}
if ((ev.shiftKey && ev.ctrlKey) && ((_ref = ev.keyCode) === 67 || _ref === 86)) {
return true;
}
if (ev.altKey && ev.keyCode === 90 && !this.skipNextKey) {
this.skipNextKey = true;
this.element.classList.add('skip');