Skip to content

Commit

Permalink
make Ctrl-H Backspace, too.
Browse files Browse the repository at this point in the history
  • Loading branch information
avl42 committed Nov 11, 2016
1 parent bce457a commit d829770
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public Matching match(List<Character> seq) {
// Control-chars: exclude lf,cr,Tab,Esc(^[), but still include ^\, ^], ^^ and ^_
char ctrlCode;
switch (ch) {
case '\n': case '\r': case '\t':
case '\n': case '\r': case '\t': case 0x08:
case KeyDecodingProfile.ESC_CODE: return null; // nope
case 0: /* ^@ */ ctrlCode = ' '; break;
case 28: /* ^\ */ ctrlCode = '\\'; break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public class DefaultKeyDecodingProfile implements KeyDecodingProfile {
new BasicCharacterPattern(new KeyStroke(KeyType.Enter), '\n'),
new BasicCharacterPattern(new KeyStroke(KeyType.Enter), '\r', '\u0000'), //OS X
new BasicCharacterPattern(new KeyStroke(KeyType.Backspace), (char) 0x7f),
new BasicCharacterPattern(new KeyStroke(KeyType.Backspace), (char) 0x08),
new BasicCharacterPattern(new KeyStroke(KeyType.F1), ESC_CODE, '[', '[', 'A'), //Linux
new BasicCharacterPattern(new KeyStroke(KeyType.F2), ESC_CODE, '[', '[', 'B'), //Linux
new BasicCharacterPattern(new KeyStroke(KeyType.F3), ESC_CODE, '[', '[', 'C'), //Linux
Expand Down

0 comments on commit d829770

Please sign in to comment.