为了正常的体验网站,请在浏览器设置里面开启Javascript功能!

如何改变Delphi的快捷键

2013-03-14 3页 pdf 85KB 12阅读

用户头像

is_622030

暂无简介

举报
如何改变Delphi的快捷键 浪曦网-国内顶级 IT 视频网络编程教育平台 Www.LangSin.Com 浪曦网-国内顶级 IT 视频网络编程教育平台 Www.LangSin.Com 如何改变 Delphi 的快捷键 该文档由国内顶级 IT 视频网络编程教育平台整理发布 如果说 Delphi的 IDE有什么优势的话,那么我想就是它本身就是由 Delphi编写而成,因此我们 能定制 Delphi的 IDE环境,通过 Delphi的 ToolsAPI 的 Com 接口。 下面这个例子使用 IOTAKeyboardBinding 接口,实现对快捷键...
如何改变Delphi的快捷键
浪曦网-国内顶级 IT 视频网络编程教育平台 Www.LangSin.Com 浪曦网-国内顶级 IT 视频网络编程教育平台 Www.LangSin.Com 如何改变 Delphi 的快捷键 该文档由国内顶级 IT 视频网络编程教育平台整理发布 如果说 Delphi的 IDE有什么优势的话,那么我想就是它本身就是由 Delphi编写而成,因此我们 能定制 Delphi的 IDE环境,通过 Delphi的 ToolsAPI 的 Com 接口。 下面这个例子使用 IOTAKeyboardBinding 接口,实现对快捷键的重新绑定,相关的接口定义见 ToolsAPI.pas。源码很简单,相信你一看就懂。该例子用来修改与中文环境冲突的 Code Completion 得快捷键,改成 Ctrl+Alt+Shift+P 和 Ctrl+Alt+Shift+O,如果你遇上什么问题,请写信给我。 //EagleBufferList.pas,2002.5.24 { Pan Ying,Zero Studio All Right Reserved. The Demo show how to change Delphi's Key Binding,just in Delphi press Ctrl+Alt+Shift+P to use Code Completion.You can contact me by sending e-mail to me (panying@sina.com) Some code from Delphi's ToolsAPI Demo. Attention: This software is provided 'as-is', without any express or implied warranty. In no event will the author be held liable for any damages arising from the use of this software. This unit is free to use but the origin of this software must not be misrepresented, you must not claim that you wrote the original software. Feel free to use this component in your product including commercial applications. If You alert this component's code to make it better, please remember to tell me about it , let's to make it better together. This attention may not be removed or altered from any source distribution. Feedback: E-Mail: panying@sina.com HomePage:http://myzeroworld.yeah.net 浪曦网-国内顶级 IT 视频网络编程教育平台 Www.LangSin.Com 浪曦网-国内顶级 IT 视频网络编程教育平台 Www.LangSin.Com Version 1.1 Remove some useless code. Version 1.0 Initial Version. } 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)); end; //do code completion procedure TBufferList.CodeCompletion(const Context: IOTAKeyContext; KeyCode: TShortcut; var BindingResult: TKeyBindingResult); begin 浪曦网-国内顶级 IT 视频网络编程教育平台 Www.LangSin.Com 浪曦网-国内顶级 IT 视频网络编程教育平台 Www.LangSin.Com (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.
/
本文档为【如何改变Delphi的快捷键】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。 本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。 网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。

历史搜索

    清空历史搜索