Solved

How can I make my own Keyboard shortcut?

Posted on 2009-04-01
9
1,250 Views
Last Modified: 2012-05-06
hi there,
In Visual Studio you can select code and then press the 'TAB' key to indent it.
However in Delphi to do the same process you need to use 'CNTRL' + 'SHIFT' + 'U'.
I would like to change it so that I can use the 'TAB' Key.
How can I do this?
cheers
Myles
0
Comment
Question by:myleseven
  • 5
  • 3
9 Comments
 
LVL 36

Expert Comment

by:Geert Gruwez
Comment Utility
change the editor options EditorSpeedsettings to Visual Studio Emulation
0
 

Author Comment

by:myleseven
Comment Utility
Thanks for your suggestion Geert, but this didn't seem to work for me.
I am running Delphi 6.
Cheers

Myles
0
 
LVL 36

Expert Comment

by:Geert Gruwez
Comment Utility
did you check the keyboard emulations ?
0
 

Author Comment

by:myleseven
Comment Utility
When I changed the keyboard emulations to Visual Studio there was some changes. For example the keyboard shortcuts for debugging changed from f8 and f7 to f10 and f11 as they would be in visual studio. however if I highlighted text and pushed the 'TAB' key it deleted the text instead of 'tabbing' it across the page.
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 36

Expert Comment

by:Geert Gruwez
Comment Utility
that's funny, my tabbing works fine
i'll post my settings later on
0
 
LVL 36

Expert Comment

by:Geert Gruwez
Comment Utility
if you want to have your own customization you'll have to write a Delphi Expert/Wizard
This is a lot of work and the code is not very well documented, next to that it undergoes some changes

what i did find was www.gexperts.org

i wrote some changes on that once to add a Ctrl-Alt-+ and Ctrl-Alt-- to change the current notebook page the current component is on
If your interested in this code, that i can give.
you could then adapt it to use a other shortcut key, this way you could create your own shortcut keys ...
0
 
LVL 36

Accepted Solution

by:
Geert Gruwez earned 25 total points
Comment Utility
it also looks like you'll have to create your own key mappings:

Key mapping modules

Enables you to quickly switch key bindings.

Mapping      Effect

Default      Uses key bindings that match CUA mappings (default).
IDE classic      Uses key bindings that match Borland Classic editor keystrokes.
BRIEF emulation      Uses key bindings that emulate most of the standard Brief keystrokes.
Epsilon emulation      Uses key bindings that emulate a large part of the Epsilon editor.
Visual Studio emulation      Uses key bindings that emulate a large part of the Visual Studio editor.

Visual Basic emulation      Uses key bindings that emulate a large part of the Visual Basic editor.

New IDE Emacs      Uses key bindings that emulate much of the Emacs editor.

Note: The New IDE Classic is provided as an example only.

Enhancement modules

Enhancement modules are special packages that are installed and registered and use the keyboard binding features that can be developed using the Open Tools API. You can create enhancement modules that contain new keystrokes or apply new operations to existing keystrokes. For details on the Open Tools API, see Extending the IDE.

Once installed, the enhancement modules become visible in the Enhancement modules list box. Clicking the check box next to the enhancement module enables it and unchecking it disables it. Key mapping defined in an installed and enabled enhancement module overrides any existing key mapping defined for that key in the key mapping module which is currently in effect.

Here are some links on this subject:
http://xpro.com.au/Presentations/OpenToolsAPI/Plug-in,%20Switch%20On,%20Fall%20Over%20-%20Adventures%20with%20the%20Open%20Tools%20API.htm
http://www.gexperts.org/opentools/
dutch: http://www.nldelphi.com/cgi-bin/articles.exe/ShowArticle?ID=7257
0
 
LVL 19

Assisted Solution

by:MerijnB
MerijnB earned 25 total points
Comment Utility
http://andy.jgknet.de/blog/?page_id=10 can do exactly what you want.
0
 

Author Closing Comment

by:myleseven
Comment Utility
Hi thanks Geert for all your ehlp. I don't really want to go to all that trouble just to build a keyboard shortcut but I appreciatte all the advice you gave me.
The dev tool that MerjinB pointed me to ended up solving my problem straight away.
I have given you both points for your help.
Thanks alot.
myles
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now