CnPack Forum » CnWizards IDE Wizards » Problem with keyboard

2007-5-7 20:51 Dans
Problem with keyboard


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...

[list][*]Delphi 7[*][b]IDE Classic key mapping[/b][*]Windows XP Proffesional SP2[*]CnPack IDE Wizards, ver Build 2007.04.30[/list]Steps:
[list][*]Create New Application[*]Press [b]Shift+F2 [/b](Save All) Save dilaog appeared. Press cancel.[*]Result: keyboard in editor won't work.[/list]As workaround i press [b]Alt [/b]key and then [b]Esc.[/b] This situation is always reproducible on different computers.
I think problem with some windows hook used in CnWizards.


2007-5-9 09:49 shenloqi
Maybe it is caused by control's focus issue.

2007-5-9 21:36 Passion
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?

2007-5-9 23:07 Dans
Reply #2 shenloqi's post


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 :)
[list][*]MMX[*]GExperts[*]VssConnexion[*]Castalia[*]DelphiSpeedup[/list]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  :handshake


2007-5-11 04:43 Dans
I found problem

Hi again

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

unit: [b]CnWizShortCut.pas [/b]

[font=Courier New]
[b][table=98%][tr][td][color=#000000][size=9pt][b]procedure [/b][/size]TCnWizShortCutMgr.InstallKeyBinding;[/color][size=9pt][color=#000000]
[size=9pt][color=#000000]  [b]if not[/b] IsEmpty [b]then[/b][/color][/size]
[size=9pt][color=#000000]  [b]begin[/b][/color][/size]
[size=9pt][color=#000000]    QuerySvcs(BorlandIDEServices, IOTAKeyboardServices, KeySvcs);[/color][/size]
[size=9pt][color=#000000]    SaveMainMenuShortCuts;[/color][/size]
[size=9pt][color=#000000]    [b]try[/b][/color][/size]
[size=9pt][color=#000000]      [b]try[/b][/color][/size]
[size=9pt][color=#000000]        FKeyBindingIndex := KeySvcs.AddKeyboardBinding(TCnKeyBinding.Create(Self));[/color][/size]
[size=9pt][color=#000000]        [/color][color=red][b]KeySvcs.PushKeyboard(SCnPackKeyboard); [color=blue]// This method must be called only once per session[/color][/b][/color][/size]
[size=9pt][color=red][b][color=blue]        if FPushed then // Add boolean field FPushed[/color][/b][/color][/size]
[size=9pt][color=red][b][color=blue]        begin[/color][/b][/color][/size]
[size=9pt][color=red][b][color=blue][size=9pt][color=blue]          [b]KeySvcs.PushKeyboard(SCnPackKeyboard);[/b][/color][/size]
[size=9pt]          FPushed := True;[/size]
[/color][/b][/color][/size][size=9pt][color=red][b][color=blue]        end;[/color][/b][/color][/size]
[size=9pt][color=#000000]      [b]except[/b][/color][/size]
[size=9pt][color=#000000]        ;[/color][/size]
[size=9pt][color=#000000]      [b]end[/b];[/color][/size]
[size=9pt][color=#000000]    [b]finally[/b][/color][/size]
[size=9pt][color=#000000]      RestoreMainMenuShortCuts;[/color][/size]
[size=9pt][color=#000000]    [b]end[/b];[/color][/size]
[size=9pt][color=#000000]  [b]end[/b];[/color][/size]
Can you fix this?


2007-5-11 12:14 Passion
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.:handshake

2007-5-11 19:41 Dans
Reply #6 Passion's post


Sorry for new bug :loveliness:

if [b]not[/b] FPushed then

BTW, as i saw [b]PushKeyboard[/b] 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,

2007-5-11 20:09 Dans
Reply #6 Passion's post

ALG+G dialog... :)

Yes i it's causes the same problem. But i never give up :victory:
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,

2007-5-12 00:13 Passion
Hard works, three hour deep debug.:victory:

页: [1]
查看完整版本: Problem with keyboard

Powered by Discuz! Archiver 5.0.0  © 2001-2006 Comsenz Inc.