Browse Source

added F1-12 key, fixed DCH and ICH.

master
Aurélien Aptel 14 years ago
parent
commit
a7922bd1d9
3 changed files with 28 additions and 4 deletions
  1. +12
    -0
      config.h
  2. +4
    -4
      st.c
  3. +12
    -0
      st.info

+ 12
- 0
config.h View File

@ -39,6 +39,18 @@ static Key key[] = {
{ XK_End, "\033[4~" }, { XK_End, "\033[4~" },
{ XK_Prior, "\033[5~" }, { XK_Prior, "\033[5~" },
{ XK_Next, "\033[6~" }, { XK_Next, "\033[6~" },
{ XK_F1, "\033OP" },
{ XK_F2, "\033OQ" },
{ XK_F3, "\033OR" },
{ XK_F4, "\033OS" },
{ XK_F5, "\033[15~" },
{ XK_F6, "\033[17~" },
{ XK_F7, "\033[18~" },
{ XK_F8, "\033[19~" },
{ XK_F9, "\033[20~" },
{ XK_F10, "\033[21~" },
{ XK_F11, "\033[23~" },
{ XK_F12, "\033[24~" },
}; };
static char gfx[] = { static char gfx[] = {


+ 4
- 4
st.c View File

@ -497,21 +497,21 @@ tdeletechar(int n) {
return; return;
} }
memmove(&term.line[term.c.y][dst], &term.line[term.c.y][src], size * sizeof(Glyph)); memmove(&term.line[term.c.y][dst], &term.line[term.c.y][src], size * sizeof(Glyph));
tclearregion(term.col-size, term.c.y, term.col-1, term.c.y);
tclearregion(term.col-n, term.c.y, term.col-1, term.c.y);
} }
void void
tinsertblank(int n) { tinsertblank(int n) {
int src = term.c.x; int src = term.c.x;
int dst = src + n; int dst = src + n;
int size = term.col - n - src;
int size = term.col - dst;
if(dst >= term.col) { if(dst >= term.col) {
tclearregion(term.c.x, term.c.y, term.col-1, term.c.y); tclearregion(term.c.x, term.c.y, term.col-1, term.c.y);
return; return;
} }
memmove(&term.line[term.c.y][dst], &term.line[term.c.y][src], size * sizeof(Glyph)); memmove(&term.line[term.c.y][dst], &term.line[term.c.y][src], size * sizeof(Glyph));
tclearregion(src, term.c.y, dst, term.c.y);
tclearregion(src, term.c.y, dst - 1, term.c.y);
} }
void void
@ -1173,7 +1173,7 @@ xcursor(int mode) {
if(term.line[term.c.y][term.c.x].state & GLYPH_SET) if(term.line[term.c.y][term.c.x].state & GLYPH_SET)
g.c = term.line[term.c.y][term.c.x].c; g.c = term.line[term.c.y][term.c.x].c;
/* remove the old cursor */ /* remove the old cursor */
if(term.line[oldy][oldx].state & GLYPH_SET) if(term.line[oldy][oldx].state & GLYPH_SET)
xdraws(&term.line[oldy][oldx].c, term.line[oldy][oldx], oldx, oldy, 1); xdraws(&term.line[oldy][oldx].c, term.line[oldy][oldx], oldx, oldy, 1);


+ 12
- 0
st.info View File

@ -37,6 +37,18 @@ st| simpleterm,
kcuu1=\E[A, kcuu1=\E[A,
kdch1=\E[3~, kdch1=\E[3~,
kend=\E[4~, kend=\E[4~,
kf1=\EOP,
kf2=\EOQ,
kf3=\EOR,
kf4=\EOS,
kf5=\E[15~,
kf6=\E[17~,
kf7=\E[18~,
kf8=\E[19~,
kf9=\E[20~,
kf10=\E[21~,
kf11=\E[23~,
kf12=\E[24~,
khome=\E[1~, khome=\E[1~,
knp=\E[6~, knp=\E[6~,
kpp=\E[5~, kpp=\E[5~,


Loading…
Cancel
Save