Evg666 Код (Text): ... __EVENT UNION KeyEvent KEY_EVENT_RECORD <> MouseEvent MOUSE_EVENT_RECORD <> WindowBufferSizeEvent WINDOW_BUFFER_SIZE_RECORD <> MenuEvent MENU_EVENT_RECORD <> FocusEvent FOCUS_EVENT_RECORD <> __EVENT ENDS INPUT_RECORD STRUC EventType WORD ? WORD ? ; __alignmentDummy Event __EVENT <> INPUT_RECORD ENDS ... local ir : INPUT_RECORD local NumOfEvents : dword local NumOfEventsRead : dword ... invoke GetStdHandle, STD_INPUT_HANDLE mov esi,eax .while 1 invoke WaitForSingleObject, esi, INFINITE .if eax == WAIT_FAILED ... jmp @@exit .endif invoke GetNumberOfConsoleInputEvents, esi, addr NumOfEvents .if eax == FALSE ... jmp @@exit .endif xor ebx,ebx .while ebx < NumOfEvents invoke ReadConsoleInput, esi, addr ir, 1, addr NumOfEventsRead .if eax == FALSE ... jmp @@exit .endif .if NumOfEventsRead == 1 .if (ir.EventType == KEY_EVENT) && \ (ir.Event.KeyEvent.bKeyDown == TRUE) !!! .endif .endif ...