Этот баннер — требование Роскомнадзора для исполнения 152 ФЗ.
«На сайте осуществляется обработка файлов cookie, необходимых для работы сайта, а также для анализа использования сайта и улучшения предоставляемых сервисов с использованием метрической программы Яндекс.Метрика. Продолжая использовать сайт, вы даёте согласие с использованием данных технологий».
Политика конфиденциальности
|
|
|
Как отличить нажатие Enter на основной и на малой клавиатуре?
|
|||
|---|---|---|---|
|
#18+
? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 04.12.2003, 17:16 |
|
||
|
Как отличить нажатие Enter на основной и на малой клавиатуре?
|
|||
|---|---|---|---|
|
#18+
Поищи в Msg.LParamHi в обработчике procedure WMKEYDOWN (var Msg: Tmessage); message WM_KEYDOWN; ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 04.12.2003, 17:49 |
|
||
|
Как отличить нажатие Enter на основной и на малой клавиатуре?
|
|||
|---|---|---|---|
|
#18+
Ура! Нашел: An application may find it useful to differentiate between the user pressing the ENTER key on the standard keyboard and the ENTER key on the numeric keypad. Either action creates a WM_KEYDOWN message and a WM_KEYUP message with wParam set to the virtual key code VK_RETURN. When the application passes these messages to TranslateMessage, the application receives a WM_CHAR message with wParam set to the corresponding ASCII code 13. To differentiate between the two ENTER keys, test bit 24 of lParam sent with the three messages listed above. Bit 24 is set to 1 if the key is an extended key; otherwise, bit 24 is set to 0 (zero). The contents of lParam for these messages is documented in the "Microsoft Windows Software Development Kit Reference Volume 1" for version 3.0 of the SDK and in the SDK Reference Volume 3, "Messages, Structures, and Macros." Because the keys in the numeric keypad (along with the function keys) are extended keys, pressing ENTER on the numeric keypad results in bit 24 of lParam being set, while pressing the ENTER key on the standard keyboard results in bit 24 clear. The following code sample demonstrates differentiating between these two ENTER keys: case WM_KEYDOWN: if (wParam == VK_RETURN) // ENTER pressed if (lParam & 0x1000000L) // Test bit 24 of lParam { // ENTER on numeric keypad } else { // ENTER on the standard keyboard } break; ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 04.12.2003, 17:49 |
|
||
|
|

start [/forum/topic.php?fid=58&fpage=1976&tid=2115594]: |
0ms |
get settings: |
8ms |
get forum list: |
15ms |
check forum access: |
3ms |
check topic access: |
3ms |
track hit: |
38ms |
get topic data: |
9ms |
get forum data: |
3ms |
get page messages: |
31ms |
get tp. blocked users: |
1ms |
| others: | 222ms |
| total: | 333ms |

| 0 / 0 |
