Author Topic: Programmatically enable/disable Browse mode in INPUT proc  (Read 1692 times)

0 Members and 1 Guest are viewing this topic.

nchalkias

  • Member
  • Posts: 4
    • View Profile
Programmatically enable/disable Browse mode in INPUT proc
« on: March 12, 2007, 06:47:26 PM »
I would like to programmatically toggle the "Browse mode" based the @keyB event.
Any ideas would be appreciated.
I tried to use the PUSHKEY "b";END inside @keyB and it loops forever.

Thanks.

kenbrody

  • Administrator
  • Posts: 82
    • View Profile
Re: Programmatically enable/disable Browse mode in INPUT proc
« Reply #1 on: March 13, 2007, 09:31:43 AM »
I tried to use the PUSHKEY "b";END inside @keyB and it loops forever.
The reason it loops forever is that the PUSHKEY "B" causes the @keyB event to be triggered again.

With filePro 5.6, there is a new command DOKEY which would cause filePro to do the default action on the key, regardless of any @key associated with it.

However, with 5.0, the only practical way of doing this is to use @ENTSEL to handle the keystrokes.  If you want filePro to handle it for you, use PUSHKEY to push it back into the buffer and then END.  For those keystrokes you want to handle as special-case, you can handle it within the @ENTSEL event.

For browse, simply PUSHKEY "B" if you want filePro to go to browse mode, or skip the PUSHKEY when you don't.  Don't include any @keyB event, and filePro will go into browse if you pushed the "B" keystroke.

I have seen other methods which include CHAINing to a processing table that has no @keyB event, so filePro will go into browse, and then CHAINing back to the "real" processing when needed.
Kenneth Brody
aka "Mr. filePro"  :-)

nchalkias

  • Member
  • Posts: 4
    • View Profile
Re: Programmatically enable/disable Browse mode in INPUT proc
« Reply #2 on: March 13, 2007, 09:54:13 AM »
I will try it and let you know.
Thanks for your help
Nick