Message-ID: <33A98582.21D8@seanet.com> Date: Thu, 19 Jun 1997 12:16:18 -0700 From: "Alan M. Doerhoefer" MIME-Version: 1.0 To: djgpp AT delorie DOT com CC: Shawn AT talula DOT demon DOT co DOT uk Subject: Re: ALLEGRO: Problems with keyboard shortcut to edit box References: <866633614 DOT 1311419 DOT 0 AT acecoin DOT demon DOT co DOT uk> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Precedence: bulk Here is a change to Allegro's move_focus routine that worked for me to change the behaviour of the tab key. I just moved the KEY_TAB entry in the switch statement so that it falls through to the KEY_DOWN case. The shift-tab key could be added to the case statement so that it falls through to the KEY_UP case. static int move_focus(DIALOG *d, long ch, int *focus_obj) { int (*cmp)(DIALOG *d1, DIALOG *d2); OBJ_LIST obj[MAX_OBJECTS]; int obj_count = 0; int fobj, c; int res = D_O_K; /* choose a comparison function */ switch (ch >> 8) { case KEY_RIGHT: cmp = cmp_right; break; case KEY_LEFT: cmp = cmp_left; break; case KEY_TAB: /* MY CHANGE: same as down arrow */ case KEY_DOWN: cmp = cmp_down; break; case KEY_UP: cmp = cmp_up; break; default: return D_O_K; } -- Alan Doerhoefer: aland AT seanet DOT com http://www.seanet.com/~aland