procedure TForm1.Edit1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState
);
begin
writeln('--------------------------');
writeln('Edit1KeyDown');
end;
procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: char);
begin
writeln('Edit1KeyPress');
// Key := #0;
end;
procedure TForm1.Edit1KeyUp(Sender: TObject; var Key: Word; Shift: TShiftState);
begin
writeln('Edit1KeyUp');
end;
=================================================================
gtk2callback.inc
=================================================================
function GTKKeyPress(Widget: PGtkWidget; Event: pgdkeventkey;
Data: gPointer): GBoolean; cdecl;
begin
debugln(['[GTKKeyPress]', 'Widget:', hexstr(Widget), ' Event:',
hexstr(Event), '|type:', Ord(Event^._type), '|time:', Event^.time,
'|keyval:', Event^.keyval, '|state:', Event^.state, ' Data:', hexstr(Data)]);
Result := HandleGtkKeyUpDown(Widget, Event, Data, True, True, 'key-press-event');
end;
#######################################
debian12
#######################################
[GTKKeyPress]Widget:00000000024D4390 Event:0000000002624AD0|type:8|time:293618|keyval:49|state:16 Data:00007F8312BFF5D0
--------------------------
Edit1KeyDown
Edit1KeyPress
[GTKKeyPress]Widget:00000000025D9060 Event:0000000002624AD0|type:8|time:293618|keyval:49|state:16 Data:00007F8312BEB010
[GTKKeyPress]Widget:00000000024D4390 Event:0000000002624A60|type:8|time:293618|keyval:49|state:16 Data:00007F8312BFF5D0
[GTKKeyPress]Widget:00000000025D9060 Event:0000000002624A60|type:8|time:293618|keyval:49|state:16 Data:00007F8312BEB010
[GTKKeyPress]Widget:00000000024D4390 Event:0000000002635660|type:8|time:293618|keyval:49|state:16 Data:00007F8312BFF5D0
[GTKKeyPress]Widget:00000000025D9060 Event:0000000002635660|type:8|time:293618|keyval:49|state:16 Data:00007F8312BEB010
Edit1KeyUp
#######################################
lubuntu
#######################################
[GTKKeyPress]Widget:0000000001C133A0 Event:0000000001EAB500|type:8|time:542247|keyval:49|state:33554432 Data:00007FF0355675D0
--------------------------
Edit1KeyDown
Edit1KeyPress
[GTKKeyPress]Widget:0000000001DB8070 Event:0000000001EAB500|type:8|time:542247|keyval:49|state:33554432 Data:00007FF035553010
Edit1KeyUp