Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accelerator support for virtual keys like + #227

Closed
probablykasper opened this issue Oct 27, 2021 · 4 comments · Fixed by #562 · May be fixed by grant0417/tao#1
Closed

Accelerator support for virtual keys like + #227

probablykasper opened this issue Oct 27, 2021 · 4 comments · Fixed by #562 · May be fixed by grant0417/tao#1

Comments

@probablykasper
Copy link
Member

probablykasper commented Oct 27, 2021

A common keyboard shortcut is CmdOrCtrl+Plus, which tao currently doesn't support (at least on macOS, not sure about other platforms)

Returning "+" from Accelerator::key_equivalent on macOS and it gave me ⌘+ in the menu bar. On my keyboard, both ⌘= and ⌘⇧+ trigger that shortcut (which is expected).

@probablykasper
Copy link
Member Author

In browser keyboard events, it works like this

  • = -> { e.key: "=", e.code: "Equal" }
  • ⇧= -> { e.key: "+", e.code: "Equal" }

@amrbashir
Copy link
Member

amrbashir commented Oct 27, 2021

A common keyboard shortcut is CmdOrCtrl+Plus, which tao currently doesn't support (at least on macOS, not sure about other platforms)

Can't you just use CmdOrCtrl+Shift+=?

@probablykasper
Copy link
Member Author

Can't you just use CmdOrCtrl+Shift+=?

Not if you want to match the behavior of Safari, TextEdit etc. On my Norwegian keyboard, + and = are on different keys.

@amrbashir
Copy link
Member

amrbashir commented Oct 27, 2021

Ah I see, We need to discuss this as it might require a lot of changes to make it consistent for all platforms. cc @lemarier @wusyong

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants