zoukankan      html  css  js  c++  java
  • delphi 修改代码补全的快捷键(由Ctrl+Space 改为 Ctrl + alt + Space)(通过修改OpenTool生效)

    delphi 的IDE快捷键与输入法切换键中突,以往的解决方法是下载一个ImeTool修改 windows 系统的快捷键

    在 xp win7 都好使,但在win 10经常是修改完后,重启又失效了。

    本方法采用 Open Tools API 编写是一个组件。安装方法:

    菜单-->Component -->install Component 然后选择此本单元,然后就瞎折腾吧。就好了。

    源码下载

    unit EagleBufferList;
    
    interface
    
    procedure Register;
    
    implementation
    
    uses Windows, Classes, SysUtils, Menus, ToolsAPI, Controls;
    
    type
      TBufferList = class(TNotifierObject, IUnknown, IOTANotifier, IOTAKeyboardBinding)
        function GetBindingType: TBindingType;
        function GetDisplayName: string;
        function GetName: string;
        //指定快捷键
        procedure BindKeyboard(const BindingServices: IOTAKeyBindingServices);
      protected
        procedure CodeCompletion(const Context: IOTAKeyContext; KeyCode: TShortcut; var BindingResult: TKeyBindingResult);
      end;
    
    resourcestring
      sBufferList = 'Eagle''s Buffer List';
    
      // register this key binding
    procedure Register;
    begin
      (BorlandIDEServices as IOTAKeyBoardServices).AddKeyboardBinding(TBufferList.Create);
    end;
    
    { TBufferList }
    
    // the code to bind key
    procedure TBufferList.BindKeyboard(const BindingServices: IOTAKeyBindingServices);
    begin
      BindingServices.AddKeyBinding([ShortCut(Ord('P'), [ssShift, ssCtrl, ssAlt])], CodeCompletion,
        Pointer(csCodeList or csManual));
      BindingServices.AddKeyBinding([ShortCut(Ord('O'), [ssShift, ssCtrl, ssAlt])], CodeCompletion,
        Pointer(csParamList or csManual));
      BindingServices.AddKeyBinding([ShortCut(Ord(' '), [ssCtrl, ssAlt])], CodeCompletion,
        Pointer(csCodeList or csParamList or csManual));
      { 1,2句是原作者写的
        3句是我加的 把代码补完快捷键 替换为 ctrl + alt + space
      }
    end;
    
    // do code completion
    procedure TBufferList.CodeCompletion(const Context: IOTAKeyContext; KeyCode: TShortcut;
      var BindingResult: TKeyBindingResult);
    begin
    
      (Context.EditBuffer.TopView as IOTAEditActions).CodeCompletion(Byte(Context.Context));
      BindingResult := krHandled;
    
    end;
    
    function TBufferList.GetBindingType: TBindingType;
    begin
      Result := btPartial;
    end;
    
    function TBufferList.GetDisplayName: string;
    begin
      Result := sBufferList;
    end;
    
    function TBufferList.GetName: string;
    begin
      Result := 'EagleKing.BufferList'; // do not localize
    end;
    
    end.
    

    http://www.cnblogs.com/lackey/p/5373761.html

  • 相关阅读:
    微信扫码支付模式一和模式二的区别
    spring boot MongoDB的集成和使用
    Java 8 中的 Streams API 详解
    大并发量的订单的解析
    Springboot项目打成war包,部署到tomcat上,正常启动访问报错404
    最详细的虚拟机安装centos7教程
    nginx限制上传大小和超时时间设置说明/php限制上传大小
    一级域名和二级域名的区别是什么?分别有什么作用?
    快递物流查询接口介绍
    java 使用volatile实现线程数据的共享
  • 原文地址:https://www.cnblogs.com/findumars/p/5648524.html
Copyright © 2011-2022 走看看