mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-12 20:18:41 -09:00
Don't focus on caret when using modifier keys (#1106)
* Don't focus on caret when using modifier keys * Removed trailing space
This commit is contained in:
parent
a45fb97283
commit
34da7d0a60
1 changed files with 6 additions and 4 deletions
10
lib/hterm.js
10
lib/hterm.js
|
|
@ -222,10 +222,6 @@ hterm.Terminal.prototype.copySelectionToClipboard = function () {
|
|||
// hyper and not the terminal itself
|
||||
const oldKeyDown = hterm.Keyboard.prototype.onKeyDown_;
|
||||
hterm.Keyboard.prototype.onKeyDown_ = function (e) {
|
||||
// Was the hyperCaret removed for selectAll
|
||||
if (!this.terminal.cursorNode_.contains(this.hyperCaret)) {
|
||||
this.terminal.focusHyperCaret();
|
||||
}
|
||||
const modifierKeysConf = this.terminal.modifierKeys;
|
||||
|
||||
if (e.altKey &&
|
||||
|
|
@ -256,6 +252,12 @@ hterm.Keyboard.prototype.onKeyDown_ = function (e) {
|
|||
// hterm shouldn't consume a hyper accelerator
|
||||
return;
|
||||
}
|
||||
|
||||
// Was the hyperCaret removed for selectAll
|
||||
if (!this.terminal.cursorNode_.contains(this.hyperCaret)) {
|
||||
this.terminal.focusHyperCaret();
|
||||
}
|
||||
|
||||
if ((!e.ctrlKey || e.code !== 'ControlLeft') &&
|
||||
!e.shiftKey && e.code !== 'CapsLock' &&
|
||||
e.key !== 'Dead') {
|
||||
|
|
|
|||
Loading…
Reference in a new issue