| 877 | } |
| 878 | |
| 879 | Uint32 UITextInput::onKeyDown( const KeyEvent& event ) { |
| 880 | if ( getUISceneNode()->getWindow()->getIME().isEditing() ) |
| 881 | return 0; |
| 882 | |
| 883 | std::string cmd = mKeyBindings.getCommandFromKeyBind( { event.getKeyCode(), event.getMod() } ); |
| 884 | if ( !cmd.empty() ) { |
| 885 | // Allow copy selection on locked mode |
| 886 | if ( mAllowEditing ) { |
| 887 | mDoc.execute( cmd ); |
| 888 | mLastCmdHash = String::hash( cmd ); |
| 889 | mLastExecuteEventId = getInput()->getEventsSentId(); |
| 890 | return 1; |
| 891 | } |
| 892 | } |
| 893 | return UITextView::onKeyDown( event ); |
| 894 | } |
| 895 | |
| 896 | Uint32 UITextInput::onTextInput( const TextInputEvent& event ) { |
| 897 | if ( !mAllowEditing ) |