0

I am making a chrome extension for someone disabled that can only click a mouse I was wondering if there is anyway to similate a page down event (I would love to just be able to send a keydown event to move page but I dont know if this is posible check out the links Fire tab keypress event in JavaScript? http://www.howtocreate.co.uk/tutorials/javascript/domevents very upsetting I thought this would be easy). Is there any work around the firing keyevent (because this would make my life a lot easier also for the other keys instead of just getting the element that has been onfocus).

Community
  • 1
  • 1
Aaron Rabinowitz
  • 357
  • 2
  • 18
  • 1
    Just use `window.scrollBy(0, innerHeight)` inside a content script? – wOxxOm Aug 12 '16 at 16:00
  • http://stackoverflow.com/questions/2490825/how-to-trigger-event-in-javascript – John Aug 12 '16 at 16:03
  • @wOxxOm is there anyway to simulate a tab press for navigation to select selectable elements – Aaron Rabinowitz Aug 12 '16 at 16:11
  • 1
    Welp... [Simulating the TAB keydown: focusing next element as determined by \`tabIndex\`](http://stackoverflow.com/q/7303507) – wOxxOm Aug 12 '16 at 16:12
  • @wOxxOm also I would like to get the keyboard to work for every separate and different types of text areas on page would I have to do this manually if I could just simulate a keypress somehow – Aaron Rabinowitz Aug 12 '16 at 16:13
  • 1
    As explained in the answer you've linked, there is no universal magical method, you'll have to implement every function manually as shown in the "Simulating the TAB keydown" link above. – wOxxOm Aug 12 '16 at 16:14
  • 1
    Normally, this job gets done easily with an external key-remapping utility like AutoHotkey etc. – wOxxOm Aug 12 '16 at 16:16

0 Answers0