// Up from no entry or first entry goes down to last
caseKeyCode.UpArrow:
if((keyCode===KeyCode.UpArrow||(keyCode===KeyCode.Tab&&isShift))&&(focus===entries[0]||!focus)){// TODO@Ben should not make ordering assumptions
this.tree.focusPrevious();
this.tree.focusLast();
break;
cycled=true;
}
// Down from last entry goes to up to first
caseKeyCode.PageDown:
elseif((keyCode===KeyCode.DownArrow||keyCode===KeyCode.Tab&&!isShift)&&focus===entries[entries.length-1]){// TODO@Ben should not make ordering assumptions
this.tree.focusNextPage();
this.tree.focusFirst();
break;
cycled=true;
}
}
// Normal Navigation
caseKeyCode.PageUp:
if(!cycled){
this.tree.focusPreviousPage();
switch(keyCode){
break;
caseKeyCode.DownArrow:
this.tree.focusNext();
break;
caseKeyCode.UpArrow:
caseKeyCode.Tab:
if(isShift){
this.tree.focusPrevious();
this.tree.focusPrevious();
break;
}else{
this.tree.focusNext();
}
break;
}
caseKeyCode.PageDown:
letnewFocus=this.tree.getFocus();
this.tree.focusNextPage();
break;
caseKeyCode.PageUp:
// Support cycle-through navigation if focus did not change
this.tree.focusPreviousPage();
if(entries.length>1&&oldFocus===newFocus){
break;
caseKeyCode.Tab:
// Up from no entry or first entry goes down to last