jbrowse-components icon indicating copy to clipboard operation
jbrowse-components copied to clipboard

Use "code" instead of "key" for undo/redo keyboard event

Open garrettjstevens opened this issue 3 years ago • 1 comments

Ctrl+Shift+Z for redo wasn't working for me, since it was using the event.key attribute being "z", and my system detects "Z" (upper case) for that case. This changes it to use event.code being "KeyZ" instead, which should work on any system.

It also updates the description of the shortcuts in the docs to use <kbd> and <samp> elements as suggested in https://developer.mozilla.org/en-US/docs/Web/HTML/Element/kbd. For example, instead of "ctrl+z", use Ctrl+Z.

garrettjstevens avatar Aug 11 '22 04:08 garrettjstevens

Codecov Report

Merging #3131 (617634a) into main (ad9bf14) will decrease coverage by 0.03%. The diff coverage is 13.63%.

@@            Coverage Diff             @@
##             main    #3131      +/-   ##
==========================================
- Coverage   58.81%   58.78%   -0.04%     
==========================================
  Files         648      648              
  Lines       29042    29042              
  Branches     7067     7067              
==========================================
- Hits        17082    17072      -10     
- Misses      11581    11591      +10     
  Partials      379      379              
Impacted Files Coverage Δ
products/jbrowse-desktop/src/rootModel.ts 29.95% <0.00%> (ø)
products/jbrowse-web/src/rootModel.ts 54.57% <27.27%> (-0.36%) :arrow_down:
...svg/src/SvgFeatureRenderer/components/Segments.tsx 85.71% <0.00%> (-7.15%) :arrow_down:
...src/SvgFeatureRenderer/components/FeatureLabel.tsx 80.55% <0.00%> (-5.56%) :arrow_down:
...gins/svg/src/SvgFeatureRenderer/components/util.ts 91.83% <0.00%> (-4.09%) :arrow_down:
...FeatureRenderer/components/ProcessedTranscript.tsx 87.32% <0.00%> (-1.41%) :arrow_down:
plugins/alignments/src/BamAdapter/BamAdapter.ts 72.07% <0.00%> (-0.91%) :arrow_down:
...ments/src/SNPCoverageAdapter/SNPCoverageAdapter.ts 57.33% <0.00%> (-0.67%) :arrow_down:
packages/core/util/layouts/GranularRectLayout.ts 86.86% <0.00%> (-0.43%) :arrow_down:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

codecov[bot] avatar Aug 11 '22 04:08 codecov[bot]

lgtm, fixes it on my machine too

cmdcolin avatar Aug 19 '22 19:08 cmdcolin