Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with ON KEY LABEL 1

Status
Not open for further replies.

Brak

Programmer
Jul 11, 2001
158
US
Hello,

How can I set a different action for capital letters and lower case letters? When I use the ON KEY LABEL command for a lowercase letter it is triggered by the uppercase as well.

I would like to have the key A and the key a had different responces.

Thanks in advance.

B"H
Brak
 
Unfortunately you can't directly however you can write a small procedure or function that can determine which key value was pressed e.g.

ON KEY LABEL CHR(65) DO myprog with LASTKEY()
LASTKEY will pass th asc value to your prog so if the user pressed shift - a 65 is passed wheras just a 97 is passed

In my prog you can then call whatever you wanted with the respective value e.g
PROCEDURE myprog
PARAMETER lokeypressed

DO CASE
CASE lokeypressed=65
DO etc
CASE lokeypressed=97
DO etc
ENDCASE




Bob Palmer
The most common solution is H2O!
 
Ah, great idea!

Thanks!


B"H
Brak
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top