Print Page | Close Window

KeyBindings duplicates

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=13152
Printed Date: 17 June 2025 at 11:00am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: KeyBindings duplicates
Posted By: chrisABC
Subject: KeyBindings duplicates
Date Posted: 12 January 2009 at 2:31pm
(SOLVED) I am using KeyBindings with a RibbonBar.

This works OK:
      CommandBars.KeyBindings.AddShortcut ID_ONE, "Alt+K"
      CommandBars.KeyBindings.AddShortcut ID_ONE, "Esc"

ie. either ESC or ALT+K  can be used. Both work.



But this does not work:
      CommandBars.KeyBindings.AddShortcut ID_ONE, "Alt+K"
      CommandBars.KeyBindings.AddShortcut ID_TWO, "Alt+K"

ie. when ALT+K used it calls ID_ONE only. (I expected the second line would overwite the ALT+K and change it to ID_TWO).

This is a problem to me because I have many Tabs and need to re-use some shortcut keys. So I hide one Tab (with ID_ONE button on it) and then show a different Tab (with button ID_TWO on it) and I also want to set KeyBinding ALT+K  to activate ID_TWO.

If I know ALT+K was previously used by ID_ONE then I can use
     CommandBars.KeyBindings.Delete ID_ONE
But if I do not know which control(s) have used ALT+K in the past, how can I find this?
eg.  is there something like...  .KeyBindings.Delete , "Alt+K"  ??

Or must I use   .DeleteAll
Or else keep my own list of ShortCut keys used?



In other words, is there a way to find which control ID uses  "Alt+K" ?

ANSWER -- No. Not possible.


-------------
Chris (Manchester, UK) -- www.abc6.co.uk ---- Using CodeJock ActiveX Suite 13.1.0 with Windows8, VB6 SP6



Replies:
Posted By: Oleg
Date Posted: 13 January 2009 at 6:29am
Think its not friendly for uesr to use different Commands for same Keyboard shortcuts when different Tabs selected.
Anyway seems only your internal Array can help here :(

-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: chrisABC
Date Posted: 13 January 2009 at 2:21pm
OK, thanks.

-------------
Chris (Manchester, UK) -- www.abc6.co.uk ---- Using CodeJock ActiveX Suite 13.1.0 with Windows8, VB6 SP6



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