MCPcopy Create free account
hub / github.com/SpartanJ/eepp / onKeyDown

Method onKeyDown

src/eepp/ui/uitextinput.cpp:879–894  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

877}
878
879Uint32 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
896Uint32 UITextInput::onTextInput( const TextInputEvent& event ) {
897 if ( !mAllowEditing )

Callers

nothing calls this directly

Calls 7

hashFunction · 0.85
onKeyDownFunction · 0.85
getCommandFromKeyBindMethod · 0.80
isEditingMethod · 0.45
getWindowMethod · 0.45
emptyMethod · 0.45
executeMethod · 0.45

Tested by

no test coverage detected