Skip to content

Conversation

@neSpecc
Copy link
Member

@neSpecc neSpecc commented Jan 27, 2024

The problem

  1. Right now Toolbox is opening even when Slash is pressed in a combination with Shift or Alt.
  2. Toolbox is not opening for Slash press in non-default keyboard layouts
Screen.Recording.2024-01-26.at.10.49.14.mov

Cause

  1. We're checking all keyboard keys using event.keyCode property with is not working properly in some keyboard layout.
  2. There was no check for Shift or Alt

Solution

  1. To open Toolbox we now use event.key=/ to check exact "/" typed. So check for Shift or Alt is not needed, since key will be different in that case.
  2. To open Block Tunes we now use event.code=Slash to check if slash-like key pressed with cmd. For example, in Spanish keyboard it will be cmd+-

Resolves #2597


### 2.29.1

- `Fix` — Toolbox wont be shown when Slash pressed with along with Shift or Alt
Copy link
Member

Choose a reason for hiding this comment

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

Control or meta keys

Copy link
Member Author

Choose a reason for hiding this comment

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

CMD+/ and CTRL+/ open Block Tunes — this behaviour stays the same.
Problem was in Shift+/ and Alt+/ — Toolbox won't be shown now, since "key" will be "?" or "÷" — we don't need to check Shift or Alt separately. Previously we checked keyCode which is the same for those chars.

Copy link
Member

Choose a reason for hiding this comment

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

Oh, okay. Shift is a bit weird for me here, because in some layouts I can't type / without shift.

@neSpecc neSpecc merged commit b619946 into next Jan 28, 2024
@neSpecc neSpecc deleted the fix-slash branch January 28, 2024 10:45
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.

Slash doesn't open toolbox

4 participants