title: Ctrl+- (Ctrl+Hyphen-Minus) as ShortCut Key?
body: <p>It might seem natural to use <kbd>Ctrl</kbd> + <kbd>+</kbd>, <kbd>Ctrl</kbd> + <kbd>-</kbd>, and <kbd>Ctrl</kbd> + <kbd>0</kbd> as shortcuts for an application's zoom in, zoom out, and restore default zoom (typically 100 %) actions. Now, in Delphi, I am able to assign <kbd>Ctrl</kbd> + <kbd>+</kbd> and <kbd>Ctrl</kbd> + <kbd>0</kbd> as shortcuts. The former, though, requires that the plus sign of the main part of the keyboard is used; the plus sign of the numerical keypad cannot be used.</p>
  
  <p>Problem arises, however, when I want to assign <kbd>Ctrl</kbd> + <kbd>-</kbd> as a shortcut. It simply doesn't work. If I assign "Ctrl+-" in the IDE, the value stored in the <code>ShortCut</code> property is <code>16495</code>. If we subtract <code>ssCtrl</code> from this, we obtain 111. A work-around, one would believe, would be to assign <code>ShortCut := 45 + ssCtrl</code>, or, equivalently, <code>ShortCut := Menus.ShortCut(45, [ssCtrl])</code>, because <code>ord('-') = 45</code>. But that doesn't work.</p>
  
  <p>However, I have found a working solution: <code>ShortCut := 189 + ssCtrl</code>. I choose 189 because that is the number I receive when I depress the "-" key and listen to the <code>KeyDown</code> event.</p>
  
  <p>So, why am I not happy with this? Well, I am afraid that the constant 189 only is valid on <em>Swedish keyboards</em>. I have tried to read about this, and, as usual, <a href="http://msdn.microsoft.com/en-us/library/ms646340(VS.85).aspx" rel="nofollow noreferrer">the MSDN documentation</a> is rather clear, but then, who knows how Delphi handles things.</p>