519{
520 evt.Skip();
521#if defined(wxHAS_GENERIC_DATAVIEWCTRL)
522
523 if(evt.GetKeyCode() == WXK_CONTROL_A &&
524 evt.GetModifiers() | WXK_COMMAND)
525 {
526 SelectAll();
527 evt.Skip(false);
528 return;
529 }
530 if(evt.GetKeyCode() == WXK_SPACE ||
531 evt.GetKeyCode() == WXK_RETURN ||
532 evt.GetKeyCode() == WXK_NUMPAD_ENTER)
533 {
534 return;
535 }
536
537 const auto ch = evt.GetUnicodeKey();
538 if(ch == WXK_NONE)
539 return;
540
541 auto item = GetCurrentItem();
542 if(!item.IsOk())
543 return;
544
545
546 const auto searchStartRow = GetRowByItem(item);
547 auto row = searchStartRow + 1;
548 while(true)
549 {
550 item = GetItemByRow(row);
551
552 if(!item.IsOk())
553 {
554 if(row > searchStartRow)
555 {
556
557
558 row = 0;
559 continue;
560 }
561 break;
562 }
563
564 wxVariant data;
566 const auto name = data.GetString();
567 if(!
name.empty() &&
name.Left(1).IsSameAs(ch,
false))
568 {
569 wxDataViewItemArray sel;
570 sel.push_back(item);
571 SetSelections(sel);
572 SetCurrentItem(sel[0]);
574 break;
575 }
576 if(row == searchStartRow)
577 break;
578 ++row;
579 }
580 evt.Skip(false);
581#else
582 evt.Skip();
583#endif
584}