Delphi XE6 Android下捕获功能键


本文整理自网络,侵删。

 在Form的Onkeyup事件中,参数Key,为按键值:
vkMenu:菜单键
vkHardwareBack:back键

更详细的键定义在System.UITypes单元。

procedure TForm1.FormKeyUp(Sender: TObject; var Key: Word;
  var KeyChar: Char; Shift: TShiftState);
begin
  if Key = vkHardwareBack then
  begin
      //这里处理back键的代码
      Key := 0;//处理完后清0.
  end;
  if Key=vkMenu then
  begin
     //处理menu键的代码
     Key:=0;
  end;
end;

相关阅读 >>

Delphi实现网卡状态检测

Delphi idhttp基本使用方法

Delphi 在瑞星2010全保护下创建文件夹

Delphi中url的编码与解码,即urlencode的使用

Delphi jpg文件合并器代码

Delphi程序支持外部参数

Delphi tanimate组件

Delphi memo1文本搜索并高亮

Delphi 覆盖模式处理透明

Delphi idhttpserver使用注意问题

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...