Skip to content

Commit

Permalink
Merge pull request #80 from amshali/amshali/added-some-keys
Browse files Browse the repository at this point in the history
Added some key combinations
  • Loading branch information
chjj committed Aug 7, 2015
2 parents 91e701a + 1f707b3 commit 80e08a5
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/term.js
Original file line number Diff line number Diff line change
Expand Up @@ -2496,6 +2496,10 @@ Terminal.prototype.keyDown = function(ev) {
switch (ev.keyCode) {
// backspace
case 8:
if (ev.altKey) {
key = '\x17';
break;
}
if (ev.shiftKey) {
key = '\x08'; // ^H
break;
Expand Down Expand Up @@ -2525,6 +2529,10 @@ Terminal.prototype.keyDown = function(ev) {
//key = '\x8fD'; // SS3 as 0x8f for 8-bit
break;
}
if (ev.ctrlKey) {
key = '\x1b[5D';
break;
}
key = '\x1b[D';
break;
// right-arrow
Expand All @@ -2533,6 +2541,10 @@ Terminal.prototype.keyDown = function(ev) {
key = '\x1bOC';
break;
}
if (ev.ctrlKey) {
key = '\x1b[5C';
break;
}
key = '\x1b[C';
break;
// up-arrow
Expand Down

0 comments on commit 80e08a5

Please sign in to comment.