Fix ctrl+alt combination for text input on Windows.

This commit is contained in:
Martín Lucas Golini
2024-02-01 13:08:09 -03:00
parent a19c522908
commit 30051cf6b4
4 changed files with 12 additions and 8 deletions
+3 -2
View File
@@ -914,8 +914,9 @@ Uint32 UICodeEditor::onTextInput( const TextInputEvent& event ) {
Input* input = getUISceneNode()->getWindow()->getInput();
if ( ( input->isLeftAltPressed() && !event.getText().empty() && event.getText()[0] == '\t' ) ||
( input->isLeftControlPressed() && !input->isAltGrPressed() ) || input->isMetaPressed() ||
input->isLeftAltPressed() )
( input->isLeftControlPressed() && !input->isLeftAltPressed() &&
!input->isAltGrPressed() ) ||
input->isMetaPressed() || input->isLeftAltPressed() )
return 0;
if ( mLastExecuteEventId == getUISceneNode()->getWindow()->getInput()->getEventsSentId() )
+3 -2
View File
@@ -899,8 +899,9 @@ Uint32 UIConsole::onTextInput( const TextInputEvent& event ) {
Input* input = getUISceneNode()->getWindow()->getInput();
if ( ( input->isLeftAltPressed() && !event.getText().empty() && event.getText()[0] == '\t' ) ||
( input->isLeftControlPressed() && !input->isAltGrPressed() ) || input->isMetaPressed() ||
input->isLeftAltPressed() )
( input->isLeftControlPressed() && !input->isLeftAltPressed() &&
!input->isAltGrPressed() ) ||
input->isMetaPressed() || input->isLeftAltPressed() )
return 0;
if ( mLastExecuteEventId == getUISceneNode()->getWindow()->getInput()->getEventsSentId() )
+3 -2
View File
@@ -789,8 +789,9 @@ Uint32 UITextInput::onTextInput( const TextInputEvent& event ) {
Input* input = getUISceneNode()->getWindow()->getInput();
if ( ( input->isLeftAltPressed() && !event.getText().empty() && event.getText()[0] == '\t' ) ||
( input->isLeftControlPressed() && !input->isAltGrPressed() ) || input->isMetaPressed() ||
input->isLeftAltPressed() )
( input->isLeftControlPressed() && !input->isLeftAltPressed() &&
!input->isAltGrPressed() ) ||
input->isMetaPressed() || input->isLeftAltPressed() )
return 0;
if ( mLastExecuteEventId == getUISceneNode()->getWindow()->getInput()->getEventsSentId() )
@@ -421,8 +421,9 @@ Uint32 UITerminal::onTextInput( const TextInputEvent& event ) {
Input* input = getUISceneNode()->getWindow()->getInput();
if ( ( input->isLeftAltPressed() && !event.getText().empty() && event.getText()[0] == '\t' ) ||
( input->isLeftControlPressed() && !input->isAltGrPressed() ) || input->isMetaPressed() ||
input->isLeftAltPressed() )
( input->isLeftControlPressed() && !input->isLeftAltPressed() &&
!input->isAltGrPressed() ) ||
input->isMetaPressed() || input->isLeftAltPressed() )
return 0;
mTerm->onTextInput( event.getChar() );