tao icon indicating copy to clipboard operation
tao copied to clipboard

Accelerator support for virtual keys like `+`

Open probablykasper opened this issue 4 years ago • 4 comments

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 avatar Oct 27 '21 15:10 probablykasper

In browser keyboard events, it works like this

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

probablykasper avatar Oct 27 '21 16:10 probablykasper

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+=?

amrbashir avatar Oct 27 '21 17:10 amrbashir

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.

probablykasper avatar Oct 27 '21 20:10 probablykasper

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

amrbashir avatar Oct 27 '21 22:10 amrbashir