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

KeyBindings duplicates

 Post Reply Post Reply
Author
Message
chrisABC View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 June 2008
Status: Offline
Points: 258
Post Options Post Options   Thanks (0) Thanks(0)   Quote chrisABC Quote  Post ReplyReply Direct Link To This Post Topic: KeyBindings duplicates
    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
Back to Top
Oleg View Drop Down
Senior Member
Senior Member


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
chrisABC View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 June 2008
Status: Offline
Points: 258
Post Options Post Options   Thanks (0) Thanks(0)   Quote chrisABC Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.

This page was generated in 0.125 seconds.