FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Block Enter Key from Keyboard.
Posts: 27
Joined: Fri Jan 11, 2008 09:58 PM
Block Enter Key from Keyboard.
Posted: Thu Jan 09, 2014 04: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.

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: Block Enter Key from Keyboard.
Posted: Thu Jan 09, 2014 05: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
Posts: 27
Joined: Fri Jan 11, 2008 09:58 PM
Re: Block Enter Key from Keyboard.
Posted: Thu Jan 09, 2014 06: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.

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: Block Enter Key from Keyboard.
Posted: Thu Jan 09, 2014 08:34 PM

Brad,

very good, thanks :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion