Home » Developer & Programmer » Forms » How do I capture what key has been pressed by user
How do I capture what key has been pressed by user [message #269215] Fri, 21 September 2007 03:46 Go to next message
anisam10674
Messages: 18
Registered: March 2007
Junior Member
When a form is active, how do I capture which key was pressed by the user and store that ascii value in a variable?

e.g. Suppose the cursor is placed in a text item. On the key-others trigger I want to capture which key has pressed by the user and store that value in a variable. This will enable me to format the text item. Like if the user presses <ctrl-B> form will set the text inside the text-box to bold characters and like wise other operations...
Re: How do I capture what key has been pressed by user [message #269220 is a reply to message #269215] Fri, 21 September 2007 04:07 Go to previous messageGo to next message
Littlefoot
Messages: 20891
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Java?
Re: How do I capture what key has been pressed by user [message #269221 is a reply to message #269220] Fri, 21 September 2007 04:15 Go to previous messageGo to next message
anisam10674
Messages: 18
Registered: March 2007
Junior Member
Actually I am developing a form in developer 2000 with oracle 8i as database. I have a text-box on the form which is editable. Suppose an user has entered some text for e.g. bold and then he presses <ctrl-B> key combinations. I want to have a code in the key-others (or whichever is the best option) trigger such that the text in the text-box turns to bold.

The above is just one example. In short I would like to store the ascii value of <ctrl-B> combination in a variable and accordingly make the form fire the key-others trigger event.
Re: How do I capture what key has been pressed by user [message #269638 is a reply to message #269221] Sun, 23 September 2007 23:08 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
For Java look at:
Other Java bean articles (blogs)
http://forms.pjc.bean.over-blog.com/liste-article-blog.php

Also, go to the Oracle Forms website and review the sample code for an example of handling different fonts etc.

David
Previous Topic: how to import and export from forms 6i??
Next Topic: Time Feature
Goto Forum:
  


Current Time: Sat Dec 03 18:09:18 CST 2016

Total time taken to generate the page: 0.04240 seconds