+ case WXK_LEFT:
+ if ( event.ShiftDown() )
+ SetSelection( (from > 0 ? from - 1 : 0) , to );
+ else
+ {
+ if ( from != to )
+ insert = from;
+ else if ( insert > 0 )
+ insert -= 1;
+ SetInsertionPoint( insert );
+ }
+ handled = true;
+ break;
+ case WXK_RIGHT:
+ if ( event.ShiftDown() )
+ SetSelection( from, (to < last ? to + 1 : last) );
+ else
+ {
+ if ( from != to )
+ insert = to;
+ else if ( insert < last )
+ insert += 1;
+ SetInsertionPoint( insert );
+ }
+ handled = true;
+ break;