Вниз
Скачать: CL | DM;

keydown   Найти похожие ветки 

 
kex86 ©   (2002-12-02 14:14) [0]

Расскажите, пжлста, научно-популярно, как отлавливить все нажатия клавиш в системе консольной программой.


 
Song ©   (2002-12-02 14:16) [1]

SetWindowsHookEx()


 
kex86 ©   (2002-12-02 14:19) [2]

А еще более научно-популярно?
Какие параметры и что возвращает?


 
Song ©   (2002-12-02 14:20) [3]

Статью "Хуки. Аспекты реализации" смотри.


 
kex86 ©   (2002-12-02 14:30) [4]

Это где? адрес дайте, а то там много статей


 
Song ©   (2002-12-02 14:33) [5]

Вверху ссылочка "Поиск". Набираешь "хук", выбираешь поиск в статьях и ищешь. Ну что всем как детям всё объяснять надо??


 
kex86 ©   (2002-12-02 14:35) [6]

Дык я и есть деть


 
asmith   (2002-12-02 15:47) [7]

Использовать функции консольного ввода-вывода такие, как ReadConsoleInput. Вот небольшой пример:

{$APPTYPE CONSOLE}
program ConsoleInput;

uses
Windows;

var
hInput: THandle;
arrInputRecs: array[0..9] of TInputRecord;
dwCur, dwCount: DWORD;
cCur: Char;
coorCur: TCoord;
begin
hInput := GetStdHandle(STD_INPUT_HANDLE);
while True do
begin
ReadConsoleInput(hInput, arrInputRecs[0], 10, dwCount);
for dwCur := 0 to dwCount - 1 do
case arrInputRecs[dwCur].EventType of
KEY_EVENT: with arrInputRecs[dwCur].Event.KeyEvent do
begin
cCur := AsciiChar;
if cCur = "" then
if bKeyDown then
WriteLn("Unprintable key pressed.")
else
Writeln("Unprintable key released.")
else
if bKeyDown then
WriteLn("Pressed ",cCur," ",wRepeatCount," times.")
else
WriteLn("Released ", cCur, " key.");
end;

{*** Delphi has renamed MOUSE_EVENT to avoid a conflict ***}
{*** with a windows function mouse_event() ***}
_MOUSE_EVENT: with arrInputRecs[dwCur].Event.MouseEvent do
begin
coorCur := dwMousePosition;
if dwEventFlags = 0 then
WriteLn("Button Pressed at ",coorCur.X,",",coorCur.Y);
end;
end;
end;
end.



Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.46 MB
Время: 0.011 c
1-36127
Grrey
2002-12-03 11:50
2002.12.12
Сознание компонента. Похоже глюк делфи.


1-36250
Alex_Y
2002-11-27 13:05
2002.12.12
Excel формат файла


7-36431
matrixxxx
2002-10-12 00:00
2002.12.12
Есть документ word как его интегрировать в свою программу, или


3-36050
ruslan_as
2002-11-25 17:34
2002.12.12
Порядок связывания таблиц


1-36272
Kreo
2002-12-02 15:20
2002.12.12
LMD Tools - StringList ?




   Наверх