Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mouse click effect capability for screen recording #7622

Open
wants to merge 10 commits into
base: develop
Choose a base branch
from

Conversation

Vertygo
Copy link

@Vertygo Vertygo commented Oct 2, 2024

Added a mouse click effect feature for screen recording. This will enable people to see when click is performed in video.

This PR covers the following feature requests
#6785
#5570
#4097
#6799

Example of feature in action

rider64_ougsyFhm9S.mp4

Review comments todo:

  • run effect (form) outside Task.Run to avoid a need for explicit execution on main UI thread (Form.Invoke(...))
  • don't use underscore variables
  • right button support
  • add support for customizable color, size, fade time (make it as standalone tool)
  • format code
  • fade animation
  • fix rider changes in settings form

@Vertygo Vertygo changed the title add mouse click effect capability for screen recording Add mouse click effect capability for screen recording Oct 2, 2024
@Vertygo Vertygo force-pushed the mouse-click-effect branch from eea26e7 to bc48eac Compare October 2, 2024 19:08
int y = (ClientSize.Height - diameter) / 2;

// .NET GDI+ is not precise when drawign circles this would be better off with WPF/vector-based drawing
g.DrawEllipse(pen, x, y, diameter, diameter);
Copy link
Author

@Vertygo Vertygo Oct 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might not be best solution due to GDI+ poor precision.
ShareX_7x7a6EO0wE

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't add that much to this, I just wanted to say that rn I'm using this tool https://github.com/Phaiax/Key-n-Stroke to achieve the same and as it is open-source already you guys can probably get inspiration from there and/or took over some of the code to not reinvent the wheel here :) (altho I dunno if the poor precision thing is really better with keynstroke --> at least from a enduser-experience I've never had simliar problems)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point @saintcore. I do get inspired by projects like this. I like keyboard capturing capability it has and I might take a stab at it after I'm done with mouse effect.

I don't know how things work regarding "taking over" some code in the open-source world. I guess some collaboration with the owner (@Phaiax) is needed.

Regarding the small issue I mentioned here, I think that might be solved with help from @Jaex but keynstroke uses WPF so it is slightly different than ShareX which uses Windows Forms.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well according to the provided license, it shouldn't be a problem (see https://github.com/Phaiax/Key-n-Stroke?tab=Apache-2.0-1-ov-file#readme ). A good summary of what apache 2.0 license allows us to do with and not is available over at snyk: https://snyk.io/learn/apache-license/

Under the Apache license, users are permitted to modify, distribute, and sublicense the original open source code. Commercial use, warranties, and patent claims are also allowed with the Apache license.
....
When using the Apache license, developers must include the original copyright notice, a copy of the license text itself, and in some cases, a copy of the notice file with attribution notes and a disclosure of any significant changes made to the original code.
....

With that said, ofc it would be nice to hear from the original author of keynstroke and his desires beside license thoughts :)

@Vertygo Vertygo force-pushed the mouse-click-effect branch from 584d104 to dd383c8 Compare October 2, 2024 22:06
@nicknijenhuis
Copy link

Design wise, something like this would be great.

https://www.vecteezy.com/video/8079876-pointer-hand-cursor-clicking-technology-and-internet-icons-animation-on-green-screen-background-mouse-click-symbol-with-spark-on-green-screen

But let me not interfere with this to much! Your PR looks already very nice without my comment.

Thanks, have been wanting this!

@Vertygo
Copy link
Author

Vertygo commented Oct 13, 2024

@nicknijenhuis a nice effect, I think this could be achieved with a combination of timer(s) and GDI+. If there is enough interest for it, I could spend some time implementing it at later point in separate PR as I would like to avoid scope creeping this PR otherwise it won't be finished soon.

@Vertygo Vertygo force-pushed the mouse-click-effect branch from ed735b4 to 57b1be0 Compare October 13, 2024 04:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants