UI: Disable hotkeys when a user is expected to type text

Disable hotkeys when a user starts an interaction with the UI where they
are expected to type text and re-enable hotkeys when the interaction is
completed.
This commit is contained in:
Ryan Foster 2021-04-15 02:01:05 -04:00 • committed by Jim
commit f832d14220
7 changed files with 24 additions and 0 deletions

View file

@ -67,6 +67,7 @@ OBSBasicInteraction::OBSBasicInteraction(QWidget *parent, OBSSource source_)
};
connect(ui->preview, &OBSQTDisplay::DisplayCreated, addDrawCallback);
App()->DisableHotkeys();
}
OBSBasicInteraction::~OBSBasicInteraction()
@ -74,6 +75,7 @@ OBSBasicInteraction::~OBSBasicInteraction()
// since QT fakes a mouse movement while destructing a widget
// remove our event filter
ui->preview->removeEventFilter(eventFilter.get());
App()->UpdateHotkeyFocusSetting();
}
OBSEventFilter *OBSBasicInteraction::BuildEventFilter()