Fórum como interceptar o pressionamento das teclas ctrl+SHIFT+F10 ? #441610
01/05/2013
0
Olá bom dia!
Desejaria sabe como interceptar o pressionamento das teclas:
Sei que CTRL+F10 é assim: If ((Shift = [ssCtrl]) and (key = vk_F10)) THEN
mas e estas?
CTRL+SHIFT+F10, CTRL+SHIFT+E, CTRL+SHIFT+*
Desde já meus agradecimentos,
ANT.CARLOS/SP
Desejaria sabe como interceptar o pressionamento das teclas:
Sei que CTRL+F10 é assim: If ((Shift = [ssCtrl]) and (key = vk_F10)) THEN
mas e estas?
CTRL+SHIFT+F10, CTRL+SHIFT+E, CTRL+SHIFT+*
Desde já meus agradecimentos,
ANT.CARLOS/SP
Antonio Jesus
Curtir tópico
+ 0
Responder
Posts
03/05/2013
Wilson Oliveira
No evento keydown do form coloque o seguinte código:
abcs
procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if Shift = [ssalt, ssCtrl] then
begin
if key = ord('C') then showmessage('Apertou ctrl + alt + c');
end;
end;abcs
Responder
Gostei + 0
03/05/2013
Bruno Leandro
outra forma de fazer seria
procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
If ((GetKeyState(VK_CONTROL) AND 128)=128) and
((GetKeyState(VK_F5) AND 128)=128) and
((GetKeyState(ord('8')) AND 128)=128)
then
ShowMessage('CTRL+F5+8 Pressionado');
end;
a tabela de vk voce pode pesquisar em
http://delphi.about.com/od/objectpascalide/l/blvkc.htm
procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
If ((GetKeyState(VK_CONTROL) AND 128)=128) and
((GetKeyState(VK_F5) AND 128)=128) and
((GetKeyState(ord('8')) AND 128)=128)
then
ShowMessage('CTRL+F5+8 Pressionado');
end;
a tabela de vk voce pode pesquisar em
http://delphi.about.com/od/objectpascalide/l/blvkc.htm
Responder
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)