• 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

keyboard short cuts in java...

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
does anyone know how to emulate a keyboard short cut in java? for example, run the same command as ctrl-c when a specific event it triggered from my java code??? it's currently running from an applet. i want people to NOT directly use ctrl-c but to click on something and have that fire the ctrl-c for them.
 
Ranch Hand
Posts: 286
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
did you have specific key combos you were trying to emulate or did you want it open to anything? Are you trying to (as per your example) copy stuff to the system clipboard? Or is just for use inside your java code?
 
jorge zapata
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ok here is the deal, your questions are definitely good. i shall explain more...
i am in a jdbtable implemented by a borland dataSet (that's only background information). if i highlight a bunch of rows and do ctrl-c it will copy the data and i can do a ctrl-v into excel or anyother application.
now, our users are not very keyboard short cut savy at all.
i have set up a menu when they right click to say copy (which is a copy field) to grab data in the cell and put it into the clip board for later use.
now i want to add a copy row and copy rows selected. i am trying to copy all the data in all the rows selected and put them in the clipboard. the ctrl-c works, now if i could call the ctrl-c function from my code that would be all i have to do.
if i cannot do that, i will have to write code to figure out what rows are selected and grab the columns etc... and put that in the clipboard. and that is what i am trying to avoid to do. all i want to do is use the existing ctrl-c from a java action performed.
thanks you in advance,
jz
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic