Fix Windows key modifiers #236

Merged
Scrxtchy merged 1 commit from windows-modifier into master 2021-01-27 16:36:23 -06:00
Scrxtchy commented 2020-08-22 22:55:34 -05:00 (Migrated from github.com)

Description

I have altered the code responsible for key modifiers. Changes in #206 broke support on Windows, new logic has been implemented to return support.
Other values such as native_scancode should probably also be investigated, but I am not a linux desktop user.

Motivation and Context

This will solve issues https://github.com/obsproject/obs-studio/issues/3307 and dicsussions on the forum

How Has This Been Tested?

I have only tested this on windows, while I had backported obs studio to tag 25.0.1, I do not believe this will be an issue in regards to the patch.
Testing on both linux and macos would be appreciated. I have read that native is also a thing for mac users in this CEF thread, therefore it is likely a further change will be needed

Types of changes

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

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.
### Description I have altered the code responsible for key modifiers. Changes in #206 broke support on Windows, new logic has been implemented to return support. Other values such as native_scancode should probably also be investigated, but I am not a linux desktop user. ### Motivation and Context This will solve issues https://github.com/obsproject/obs-studio/issues/3307 and [dicsussions on the forum](https://obsproject.com/forum/threads/in-browser-source-stopped-working-copy-paste.118812/) ### How Has This Been Tested? I have only tested this on windows, while I had backported obs studio to tag 25.0.1, I do not believe this will be an issue in regards to the patch. Testing on both linux and macos would be appreciated. I have read that `native` is also a thing for mac users in this [CEF thread](https://magpcss.org/ceforum/viewtopic.php?f=6&t=13560), therefore it is likely a further change will be needed ### Types of changes - Bug fix (non-breaking change which fixes an issue) ### Checklist: - [X] My code has been run through [clang-format](https://github.com/obsproject/obs-studio/blob/master/.clang-format). - [X] I have read the [**contributing** document](https://github.com/obsproject/obs-studio/blob/master/CONTRIBUTING.rst). - [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.
dodgepong commented 2020-08-22 23:02:15 -05:00 (Migrated from github.com)

Thanks for investigating this and submitting a fix!

Thanks for investigating this and submitting a fix!
RytoEX (Migrated from github.com) reviewed 2020-08-22 23:12:18 -05:00
RytoEX (Migrated from github.com) commented 2020-08-22 23:12:17 -05:00

Don't need this blank line.

Don't need this blank line.
Scrxtchy (Migrated from github.com) reviewed 2020-08-22 23:14:17 -05:00
Scrxtchy (Migrated from github.com) commented 2020-08-22 23:14:17 -05:00

Wondering if by using an old tag my clangformat rules are out of date

Wondering if by using an old tag my clangformat rules are out of date
Scrxtchy commented 2020-08-22 23:22:51 -05:00 (Migrated from github.com)

Testing on both linux and macos would be appreciated. I have read that native is also a thing for mac users in this CEF thread, therefore it is likely a further change will be needed

I have put together a mac patch that I expect I'll need to force push at some point
https://gist.github.com/Scrxtchy/c7b8a32285176400a60517adaf061226

this swaps out the Linux defined methods to now work on macs. As it's easier to just define windows methods for it's own platform, the operation checks for this, then applying the existing linux methods on mac as well

> Testing on both linux and macos would be appreciated. I have read that native is also a thing for mac users in this CEF thread, therefore it is likely a further change will be needed I have put together a mac patch that I expect I'll need to force push at some point https://gist.github.com/Scrxtchy/c7b8a32285176400a60517adaf061226 this swaps out the Linux defined methods to now work on macs. As it's easier to just define windows methods for it's own platform, the operation checks for this, then applying the existing linux methods on mac as well
Scrxtchy commented 2020-08-23 00:14:10 -05:00 (Migrated from github.com)

After some deliberation, we have come to find that macos modifiers where indeed already broken. As I have no platform to develop the solution on a mac, I cannot commit to a fix on this. I have reverted the state to a previous version of the fix, back to only fixing the issue regarding windows users

After some deliberation, we have come to find that macos modifiers where indeed already broken. As I have no platform to develop the solution on a mac, I cannot commit to a fix on this. I have reverted the state to a previous version of the fix, back to only fixing the issue regarding windows users
RytoEX commented 2020-08-28 13:45:11 -05:00 (Migrated from github.com)

After some deliberation, we have come to find that macos modifiers where indeed already broken. As I have no platform to develop the solution on a mac, I cannot commit to a fix on this. I have reverted the state to a previous version of the fix, back to only fixing the issue regarding windows users

Does that mean that this PR no longer addresses #238? Does this also mean that #206 did not introduce the breakage, but something else between OBS 25.0.1 and 25.0.2?

> After some deliberation, we have come to find that macos modifiers where indeed already broken. As I have no platform to develop the solution on a mac, I cannot commit to a fix on this. I have reverted the state to a previous version of the fix, back to only fixing the issue regarding windows users Does that mean that this PR no longer addresses #238? Does this also mean that #206 did not introduce the breakage, but something else between OBS 25.0.1 and 25.0.2?
Scrxtchy commented 2020-08-28 15:08:35 -05:00 (Migrated from github.com)

The comment is in regards to Mac support, the issue and patch is around Windows support

The comment is in regards to Mac support, the issue and patch is around Windows support
WizardCM commented 2021-01-27 02:33:08 -06:00 (Migrated from github.com)

Hey, could you rebase this? Thanks!

Hey, could you rebase this? Thanks!
Scrxtchy commented 2021-01-27 03:20:59 -06:00 (Migrated from github.com)

I have rebased this patch and have tested it on my Windows machine, hopefully it still performs as it should on Linux

I have rebased this patch and have tested it on my Windows machine, hopefully it still performs as it should on Linux
Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-obsproject/obs-browser!236
No description provided.