Map key to send arrow key keycode
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 27k
- Forks
- 2.6k
- PR merge metrics
- No merged PRs in 30d
Description
I would like to map a key to send an arrow keypress to a webpage.
Example:
map D <right>
Use case:
http://www.mangatown.com/manga/working/v07/c173/4.html
Pressing the right arrow key navigates to page 5.html. I believe due to the code below. A little digging and I found keycode 39 is for the right arrow key but I do not know how to get vimium to send it to the site. Since the site is not using the links for goNext, ]] doesn't work.
KeyListener.addListener(39,next_page);KeyListener.addListener(37,previous_page);$(function(){var iw=$("#image").width();var it=$("#image").offset().top-81;$(".ad160_r").css({marginLeft:iw/2+ 5,top:it,left:"50%"});$(".ad160_l").css({marginRight:iw/2+ 5,top:it,right:"50%"});});var is_login='';var is_admin=false;
Thank you for your time and consideration.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing Vimium's key-mapping entry point for the requested map D <right> syntax and how it dispatches keys to webpages. Compare that path with the page's KeyListener.addListener(39,next_page) behavior. Done means the mapping sends a right-arrow keypress that triggers the site's page navigation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend, web-dev
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100