Added handling of Tab key for Fl_Table keyboard navigation.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7747 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Greg Ercolano 2010-10-26 10:31:23 +00:00
parent 4574a63b3e
commit bfcb445453
1 changed files with 7 additions and 0 deletions

View File

@ -990,6 +990,13 @@ int Fl_Table::handle(int event) {
case FL_Down:
ret = move_cursor(1, 0);
break;
case FL_Tab:
if ( Fl::event_state() & FL_SHIFT ) {
ret = move_cursor(0, -1); // shift-tab -> left
} else {
ret = move_cursor(0, 1); // tab -> right
}
break;
}
if (ret && Fl::focus() != this) {
do_callback(CONTEXT_TABLE, -1, -1);