Comments (7)
I am also on mac and I have adopted ctrl-p and ctrl-n for previous/next when selecting from a list. This pattern of shortcuts originates from unix shells (common for navigating bash/zsh history) and is also one of the set of emacs-originated shortcuts which are built in to macos system text fields (for example, the safari location bar supports ctrl-a, ctrl-e for moving the cursor to the beginning and end of the field, and ctrl-p/ctrl-n for selecting from the autocomplete options which can be presented from the location bar.
These shortcuts work similarly in chrome, and are also adopted by many other apps' search fields like Discord and Alfred as well as web apps like Github.
On macOS these do not conflict with print/new like they do on windows; I do not know whether it is more common to override them or just let them not affect windows; I suspect the latter, especially for web apps. Anyhow, I think implementing this behavior equivalent to how it works in Github's search field would be a great addition, and will particularly impress folks who live in the terminal.
from vitepress.
Why do you want to select search results? 👀 Do you want to avoid doing arrow down/up + return?
Moreover ctrl/cmd + p is for printing and ctrl/cmd + n is for new window. It would conflict with those.
from vitepress.
I often use the search function.
First, press Ctrl-k
to open the search box
then enter the search text, and then use the up
or down
keys to select a matching entry.
Finally, press Enter
to view the full article.
However, up
or down
are quite far away. I hope I can use Ctrl-n
or Ctrl-p
instead.
from vitepress.
Why do you want to select search results? 👀 Do you want to avoid doing arrow down/up + return?
Moreover ctrl/cmd + p is for printing and ctrl/cmd + n is for new window. It would conflict with those.
Oh, sorry, I am using a Mac keyboard. I forgot that Ctrl n and Ctrl p are browser shortcuts.
That seems not a good suggestion.
from vitepress.
However, up or down are quite far away.
? They are literally reachable without stretching hand!
from vitepress.
Can we just do this key mapping for Mac, I found that Next.js documentation can use shortcuts like Ctrl-n
from vitepress.
However, up or down are quite far away.
? They are literally reachable without stretching hand!
Moving the little finger to up
or down
will make the right hand leave its original position, I think it's uncomfortable 😂
from vitepress.
Related Issues (20)
- GitHub Pages 部署失败 HOT 8
- Changing metadata per page HOT 2
- Please tell me how to change the content width of the homepage.
- Another way to use vue components in markdown file HOT 1
- Report an EBADPLATFORM error during installation on MacOS HOT 7
- Cannot watch for changes in route query parameters using `useRoute()` HOT 1
- support for <script src="..." type="module"></script> and <style></style> HOT 2
- SyntaxError: The requested module 'xxxx' does not provide an export named 'createMap' HOT 1
- Ability to generate index page that lists all sub-pages recursively HOT 2
- when the length of the Math Equation is too long HOT 1
- escapeHtml breaks my build after [email protected] update HOT 2
- Fails to build with yarn v4 PnP, rollup error HOT 4
- Sidebar depth HOT 1
- upgrading to vitepress v1.2.2 build error HOT 2
- If I use the canonicalUrl example syntax in vitepress version 1.2.2, an error occurs when building. HOT 6
- Traslation issue HOT 4
- Add `important` to custom containers
- The style is not applied to the list inside the quote
- How to add a custom element next to a specific existing navbar element? HOT 1
- Last Updated Time in sitemap.xml HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vitepress.