Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Removing a Keybinding
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Removing a Keybinding

 Post Reply Post Reply
Author
Message
Spyder View Drop Down
Newbie
Newbie


Joined: 17 November 2004
Location: Australia
Status: Offline
Points: 29
Post Options Post Options   Thanks (0) Thanks(0)   Quote Spyder Quote  Post ReplyReply Direct Link To This Post Topic: Removing a Keybinding
    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.

2005-03-14_004717_accelerator_keys.zip
Back to Top
Boyd View Drop Down
Senior Member
Senior Member


Joined: 08 December 2003
Location: United States
Status: Offline
Points: 285
Post Options Post Options   Thanks (0) Thanks(0)   Quote Boyd Quote  Post ReplyReply Direct Link To This Post 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!

Back to Top
Spyder View Drop Down
Newbie
Newbie


Joined: 17 November 2004
Location: Australia
Status: Offline
Points: 29
Post Options Post Options   Thanks (0) Thanks(0)   Quote Spyder Quote  Post ReplyReply Direct Link To This Post Posted: 15 March 2005 at 5:07pm
I submitted it as a bug report and have been told a DeleteAll method is coming
Back to Top
Boyd View Drop Down
Senior Member
Senior Member


Joined: 08 December 2003
Location: United States
Status: Offline
Points: 285
Post Options Post Options   Thanks (0) Thanks(0)   Quote Boyd Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
gshawn View Drop Down
Senior Member
Senior Member


Joined: 04 October 2004
Status: Offline
Points: 227
Post Options Post Options   Thanks (0) Thanks(0)   Quote gshawn Quote  Post ReplyReply Direct Link To This Post 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?

Back to Top
Boyd View Drop Down
Senior Member
Senior Member


Joined: 08 December 2003
Location: United States
Status: Offline
Points: 285
Post Options Post Options   Thanks (0) Thanks(0)   Quote Boyd Quote  Post ReplyReply Direct Link To This Post 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.



Edited by Boyd
Back to Top
Marek View Drop Down
Groupie
Groupie


Joined: 02 February 2005
Status: Offline
Points: 20
Post Options Post Options   Thanks (0) Thanks(0)   Quote Marek Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
kstowell View Drop Down
Admin Group
Admin Group


Joined: 25 January 2003
Location: MIchigan, USA
Status: Offline
Points: 496
Post Options Post Options   Thanks (0) Thanks(0)   Quote kstowell Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Boyd View Drop Down
Senior Member
Senior Member


Joined: 08 December 2003
Location: United States
Status: Offline
Points: 285
Post Options Post Options   Thanks (0) Thanks(0)   Quote Boyd Quote  Post ReplyReply Direct Link To This Post Posted: 21 March 2005 at 9:12pm
That's great news, Kirk.  Thank you for the update!
Back to Top
Spyder View Drop Down
Newbie
Newbie


Joined: 17 November 2004
Location: Australia
Status: Offline
Points: 29
Post Options Post Options   Thanks (0) Thanks(0)   Quote Spyder Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
moskito66 View Drop Down
Newbie
Newbie
Avatar

Joined: 20 March 2005
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote moskito66 Quote  Post ReplyReply Direct Link To This Post 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 !

Back to Top
Marek View Drop Down
Groupie
Groupie


Joined: 02 February 2005
Status: Offline
Points: 20
Post Options Post Options   Thanks (0) Thanks(0)   Quote Marek Quote  Post ReplyReply Direct Link To This Post 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

 

 

Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 06 June 2005 at 5:25pm
As of right now, nothing new has been added.
Back to Top
Spyder View Drop Down
Newbie
Newbie


Joined: 17 November 2004
Location: Australia
Status: Offline
Points: 29
Post Options Post Options   Thanks (0) Thanks(0)   Quote Spyder Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 07 June 2005 at 8:51am
You can also use the KeyBoardCues object.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.141 seconds.