• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Adding Control+/ as a shortcut to a command

Community Expert ,
Apr 12, 2023 Apr 12, 2023

Copy link to clipboard

Copied

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", "\^/");

Views

132

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Apr 12, 2023 Apr 12, 2023

Copy link to clipboard

Copied

Hi Rick,

try this:

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 12, 2023 Apr 12, 2023

Copy link to clipboard

Copied

LATEST

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", "\^//");

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines