Recent

Author Topic: IDE improvement, IsEditableTextKey()  (Read 1242 times)

Alextp

  • Hero Member
  • *****
  • Posts: 1332
    • UVviewsoft
IDE improvement, IsEditableTextKey()
« on: July 27, 2021, 10:43:45 pm »
I suggest faster code for LCLProc function:
Code: Pascal  [Select][+][-]
  1. function IsEditableTextKey(Key: Word): Boolean;
  2. begin
  3.   Result := (Ord(Key) <= $FF) and (byte(Key) in [
  4.       VK_A..VK_Z,
  5.       VK_0..VK_9,
  6.       VK_NUMPAD0..VK_DIVIDE,
  7.       VK_OEM_1..VK_OEM_3,
  8.       VK_OEM_4..VK_OEM_7
  9.     ]);
  10. end;  

 

TinyPortal © 2005-2018