Ver Mensaje Individual
  #1  
Antiguo 12-12-2009
Jair Garza Jair Garza is offline
Registrado
 
Registrado: ago 2007
Posts: 5
Reputación: 0
Jair Garza Va por buen camino
TAction obtener Key yShift presionado

Hay alguna manera de saber en el evento execute de un TAction que teclas fueron las que se presionaron ? de manera que pueda extraer un valor Key y un valor Shift para redireccionarlo a un evento KeyDown

Me gustaria fuera algo asi, obiamente ac no tiene esas propiedades

procedure TMiClase.ActionExecute(Sender: TObject);
var
ac:TAction;
begin
ac := nil;
if Sender is TAction then ac := TAction(Sender);

if Assigned(ac) then
begin
FormKeyDown(ac, ac.Key, ac.Shift);
end;

end;


O tratar de decodificar la propiedad Shortcut del TAction

mKey := LeeKey( ac.Shortcut );
mShift := LeeShift( ac.Shortcut );

FormKeyDown(ac, mKey, mShift);




saludos
Responder Con Cita