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

Make it harder to steal character keys from the outer app #549

Merged
merged 2 commits into from
Aug 19, 2024

Conversation

paulsmirnov
Copy link
Member

Description

Resolves #534

  • Move "S" key processing to the demo app (nobody needs it in the library),
  • Require "Alt" key with numpad Plus/Minus (a kind of a breaking change but not documented and not used a lot),
  • Process editing keys only when editing (an additional safety measure),
  • Use event.code instead of deprecated keyCode.

The Alt+NumPlus, Alt+NumMinus will still be processed in the miew library unless miew.enableHotKeys(false) is called. I believe that's enough to solve the issue in most cases.

Type of changes

  • Breaking change (fix or feature that would cause existing functionality not to work as expected)

Checklist

  • I have read CONTRIBUTING and CODE_OF_CONDUCT guides.
  • I have followed the code style of this project.
  • I have run yarn run ci: lint and tests pass locally with my changes.
  • The changes do not require updated tests.
  • The changes do not require updated docs.

- require "Alt" key with numpad Plus/Minus,
- use `event.code` instead of deprecated `keyCode`,
- process editing keys only when editing.
@paulsmirnov paulsmirnov self-assigned this Aug 16, 2024
@paulsmirnov paulsmirnov linked an issue Aug 16, 2024 that may be closed by this pull request
Copy link
Collaborator

@NataliaDSmirnova NataliaDSmirnova left a comment

Choose a reason for hiding this comment

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

Great fix! Thanks 👍

@paulsmirnov paulsmirnov merged commit e35706d into main Aug 19, 2024
4 checks passed
@paulsmirnov paulsmirnov deleted the 534-miew-disables-keys branch August 19, 2024 14:08
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.

Miew will disabled s/+/- keys on pages where it's initialized
2 participants