• 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

Event Listeners

 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would like to know is it possible to write an event to use the page up and page down key on the key board to scroll up and down on a web page. What I have read is that the Event Listeners are used in applets to call a key when a keyboard is pressed. I don't write applets, just front end JSPs with backend servlets. Is it even possible to do this though I have never been able to use pageup pagedown keys on web pages. Just wondering if anyone has even thought or tried.
Thanks!
 
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can use the Robot class to post key events to the event queue. You should be able to scroll by posting VK_PAGE_UP or VK_PAGE_DOWN.
There was an example of it posted in this thread http://www.javaranch.com/ubb/Forum1/HTML/001678.html
reply
    Bookmark Topic Watch Topic
  • New Topic