Stacks-Editor icon indicating copy to clipboard operation
Stacks-Editor copied to clipboard

feat(bindings): support Cmd/Ctrl-Shift-Z hot key for history redo

Open giamir opened this issue 2 years ago • 1 comments

Closes #187

Describe your changes

This PR adds support for Shift-Mod-Z as hot key for history redo. It removes a utility that was used to create double bindings for both uppercase and lowercase hot keys containing letters (Mod-z and Mod-Z). Instead it introduces a plugin that normalizes letter case for keydown events based on the status of the Shift key:

  • when Shift is pressed letter case is always uppercase
  • when Shift is NOT pressed letter case is always lowercase

The plugin also helps to normalize the different Keyboard Events behavior across operative systems when caps lock is enabled. For historical context please refer to this old issue: https://github.com/StackExchange/Stacks-Editor/issues/90

PR Checklist

  • [x] All new/changed functionality includes unit and (optionally) e2e tests as appropriate
  • [x] All new/changed functions have /** ... */ docs
  • [x] I've added the bug/enhancement and other labels as appropriate

Environment(s) tested

  • Device: PC - OS: Windows 10 - Browser: Chrome
  • Device: MacBook Pro - OS: MacOS Monterey - Browser: Chrome, Safari, Firefox, Edge

giamir avatar Oct 14 '22 16:10 giamir

Deploy Preview for stacks-editor ready!

Name Link
Latest commit fbd46a0beafd303a95487d723b67d9b5ab52db01
Latest deploy log https://app.netlify.com/sites/stacks-editor/deploys/63be782555cafd00097cb4d7
Deploy Preview https://deploy-preview-227--stacks-editor.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

netlify[bot] avatar Oct 14 '22 16:10 netlify[bot]