Files
spatialnavigation/README.md

56 lines
2.5 KiB
Markdown
Raw Normal View History

2022-11-14 23:08:54 +01:00
# Spatialnavigation
2021-03-08 17:08:06 +01:00
2022-11-14 23:08:54 +01:00
__Spatial Navigation Chrome Extension__
Smart spatial navigation with key map to links.
2023-06-09 13:04:52 +02:00
2023-06-09 13:04:03 +02:00
Based off the *[Spatial Navigation](https://github.com/falsandtru/spatial-navigation)* extension by Falsandtru.
2022-11-14 23:08:54 +01:00
2023-06-09 11:27:51 +02:00
Binds WASD, F, E and Q keys for navigation/hints mode.
2022-11-14 23:08:54 +01:00
2023-06-08 17:54:39 +02:00
* `W/A/S/D`: Four-way spatial navigation
* `E/Shift+E`: Expand/Contract (change link targets)
* `Q`: Quit navigation/hints mode
* `Enter/F`: Click link
2023-06-09 11:18:15 +02:00
* `Shift+Enter/Shift+F`: Shift-click link (open new tab)
2023-06-08 17:54:39 +02:00
* `Ctrl+Enter/Ctrl+F`: Ctrl-click link (open new background tab)
2023-06-09 11:27:51 +02:00
* `Ctrl+Shift+X`: Disable the hotkeys for current tab
2023-06-08 17:11:58 +02:00
2023-06-08 17:54:39 +02:00
Set your own keys: Click the icon and choose Options, or visit the details page in the browser extension manager.
2023-06-08 17:11:58 +02:00
2023-06-09 11:27:51 +02:00
Any contributions are most welcome! 🤓👍
2023-06-08 17:11:58 +02:00
### Screenshot
2022-11-14 23:08:54 +01:00
![Screenshot of extension in use](https://raw.githubusercontent.com/Pathduck/spatialnavigation/main/img/screenshot.jpg "Screenshot of extension in use")
2023-06-09 11:18:15 +02:00
### Notes
This extension is far from feature complete, and some things just don't work as expected.
The inherited code is also a bit of a mess, and since I am no JS coder there's limits to what can be done.
As this started as a very personal extension for my use, some things are the way I want them and not easily changed.
Here are some of the more common issues/bugs/TODOs and some tips:
2023-06-09 11:27:51 +02:00
* Changing keys in options require a tab reload to take effect.
2023-06-09 11:18:15 +02:00
* Using `Ctrl+<link key>` in hints mode does not work. Using `Shift+<link key>` works for opening in a new tab though.
2023-06-09 11:27:51 +02:00
* The default `Ctrl+F` interferes with the common browser shortcut for Find-In-Page. I suggest using something else for Find, like F3, or changing the key to for instance `G`.
2023-06-09 11:18:15 +02:00
2023-06-09 15:32:33 +02:00
* Even if keys are changed, there might be conflicts with the link hints as they are hard-coded, see below.
2023-06-09 11:18:15 +02:00
2023-06-09 11:27:51 +02:00
* The extension uses a hard-coded list of link hint keys. These might interfere with common browser keys, especially if single-key shortcuts are used in the browser. If so these will need to be removed from the list.
2023-06-09 11:18:15 +02:00
2023-06-09 11:27:51 +02:00
* The list of available link hint keys are in `spatial-navigation.js`:\
2023-06-09 11:20:36 +02:00
`var keys = 'abcdfghijklmnoprstuvwxyz'`\
2023-06-09 11:18:15 +02:00
You can edit this string and reload the extension. You can also add keys you want to use instead, for instance the number keys (if not used for anything else).
2023-06-09 11:27:51 +02:00
* The CSS styles for links/hints/url display can if necessary be changed by editing the following values in `spatial-navigation.js`:\
2023-06-09 11:20:36 +02:00
`this.style.innerHTML`\
`marker.style.cssText`\
2023-06-09 11:18:15 +02:00
`display.style.cssText`
* There are no language options or internationalization.