mirror of
https://github.com/paradoxxxzero/butterfly.git
synced 2026-06-05 03:49:41 +00:00
Let the ctrl+shift+c, ctrl+shift+v go through to handle native copy paste. Fix #36
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user