Commit 17108a59 authored by saeed's avatar saeed

home end are added

parent d225b3c4
......@@ -522,6 +522,65 @@ static int handle_keyboard(struct Vis *vis, struct Vis *vis1,XEvent *e, struct o
drawonscreen_changeodb(vis,e,obsp,scdim);
odbinfo_onotherwindow(vis1, &odbinfo_set);
}
if (keysym == XK_Right ){
stn_set.icur++;
obsp->icur++;
odbinfo_set.icur++;
if (stn_set.icur >= stn_set.nt) stn_set.icur = 0;
if (obsp->icur >= obsp->nt) obsp->icur = 0;
if (odbinfo_set.icur >= odbinfo_set.nt) odbinfo_set.icur = 0;
drawonscreen_changeodb(vis,e,obsp,scdim);
odbinfo_onotherwindow(vis1, &odbinfo_set);
}
if (keysym == XK_Left ){
stn_set.icur--;
obsp->icur--;
odbinfo_set.icur--;
if (stn_set.icur < 0) stn_set.icur = stn_set.nt -1;
if (obsp->icur < 0) obsp->icur = obsp->nt -1;
if (odbinfo_set.icur < 0) odbinfo_set.icur = odbinfo_set.nt -1;
drawonscreen_changeodb(vis,e,obsp,scdim);
odbinfo_onotherwindow(vis1, &odbinfo_set);
}
if (keysym == XK_Up ){
stn_set.icur++;
obsp->icur++;
odbinfo_set.icur++;
if (stn_set.icur >= stn_set.nt) stn_set.icur = 0;
if (obsp->icur >= obsp->nt) obsp->icur = 0;
if (odbinfo_set.icur >= odbinfo_set.nt) odbinfo_set.icur = 0;
drawonscreen_changeodb(vis,e,obsp,scdim);
odbinfo_onotherwindow(vis1, &odbinfo_set);
}
if (keysym == XK_Down ){
stn_set.icur--;
obsp->icur--;
odbinfo_set.icur--;
if (stn_set.icur < 0) stn_set.icur = stn_set.nt -1;
if (obsp->icur < 0) obsp->icur = obsp->nt -1;
if (odbinfo_set.icur < 0) odbinfo_set.icur = odbinfo_set.nt -1;
drawonscreen_changeodb(vis,e,obsp,scdim);
odbinfo_onotherwindow(vis1, &odbinfo_set);
}
if (keysym == XK_Home ){
stn_set.icur = 0;
obsp->icur = 0;
odbinfo_set.icur = 0;
drawonscreen_changeodb(vis,e,obsp,scdim);
odbinfo_onotherwindow(vis1, &odbinfo_set);
}
if (keysym == XK_End ){
stn_set.icur = obsp->nt -1;
obsp->icur = obsp->nt -1;
odbinfo_set.icur = obsp->nt -1;
drawonscreen_changeodb(vis,e,obsp,scdim);
odbinfo_onotherwindow(vis1, &odbinfo_set);
}
if ((buffer[0] == 'q') || ( buffer[0]== 'Q') ){
result = 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment