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

'alternate' and 'key' parameters seem incompatible? #1859

Open
jaydisc opened this issue Sep 8, 2022 · 0 comments
Open

'alternate' and 'key' parameters seem incompatible? #1859

jaydisc opened this issue Sep 8, 2022 · 0 comments
Labels

Comments

@jaydisc
Copy link

jaydisc commented Sep 8, 2022

Hi, I'm trying to implement the 'alternate' parameter for a menu item that has a 'key' set, and instead of working as expected, the 'alternate' item is just listed beneath the item above it.

Here is some sample code:

echo '🤷‍♂️'
echo '---'

echo "Command 1a | shell='echo'"
echo "Command 1b | shell='echo' alternate='true'"

echo "Command 2a | shell='echo' key='CmdOrCtrl+c'"
echo "Command 2b | shell='echo' alternate='true'"

echo "Command 3a | shell='echo' key='CmdOrCtrl+c'"
echo "Command 3b | shell='echo' key='CmdOrCtrl+OptionOrAlt+c' alternate='true'"

Command 1a/1b switches correctly when the Option key is pressed when the menu is exposed.

Command 2a/2b implements ⌘C as the keyboard shortcut for 2a, but both rows (2a/2b) are always visible, and there is no reaction to the Option key.

Command 3a/3b additionally implements ⌘⌥C as the keyboard shortcut for 3b, with the intention of matching the shortcut for 3a, but adding ⌥. This reacts the same as 2a/2b: both rows (3a/3b) are always visible, and there is no reaction to the Option key.

For both set, Command 2a/b and 3a/b, I expected only menu 'a' to be visible when exposed, and only 'b' to be shown when Option is pressed.

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

No branches or pull requests

2 participants