ThePacielloGroup / CCAe

The Colour Contrast Analyser (CCA) helps you determine the legibility of text and the contrast of visual elements, such as graphical controls and visual indicators.
http://www.paciellogroup.com/resources/contrastanalyser/
GNU General Public License v3.0
468 stars 105 forks source link

An unannounced keyboard shortcut in CCA hijacks the macOS default for selecting text. #323

Open moverton opened 6 months ago

moverton commented 6 months ago

Describe the bug In macOS, shift + command + right-arrow highlights text by default. However when CCA is running, this keyboard shortcut moves the CCA application panel from one display to another display and breaks the system default.

Desktop (please complete the following information):

To Reproduce Open CCA on macOS. Hit shift + command + right-arrow.

Expected behavior shift + command + right-arrow should select text from the point of insertion to the end of the line.

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Add any other context about the problem here.

handcoding commented 6 months ago

@moverton For whatever it’s worth, I think this bug report may be a duplicate of the keyboard-shortcut-hijacking issue that I had reported here (or vice-versa)?

Either way, I believe that it was commit 7b953a6 that caused this regression. And if we could get that commit backed out, I thiiiink that might resolve this.

PS If you downgrade to CCA 3.4.2 for macOS, you won’t see this issue in the meantime.

handcoding commented 6 months ago

And just for completeness—if it may help—here’s the text from the bug report that I had written about this keyboard-shortcut issue:

Added similar feature on Macos 7b953a6

@ferllings By the way, I believe that the above commit has caused a regression that has the effect of breaking some standard macOS keyboard shortcuts within all macOS applications (whenever the Color Contrast Analyzer is running).

As of CCA 3.5.1, if the Color Contrast Analyzer is running, the standard macOS keyboard shortcuts Cmd+Shift+Left and Cmd+Shift+Right no longer appear to work in any application.

macOS has standard keyboard shortcuts for selecting text, and among them are:

  • Cmd+Shift+Left to select from the cursor position to the beginning of the line
  • Cmd+Shift+Right to select from the cursor position to the end of the line

Here are steps to reproduce this issue on macOS if it may help:

  1. Close the Color Contrast Analyzer if it may be running.
  2. Open a new TextEdit document and paste in this text (or any other text): The quick brown fox jumped over the lazy dog.
  3. Place the cursor just after the word “fox” and then press Cmd+Shift+Left.
    • Result: ✔︎ The text from the cursor to the beginning of the line is selected.
  4. Then open CCA 3.5.1 and repeat those steps:
    1. Go back to the open TextEdit document from earlier (with the “quick brown fox” text).
    2. Place the cursor just after the word “fox” and then press Cmd+Shift+Left.
      • Expected result: The text from the cursor to the beginning of the line is selected.
      • Actual result: Nothing happens.

Just for completeness:

  • I’m running the Color Contrast Analyzer on macOS 14.2.1.
  • And I’ve also confirmed that this issue isn’t present when running CCA 3.4.2 for macOS.
ferllings commented 6 months ago

As mentioned on the other topic. I'll probably make those shortcuts customizable. And find a better default combination

A11yEvangel commented 3 months ago

(portable version 3.5.2) I never experienced a problem with Windows equivalent: Ctrl + Shift + arrow key. The latest version also is fine (in Windows 10 anyway).