Board logo

Subject: Problem with keyboard [Print This Page]

Author: Dans    Time: 2007-5-7 20:51     Subject: Problem with keyboard

Hi,

Thanks for great IDE tools. I use them very often. But there one thing that anoying me every day.

Problem is introduced only after installing CnWizards. After disabling expert all works fine again...

Environment:
Steps:
As workaround i press Alt key and then Esc. This situation is always reproducible on different computers.
I think problem with some windows hook used in CnWizards.

TIA,
Dans
Author: shenloqi    Time: 2007-5-9 09:49

Maybe it is caused by control's focus issue.
Author: Passion    Time: 2007-5-9 21:36

May I ask when you press SHIFT+F2? In editor or Form Designer?

If Editor, it will call our Input Helper's hotkey to enable/disable auto-popup. Not save all.

If in Form it will call save all. and if we press cancel and click editor to edit source, all works fine in my workstation. No keys blocked.

I don't know how to reproduce the problem.
Did you install other wizards?
Author: Dans    Time: 2007-5-9 23:07     Subject: Reply #2 shenloqi's post

Hi,

I pressed Shift+F2 in Editor. Sometimes keyboard won't work for other shortcuts, but before problem always present ModalDialog.
Yes, i have many experts
I disabled all of them - this is first thing that i did during searching wich expert causes this situation.
Ok, i'll try to debug your sources and tell about results. Nice if you will have time to fix  

TIA,
Dans
Author: Dans    Time: 2007-5-11 04:43     Subject: I found problem

Hi again

I found what causes problem:
Three hours of deep debugging... damn it.

unit: CnWizShortCut.pas


procedure TCnWizShortCutMgr.InstallKeyBinding;
...

  if not IsEmpty then
  begin
    QuerySvcs(BorlandIDEServices, IOTAKeyboardServices, KeySvcs);
    SaveMainMenuShortCuts;
    try
      try
        FKeyBindingIndex := KeySvcs.AddKeyboardBinding(TCnKeyBinding.Create(Self));
        KeySvcs.PushKeyboard(SCnPackKeyboard); // This method must be called only once per session

        if FPushed then // Add boolean field FPushed
        begin
          KeySvcs.PushKeyboard(SCnPackKeyboard);
          FPushed := True;
        end;
      except
        ;
      end;
    finally
      RestoreMainMenuShortCuts;
    end;
  end;
end;



Can you fix this?

Thanks,
Dans
Author: Passion    Time: 2007-5-11 12:14

Good!
Much Thanks for your professional debugging skills! It fixed not only your problem, but also our another problem of keyboard not working after ALG+G dialog, which aannoy us for a long time.

You'll in our credits list.
Author: Dans    Time: 2007-5-11 19:41     Subject: Reply #6 Passion's post

Hi,

Sorry for new bug

if not FPushed then

BTW, as i saw PushKeyboard is not used in GExperts and other experts. What is the meaning of using this function?
Pair function PopKeyboard does'nt resolves problem.

Best regards,
Dans
Author: Dans    Time: 2007-5-11 20:09     Subject: Reply #6 Passion's post

ALG+G dialog...

Yes i it's causes the same problem. But i never give up
I tried everything, debug your hooks, ApplicationMessage, Trap Messages, test many supposition. But all without results.
Then i start commenting your DPR file (binary) and found unit that causes problem, then comment half of unit, debug, debug...

Best regards,
Dans
Author: Passion    Time: 2007-5-12 00:13

Hard works, three hour deep debug.




Welcome to CnPack Forum (http://bbs.cnpack.org/) Powered by Discuz! 5.0.0