Skip to main content
frameexpert
Community Expert
Community Expert
April 12, 2023
Question

Adding Control+/ as a shortcut to a command

  • April 12, 2023
  • 2 replies
  • 280 views

Hi All, I am trying to define a command and add a shortcut to it. I want to use Control+/ but I can't figure out the correct syntax. I tried this, but it didn't work:

cmd = topMenu.DefineAndAddCommand (40, "MyCommandCmd", "My Command", "\^/");

    This topic has been closed for replies.

    2 replies

    K.Daube
    Community Expert
    Community Expert
    April 12, 2023

    Rick, a problem might be that the / is used in command definitions to introduce special keys in wincmds.cfg:

    <Modify DeleteBackToPrevWordEnd <KeySequence ^/BkSp > >

    Might it help by doubling it?

    cmd = topMenu.DefineAndAddCommand (40, "MyCommandCmd", "My Command", "\^//");

     

    Klaus Göbel
    Legend
    April 12, 2023

    Hi Rick,

    try this:

    cmd = topMenu.DefineAndAddCommand (40, "MyCommandCmd", "My Command", "^j"); // j for the key