Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

simulate shift key

 
seb petterson
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to implement navigation with arrowkeys in a "grid". The grid is a table containing input fields. The vertical navigation with up and down arrows I got working through giving the input fields id values that increment downwards like this:
0 3 6
1 4 7
2 5 8
Plus with a bit of javascripting.
Now I need to be able to navigate horisontally.
the problem is that the table is generated dynamically so I can't know how many rows or how many columns there are. And I also dont know if the number of cells in each row might different from the number of input fields.
So: my idea was to emulate tabbing! It works fine with the right arrow, when its pressed i execute:

And the browser behaves as if the TAB key was pressed
The problem I have is with the left key, which would be SHIFT+TAB. How do I emulate that??

I allreayd tried:


But id didnt work
Thanks.

Seb
[ April 11, 2006: Message edited by: seb petterson ]
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just to let you know IE is the only browser that lets you set the keycode so you are not going to be able to use this in any other browser.

Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic