• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

simulate shift key

 
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic