X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Ftext-controller-event-handler.cpp;h=89ff0f9d8eb488b232c65795bfdf94f9cbc435dd;hp=b9b260b80f95b7de6f8f60346059b8be0600d52d;hb=5075ccc3be07ba0da557493efc026ecb2a5373fe;hpb=d48e9b8b161367ad699c0352dfeb0128832bbe59 diff --git a/dali-toolkit/internal/text/text-controller-event-handler.cpp b/dali-toolkit/internal/text/text-controller-event-handler.cpp index b9b260b..89ff0f9 100644 --- a/dali-toolkit/internal/text/text-controller-event-handler.cpp +++ b/dali-toolkit/internal/text/text-controller-event-handler.cpp @@ -109,6 +109,9 @@ bool Controller::EventHandler::KeyEvent(Controller& controller, const Dali::KeyE int keyCode = keyEvent.GetKeyCode(); const std::string& keyString = keyEvent.GetKeyString(); const std::string keyName = keyEvent.GetKeyName(); + // Key will produce same logical-key value when ctrl + // is down, regardless of language layout + const std::string logicalKey = keyEvent.GetLogicalKey(); const bool isNullKey = ( 0 == keyCode ) && ( keyString.empty() ); @@ -182,25 +185,25 @@ bool Controller::EventHandler::KeyEvent(Controller& controller, const Dali::KeyE else if ( keyEvent.IsCtrlModifier() && !keyEvent.IsShiftModifier()) { bool consumed = false; - if (keyName == KEY_C_NAME || keyName == KEY_INSERT_NAME) + if (keyName == KEY_C_NAME || keyName == KEY_INSERT_NAME || logicalKey == KEY_C_NAME || logicalKey == KEY_INSERT_NAME) { // Ctrl-C or Ctrl+Insert to copy the selected text controller.TextPopupButtonTouched( Toolkit::TextSelectionPopup::COPY ); consumed = true; } - else if (keyName == KEY_V_NAME) + else if (keyName == KEY_V_NAME || logicalKey == KEY_V_NAME) { // Ctrl-V to paste the copied text controller.TextPopupButtonTouched( Toolkit::TextSelectionPopup::PASTE ); consumed = true; } - else if (keyName == KEY_X_NAME) + else if (keyName == KEY_X_NAME || logicalKey == KEY_X_NAME) { // Ctrl-X to cut the selected text controller.TextPopupButtonTouched( Toolkit::TextSelectionPopup::CUT ); consumed = true; } - else if (keyName == KEY_A_NAME) + else if (keyName == KEY_A_NAME || logicalKey == KEY_A_NAME) { // Ctrl-A to select All the text controller.TextPopupButtonTouched( Toolkit::TextSelectionPopup::SELECT_ALL );