Block Enter Key from Keyboard.

Block Enter Key from Keyboard.

Postby bradmaudlin » Thu Jan 09, 2014 4:21 pm

Hello,
I am trying to block the ENTER Key from "Clicking" buttons.
I have a touch screen (Point of Sale) application with about 45 buttons on the screen using TSBUTTONs. If the ENTER Key is pressed on the keyboard it activates the last button that had been pressed. I've been playing with SETFOCUS() but still can not get it to block the enter key. The Dialog is from a RESOURCE, is there anything in it I could do to block it.
I now need some expert help to solve my problem. The code is simple here is an example.

REDEFINE SBUTTON oBtnBmp ID m_ButtonLoop OF oMainDlg ;
FILE m_KeyBmp ;
ACTION( ProcessKey( &buttonmac, &plubuttonmac ) ) ;
prompt m_KeyDesc ;
TEXT ON_CENTER ;
FONT oButtonFont update ;
NOBORDER COLOR m_TextColor, CLR_BLACK

.....

Function ProcessKey(TheKey, ThePLU)

Do Case
..... Processes each button that was pressed
EndCase

Return

Thanks.
bradmaudlin
 
Posts: 27
Joined: Fri Jan 11, 2008 9:58 pm
Location: St Joe, MO

Re: Block Enter Key from Keyboard.

Postby Antonio Linares » Thu Jan 09, 2014 5:46 pm

Brad,

What TSBUTTON version are you using ?

If you have its source code, please post it here so we can tell you how to modify it, thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41396
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Block Enter Key from Keyboard.

Postby bradmaudlin » Thu Jan 09, 2014 6:59 pm

Antonio,

Thanks for the quick response. I didn't think to look in the TSBUTTON lib.
I tracked it down and commented out the KeyDown() Carriage Return code, re-compiled the lib and it is now acting the way I would like.

Again, thanks for a GREAT produce and GREAT support.
bradmaudlin
 
Posts: 27
Joined: Fri Jan 11, 2008 9:58 pm
Location: St Joe, MO

Re: Block Enter Key from Keyboard.

Postby Antonio Linares » Thu Jan 09, 2014 8:34 pm

Brad,

very good, thanks :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41396
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Eroni, Horizon and 32 guests