How to use NumPad1/2/... keys? lazarus / 31-LCL ---------------------------------------------------------------------- AlexTP · 2015-03-28 19:09 I cannot see way to use NUM keys for Menus: cannot set Num+, Num- for menu items. How to do it? TextToShortcut('Num1') also bad? ---------------------------------------------------------------------- typo · 2015-03-28 19:21 In fact, if you set minus signal as an ampersand char in a menu, it is activated by the minus signal, no matter it is on normal keyboard or num pad. The same occurs with numbers and other chars. ---------------------------------------------------------------------- AlexTP · 2015-03-28 20:07 It's not ok--need usage of Ctrl+NumPlus, Ctrl+NumMinus, how to set.. ---------------------------------------------------------------------- typo · 2015-03-28 20:33 On Windows unit you have: Code: [Select]     VK_NUMPAD0 = 96;      VK_NUMPAD1 = 97;      VK_NUMPAD2 = 98;      VK_NUMPAD3 = 99;      VK_NUMPAD4 = 100;      VK_NUMPAD5 = 101;      VK_NUMPAD6 = 102;      VK_NUMPAD7 = 103;      VK_NUMPAD8 = 104;      VK_NUMPAD9 = 105;      VK_MULTIPLY = 106;      VK_ADD = 107;      VK_SEPARATOR = 108;      VK_SUBTRACT = 109;      VK_DECIMAL = 110;      VK_DIVIDE = 111;  which you can use in FormKeyDown event handler, for instance. Code: [Select]  if (ssCtrl in Shift) and (Key = ???) then; ---------------------------------------------------------------------- AlexTP · 2015-03-28 20:38 good; can I have better code? I want text ini file with keys: eg [key] CommandSome=Ctrl+Shift+A i read it via TextToShortcut(). this way I cannot setup Num keys, via ini file? ---------------------------------------------------------------------- typo · 2015-03-28 20:41 You can write in your menu that Ctrl+NumPadPlus makes something as a menu item, for instance. And you can load if from an ini file, for instance. File ------------------------------ Open         Ctrl+NumPadPlus ---------------------------------------------------------------------- AlexTP · 2015-03-28 20:45 no, I cannot as TShortcut cannot get texttoshortrcut('Ctrl+Num+') ---------------------------------------------------------------------- typo · 2015-03-28 21:01 TextToShortCut function is declared on LCLProc unit. ---------------------------------------------------------------------- AlexTP · 2015-03-28 21:17 I know. Prob is "TextToShortcut('Num+')" is 0 I try to make patch ---------------------------------------------------------------------- AlexTP · 2015-03-28 22:08 patch MADE. ---------------------------------------------------------------------- typo · 2015-03-29 11:01 If you set ShortCut as 16491, it is OK.