Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - C# KeyBindings with special characters
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

C# KeyBindings with special characters

 Post Reply Post Reply
Author
Message
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 Topic: C# KeyBindings with special characters
    Posted: 27 April 2005 at 12:44pm

I'm trying to use the "Ctrl+]" shortcut in CommandBars within a C# application.  I was able to do this in Visual Basic 6, but cannot get CommandBars to recognize the KeyBinding from within C#.

I've tried the following:

const int FCONTROL = 8;
const int VK_OEM_6 = 0xDD; // ]} key on US keyboards
commandBars.KeyBindings.Add(FCONTROL, ']', ID_OF_COMMAND);
commandBars.KeyBindings.Add(FCONTROL, VK_OEM_6, ID_OF_COMMAND);

and neither of these statements work.  What integer value do I need to pass to represent the ']' key?  Thanks in advance.



Edited by Boyd
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: 03 May 2005 at 7:58am
It turns out that this does work (using 0xDD, not ']').  I was just loading my previous CommandBars state, and it wiped out my new settings.
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.109 seconds.