title: Use Ctrl+/ as shortcut in Delphi program
body: <p>Is this even possible? Notepad++ for example does it, but simply trying to assign it to components like actions or menu items doesn't work. The event it is assigned to simply doesn't trigger.</p>
  
  <p>So, I took my question to Google. Nada. Then, I tried stepping through the various shortcut functions, in this case TextToShortCut and ShortCutToText.</p>
  
  <p>The first one, TextToShortCut, converts stuff like 'Ctrl+A' (a string) to the following 16bit value:</p>
  
  <pre><code>(uint)A | (uint)Ctrl
  </code></pre>
  
  <p>Works fine, mostly. However, I observed the following weirdness:</p>
  
  <pre><code>// Try converting back and forward...
  TextToShortCut('Ctrl+/') = 16495
  
  // That's incorrect. It should be:
  Ord('/') or scCtrl = 16431
  
  // Incorrect too
  ShortCutToText(16495) = 'Ctrl+/'
  
  // This is the shortcut the first line actually creates (Ctrl+o)
  Ord('o') or scCtrl = 16495 // wut?
  
  // Which is invalid, cause only caps are used
  ShortCutToText(16431) = ''
  </code></pre>
  
  <p>What's going on here? For now, I believe the error lies in the final part of TextToShortCut: after handling the part before the + sign ("Ctrl" in this case), it will try to find a shortcut for the remaining part ("/"). <strong>However, in its current form the part after + must be a valid shortcut on its own too.</strong></p>
  
  <pre><code>for Key := $08 to $255 do { Copy range from table in ShortCutToText }
    if AnsiCompareText(Text, ShortCutToText(Key)) = 0 then
    begin
      Result := Key or Shift;
      Exit;
    end;
  </code></pre>
  
  <p>So, because:</p>
  
  <pre><code>ShortCutToText('/') = 0 (failure)
  MapVirtualKey('/',MAPVK_VK_TO_VSC) = 0 (failure)
  </code></pre>
  
  <p>... the loop fails to detect '/' as a valid shortcut.</p>
  
  <p>Is this some VCL bug or am I missing something?</p>
  
  <p>Here's a proof of concept (yes, I'm taking screenshots of code, but mashing this together with the Component Palette is faster than using this code directly):</p>
  
  <p><strong>Edit 1:</strong></p>
  
  <p><img src="https://i.stack.imgur.com/edLso.png" alt="enter image description here"></p>
  
  <p><strong>Edit 2:</strong></p>
  
  <p>Manually assigning 16431 to the menu item does not work.</p>