Print Page | Close Window

Removing a Keybinding

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=1962
Printed Date: 24 June 2024 at 9:12am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Removing a Keybinding
Posted By: Spyder
Subject: Removing a Keybinding
Date Posted: 14 March 2005 at 12:55am
I have a scenario where I need to remove a keybinding completely. I'm using CommandBars in an OCX control, and when running from IE any keybindings defined in CommandBars are stolen from the entire browser.

I realise this is the intended behaviour, and is necessary to capture things like alt+f. However, without any way to remove the key bindings, it severely screws up IE!

Is there any way to clear the key bindings? Or can one be created?
This is how it used to work with the previous toolbars I was using, I already have code to disable the shortcuts at the appropriate time - just no way to use that code ;)


I've attached an example showing the problem - note that if you run it from the IDE everything is fine; it's only when run from the compiled OCX that the problem appears.

uploads/Spyder/2005-03-14_004717_accelerator_keys.zip - 2005-03-14_004717_accelerator_keys.zip



Replies:
Posted By: Boyd
Date Posted: 14 March 2005 at 7:20am

In the current release, you can only add KeyBindings.  I've been begging for more developer control over key bindings for over a year, and it's been shelved as a feature request.  Having the ability to only Add a KeyBinding is very limiting.  I've become so frustrated by the limitations in the current model that I'm starting to implement my own handling instead.

I suggest you submit a Feature Request to Codejock for this.  If more people request it, maybe it will get implemented.

Good luck!



Posted By: Spyder
Date Posted: 15 March 2005 at 5:07pm
I submitted it as a bug report and have been told a DeleteAll method is coming


Posted By: Boyd
Date Posted: 15 March 2005 at 8:08pm
That's a good start, but we still need more control.  If you just need to delete one KeyBinding, you're out of luck.  Since you don't know what the other bindings are, you can't even use the DeleteAll and add back the others.


Posted By: SuperMario
Date Posted: 16 March 2005 at 10:59am
You would know about all key bindings because it only deletes the keybindings that you have added with the KeyBindings.Add method.


Posted By: gshawn
Date Posted: 16 March 2005 at 11:51am

Originally posted by SuperMario SuperMario wrote:

You would know about all key bindings because it only deletes the keybindings that you have added with the KeyBindings.Add method.

In this case, isn't the DeleteAll method name a bit misleading?



Posted By: Boyd
Date Posted: 16 March 2005 at 1:39pm

Originally posted by SuperMario SuperMario wrote:

You would know about all key bindings because it only deletes the keybindings that you have added with the KeyBindings.Add method.

Not entirely true.  If you have 'EnabledCustomization' set to 'True' the end-user can add/change/remove KeyBindings.  No events are exposed to let the developer know when this happens.  The moment you allow the user to customize the KeyBindings, the developer looses all control.  That's why I've been begging for a more rhobust implementation of the KeyBindings model.

Currently, there is only an 'Add' method, and you've indicated that a 'DeleteAll' method will be added in v10.  What we really need is full control... like:

KeyBindings Object
Method: Add
Method: DeleteAll
New Property: Count
New Property: Items Collection (of KeyBinding Object)
New Event: BeforeKeyBindingAdd (with Cancel parameter to prevent certain key combinations)
New Event: KeyBindingAdded
New Event: KeyBindingRemoved
New Event: KeyBindingModified

New KeyBinding Object
New Method: Delete
New Property: fVirt (indicates virtual keys)
New Property: key (indicates ASCII key)
New Property: Command (indicates command ID to be executed)

This would empower the developer to have the control they need over KeyBindings.  The current "locked" implementation is extremely difficult to work with when you allow user customization.



Posted By: Marek
Date Posted: 16 March 2005 at 4:14pm

Totally agree with the last post. Those suggested changes look nice.

One of the factors in our decision to move to CodeJock (from Infragistics Toolbars) was the need for improved Shortcut key functionality and customization.We also decided it would be better to switch because Codejock still supports the ActiveX stuff. So if we can get more usable/flexible key binding/shortcut keys, we'll be happy as clams. 

-m



Posted By: kstowell
Date Posted: 21 March 2005 at 1:54pm
We are looking into adding the additional function that was requested, I think it is a great idea. Hopefully we can get this included within the next 2 product releases.

Regards,

Kirk Stowell
Codejock Software


Posted By: Boyd
Date Posted: 21 March 2005 at 9:12pm
That's great news, Kirk.  Thank you for the update!


Posted By: Spyder
Date Posted: 23 March 2005 at 4:58pm
oh grow up, it's not totally unusable. This "problem" has been around for ages apparently, and in most cases it's fine.


Posted By: moskito66
Date Posted: 23 March 2005 at 5:50pm

I was just one click away from buying this component, after one week of intense evaluation with VB6, I grew up and realized that it's just offer switching from one beautiful theme to another. But when it comes to rich client  requirements(complex dialogs and forms) you can't trust this stuff neither in concepts nor in quality. To use this stuff you have to do a lot of workarounds.

This was the second time I evaluate this component, but it's still frustrating at  the end. Keep using it with C++ but don't offer this Version to VB6 !



Posted By: Marek
Date Posted: 06 June 2005 at 4:42pm

Hey folks,

Has anyone heard anything on the status of this issue? I was under the impression that CodeJock would be adding some functionality to the keybindings/customization area, but I haven't heard of or seen anything.

-Mark

 

 



Posted By: SuperMario
Date Posted: 06 June 2005 at 5:25pm
As of right now, nothing new has been added.


Posted By: Spyder
Date Posted: 06 June 2005 at 7:06pm
A "DeleteAll" method has been added to the KeyBindings object and will be in the next release.

I'm using a Beta now, and the only problem is this doesn't cover menu nmemonics.


Posted By: SuperMario
Date Posted: 07 June 2005 at 8:51am
You can also use the KeyBoardCues object.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net