Skip to content

Allow to prevent shortcuts processing in onKeyDown by returning false #87

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

Merged
merged 1 commit into from
Jan 26, 2022

Conversation

Badestrand
Copy link
Contributor

Hi!

I need the functionality to "submit" the code when the user presses cmd+enter on Mac or ctrl+enter on Windows. I could "submit" in the onKeyDown but the combination would insert the enter plus indention.

Now the user can return false from onKeyDown to prevent the shortcut processing.

Sorry if the format of this pull request is wrong, it's one of my first ever :)

Allow to prevent shortcuts processing in onKeyDown by returning false
@netlify
Copy link

netlify bot commented Jan 26, 2022

❌ Deploy Preview for vibrant-wilson-a6f337 failed.

🔨 Explore the source changes: be999d6

🔍 Inspect the deploy log: https://app.netlify.com/sites/vibrant-wilson-a6f337/deploys/61f100c0c3d600000764a057

@Badestrand
Copy link
Contributor Author

Oh I see the onKeyDown type needs to be changed as well.

@jaywcjlove jaywcjlove merged commit 8b8a7a2 into uiwjs:main Jan 26, 2022
jaywcjlove added a commit that referenced this pull request Jan 26, 2022
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.

2 participants