FIX: Listbox doesn't handle Home, End. OK in windows

This commit is contained in:
qPCR4vir
2015-04-24 16:47:03 +02:00
parent 458c6b1d3c
commit 8d0e48bd1e
2 changed files with 12 additions and 2 deletions

View File

@@ -96,7 +96,8 @@ namespace nana
//System Code for OS
os_pageup = 0x21, os_pagedown,
os_arrow_left = 0x25, os_arrow_up, os_arrow_right, os_arrow_down,
os_insert = 0x2D, os_del
os_insert = 0x2D, os_del ,
os_end = 0x23 , os_home //Pos 1
};
};

View File

@@ -3294,7 +3294,16 @@ namespace nana
break;
}
// case keyboard::
case keyboard::os_home:
essence_->lister.select_for_all(false);
item_proxy::from_display(essence_, {0,0}).select(true);
essence_->trace_last_selected_item ();
break;
case keyboard::os_end:
essence_->lister.select_for_all(false);
item_proxy::from_display(essence_, essence_->lister.last()).select(true);
essence_->trace_last_selected_item ();
break;
default:
return;