fix caret/keyboard issue(#62)

pressing space on a button will trigger click event
This commit is contained in:
Jinhao
2015-07-05 16:21:13 +08:00
parent 37481a2065
commit 0d14620052
5 changed files with 56 additions and 51 deletions

View File

@@ -151,7 +151,7 @@ namespace nana{ namespace drawerbase
void trigger::key_char(graph_reference, const arg_keyboard& arg)
{
if(arg.key == static_cast<char_t>(keyboard::enter))
if (static_cast<char_t>(keyboard::enter) == arg.key || static_cast<char_t>(keyboard::space) == arg.key)
emit_click();
}