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

feat: add keybind(ctrl-p and ctrl-n) for mac platform #3997

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

shellRaining
Copy link
Contributor

image

The current appearance is like this, and we can using ctrl-p/n to navigate for mac platform (and just for local search)
this is related with #3853

}
function goRelativeItem(offset: number) {
const resNum = results.value.length
selectedIndex.value = (selectedIndex.value + resNum + (offset % resNum)) % resNum
Copy link
Contributor Author

Choose a reason for hiding this comment

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

when resNum == 0, the selectedIndex.value will be NAN, but this won't crash the script, so I don't add more judgement

})

const isMac = navigator.platform.toUpperCase().indexOf('MAC') >= 0
Copy link
Contributor Author

Choose a reason for hiding this comment

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

navigator.platform has been deprecated, but I want to get whether the modifier key for keyboard shortcuts is the command key rather than the control key

@github-actions github-actions bot added the stale label Sep 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant