obs-studio icon indicating copy to clipboard operation
obs-studio copied to clipboard

frontend: Disable hotkeys when typing or in modal dialog

Open cg2121 opened this issue 3 years ago • 6 comments

Description

This disables hotkeys when an user is typing in a editable widget or a modal dialog is open.

Motivation and Context

Simpler version of https://github.com/obsproject/obs-studio/pull/3072 (was reverted) and it automatically works with all widgets.

Fixes https://github.com/obsproject/obs-studio/issues/7824

How Has This Been Tested?

Focused a editable widget and made sure the hotkeys didn't trigger. Also unfocused the same widget and made sure the hotkeys worked again. Also made sure hotkeys didn't trigger when opening a modal dialog.

Tested on Ubuntu 22.04 and Windows 10.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • [x] My code has been run through clang-format.
  • [x] I have read the contributing document.
  • [x] My code is not on the master branch.
  • [x] The code has been tested.
  • [x] All commit messages are properly formatted and commits squashed where appropriate.
  • [x] I have included updates to all appropriate documentation.

cg2121 avatar Dec 13 '22 21:12 cg2121

How did you test this? What operating systems did you test on? IIRC, focus events don't work the same on each OS, so it would be good to confirm that this behaves as intended on each.

RytoEX avatar Dec 20 '22 02:12 RytoEX

This has now been tested on Linux and Windows without any problems. It just needs testing on macOS.

cg2121 avatar Jan 15 '23 03:01 cg2121