Solved

How can I make my own Keyboard shortcut?

Posted on 2009-04-01
9
1,260 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
9 Comments
 
LVL 37

Expert Comment

by:Geert Gruwez
ID: 24047072
change the editor options EditorSpeedsettings to Visual Studio Emulation
0
 

Author Comment

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

Myles
0
 
LVL 37

Expert Comment

by:Geert Gruwez
ID: 24054254
did you check the keyboard emulations ?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:myleseven
ID: 24055843
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
 
LVL 37

Expert Comment

by:Geert Gruwez
ID: 24056726
that's funny, my tabbing works fine
i'll post my settings later on
0
 
LVL 37

Expert Comment

by:Geert Gruwez
ID: 24057074
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 37

Accepted Solution

by:
Geert Gruwez earned 25 total points
ID: 24057114
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
ID: 24064409
http://andy.jgknet.de/blog/?page_id=10 can do exactly what you want.
0
 

Author Closing Comment

by:myleseven
ID: 31565631
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

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

705 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