Skip to content

Commit

Permalink
CSI u encoding also for LITERAL keys (backspace/tab/enter/escape)
Browse files Browse the repository at this point in the history
  • Loading branch information
leonerd committed Oct 4, 2011
1 parent 6bbab87 commit 8a6e22a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/input.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,10 @@ void vterm_input_push_key(VTerm *vt, VTermModifier mod, VTermKey key)
break;

case KEYCODE_LITERAL:
vterm_push_output_bytes(vt, &k.literal, 1);
if(mod & (VTERM_MOD_SHIFT|VTERM_MOD_CTRL))
vterm_push_output_sprintf(vt, "\e[%d;%du", k.literal, mod+1);
else
vterm_push_output_sprintf(vt, mod & VTERM_MOD_ALT ? "\e%c" : "%c", k.literal);
break;

case KEYCODE_CSI_CURSOR:
Expand Down

0 comments on commit 8a6e22a

Please sign in to comment.