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 listener to better handle hotkey presses #2114

Merged
merged 1 commit into from
Aug 22, 2023

Conversation

stonerl
Copy link
Collaborator

@stonerl stonerl commented Aug 18, 2023

fixes #1639

@RunDevelopment
Copy link
Member

This causes all commands to be executed twice. This can be seen with an empty chain. Make an empty chain and press F5. You'll get 2 identical errors:

image

You can probably just remove the hotkey handlers in ExecutionContext.tsx to fix this. I would even recommend moving your useEffect there.

Also, please use the same logic as the current hotkey handlers. This includes accounting for the current execution status, and disabling hotkeys when an alert is open. See HotkeysContext and useHotkeys.

@stonerl stonerl marked this pull request as draft August 18, 2023 11:24
@stonerl
Copy link
Collaborator Author

stonerl commented Aug 21, 2023

I hope it is correct now.

@stonerl stonerl marked this pull request as ready for review August 21, 2023 10:17
src/renderer/contexts/ExecutionContext.tsx Outdated Show resolved Hide resolved
src/renderer/contexts/ExecutionContext.tsx Outdated Show resolved Hide resolved
Copy link
Member

@RunDevelopment RunDevelopment left a comment

Choose a reason for hiding this comment

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

Thank you @stonerl!

@joeyballentine joeyballentine merged commit fd78e19 into chaiNNer-org:main Aug 22, 2023
4 checks passed
@stonerl stonerl deleted the f5 branch August 22, 2023 14:52
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.

F5 doesn't work at first
3 participants