Add common keys in ui::Entry for OS X

This commit is contained in:
David Capello 2015-05-11 12:12:13 -03:00
parent 7450139898
commit 02d163b8d8

View File

@ -226,15 +226,19 @@ bool Entry::onProcessMessage(Message* msg)
switch (scancode) {
case kKeyLeft:
if (msg->ctrlPressed())
if (msg->ctrlPressed() || msg->altPressed())
cmd = EntryCmd::BackwardWord;
else if (msg->cmdPressed())
cmd = EntryCmd::BeginningOfLine;
else
cmd = EntryCmd::BackwardChar;
break;
case kKeyRight:
if (msg->ctrlPressed())
if (msg->ctrlPressed() || msg->altPressed())
cmd = EntryCmd::ForwardWord;
else if (msg->cmdPressed())
cmd = EntryCmd::EndOfLine;
else
cmd = EntryCmd::ForwardChar;
break;