Browse and lower case keys

Browse and lower case keys

Postby concentra » Wed Mar 30, 2022 12:46 pm

Hi.

In browses, scan codes from upper and lower case keys seems to be the same...
While in a browse, in a bKeyDown function, how do I know if the user typed a lower or upper case letter ?

Regards.
Maurício Ventura Faria
User avatar
concentra
 
Posts: 110
Joined: Mon Nov 14, 2005 10:15 am
Location: Brazil

Re: Browse and lower case keys

Postby karinha » Wed Mar 30, 2022 1:06 pm

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7214
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Browse and lower case keys

Postby concentra » Wed Mar 30, 2022 1:34 pm


Karinha, its the opposite...
ASC returns the numeric code of a character string and Browses bKeyDown gives me a numeric code of a typed character.
But in the browse, this code is the same for A and a.
It always returns the upper case code, and I need to know if the lower case one was typed...

[[]] Maurício Ventura Faria

P.S. Vai Corinthians!
User avatar
concentra
 
Posts: 110
Joined: Mon Nov 14, 2005 10:15 am
Location: Brazil

Re: Browse and lower case keys

Postby nageswaragunupudi » Wed Mar 30, 2022 5:35 pm

GetKeyState( VK_SHIFT ) --> Shift key is pressed
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10248
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Browse and lower case keys

Postby concentra » Wed Mar 30, 2022 6:30 pm

nageswaragunupudi wrote:GetKeyState( VK_SHIFT ) --> Shift key is pressed

Hi.
This does not work when "CAPS LOCK" is turned off and no SHIFT pressed.
Do you know how do I know CAPS LOCK state ?

[[]] Maurício Ventura Faria
User avatar
concentra
 
Posts: 110
Joined: Mon Nov 14, 2005 10:15 am
Location: Brazil

Re: Browse and lower case keys

Postby karinha » Wed Mar 30, 2022 7:13 pm

Maurício:

Code: Select all  Expand view
cKey:= CHR( nKey )


Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7214
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 71 guests