title: How are Ctrl + Key shortcuts translated in the OnKeyPress event?
body: <p>I was trying to detect <kbd>Ctrl</kbd>+<kbd>V</kbd> from a <code>TEdit</code>'s <code>OnKeyPress</code> event and I've noticed that the <code>Key</code> parameter assumes an unusual value when pressing <kbd>Ctrl</kbd>+<kbd>AnyKey</kbd>.</p>
  
  <p><strong>Example:</strong></p>
  
  <pre><code>procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char);
  begin
    ShowMessage(IntToStr(Ord(Key)));
  end;
  </code></pre>
  
  <p>It produces the following results:</p>
  
  <ul>
  <li><kbd>Ctrl</kbd>+<kbd>Q</kbd> 17</li>
  <li><kbd>Ctrl</kbd>+<kbd>W</kbd> 23</li>
  <li><kbd>Ctrl</kbd>+<kbd>E</kbd> 5</li>
  <li><kbd>Ctrl</kbd>+<kbd>R</kbd> 18</li>
  <li>...</li>
  <li><kbd>Ctrl</kbd>+<kbd>A</kbd> 1</li>
  <li><kbd>Ctrl</kbd>+<kbd>Z</kbd> 26</li>
  <li><kbd>Ctrl</kbd>+<kbd>C</kbd> 3</li>
  <li><kbd>Ctrl</kbd>+<kbd>V</kbd> 22</li>
  <li><kbd>Ctrl</kbd>+<kbd>X</kbd> 24</li>
  </ul>
  
  <p>I don't understand how keys are translated, what does these codes mean?</p>
  
  <p>It seems it has nothing to do with the <a href="https://www.asciitable.com/" rel="nofollow noreferrer">ASCII table</a>:</p>
  
  <p><a href="https://i.stack.imgur.com/8RgTs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8RgTs.png" alt="enter image description here"></a></p>
  
  <p>Could anyone shed some light on this?</p>