PowerToys icon indicating copy to clipboard operation
PowerToys copied to clipboard

[QuickAccent] Shift + Space to navigate backwards

Open davidegiacometti opened this issue 3 years ago • 8 comments

Summary of the Pull Request

Detect shift key to navigate characters backwards with activation key set to space.

PR Checklist

  • [x] Closes: #21548
  • [ ] Communication: I've discussed this with core contributors already. If work hasn't been agreed, this work might be rejected
  • [ ] Tests: Added/updated and all pass
  • [ ] Localization: All end user facing strings can be localized
  • [ ] Dev docs: Added/updated
  • [ ] New binaries: Added on the required places
  • [ ] Documentation updated: If checked, please file a pull request on our docs repo and link it here: #xxx

Detailed Description of the Pull Request / Additional comments

Validation Steps Performed

  • Set activation key to space (also test with left/right/space)
  • Activate quick accent
  • Validate that shift + space is navigating characters backwards (left/right shift)

davidegiacometti avatar Nov 06 '22 20:11 davidegiacometti

Hi @davidegiacometti , Thanks for opening this PR. This change was discussed before here: https://github.com/microsoft/PowerToys/pull/20320#issuecomment-1253708634 Did you take this into account? How's the interaction when trying to do uppercase accented letters?

jaimecbernardo avatar Nov 07 '22 12:11 jaimecbernardo

@jaimecbernardo I have missed that! I have tested with uppercase (SHIFT) and when the selector appear if you dont release SHIFT it's navigating backwards. A better key could be CTRL (ALT is very inconvenient) or we can decide to close the issue as wont-fix.

The author of the issue got a valid point:

if you mistakenly press space one time too many and just want to back to the previous character instead of going through the whole list.

davidegiacometti avatar Nov 07 '22 21:11 davidegiacometti

I like this idea! But something disturb me. I stroke shift + E + space to get the uppercase selector. And naturally, I keep shift + E pushed, and repeat space. But it go backwards, it's troubling, so I have to up shift key, before changing character. It's not a big deal, but can be disturbing for some.

So I propose to add an option (activated by default), to deactivate it if some people get too much trouble with this feature.

damienleroy avatar Nov 08 '22 16:11 damienleroy

The other solution I see, is to let forward, and activate backward if the shift key, has been up and down again. But may be a bit more complicated to do.

damienleroy avatar Nov 08 '22 17:11 damienleroy

I have changed the code to detect shift for navigating backwards only if shift if pressed with visible toolbar. If you press SHIFT + A + SPACE is navigating forwards. To navigate backwards you need to release and press SHIFT again.

Let me know what do you think and if this needs to be configurable.

davidegiacometti avatar Nov 08 '22 21:11 davidegiacometti

@jaimecbernardo any reason to not merge?

crutkas avatar Nov 14 '22 18:11 crutkas

@jaimecbernardo any reason to not merge?

Yes, sorry. Still want a review from someone in the core team. @taras-janea is doing the TLC. Just added him as a reviewer.

jaimecbernardo avatar Nov 14 '22 18:11 jaimecbernardo

Nice catch @taras-janea I have fixed conflicts with main and the left/right shift behavior.

davidegiacometti avatar Nov 15 '22 20:11 davidegiacometti

Looks good and works well 👍 @davidegiacometti thank you for your contribution!

taras-janea avatar Nov 17 '22 14:11 taras-janea