Solved

How can I make my own Keyboard shortcut?

Posted on 2009-04-01
9
1,254 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 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
 

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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delphi XE2 application frozen on Windows 10 10 278
FMX StringGrid1->Canvas->FillRect Problem 3 129
HTML text in the body of an email (delphi code) 12 96
creating threads in delphi 1 84
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

863 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

20 Experts available now in Live!

Get 1:1 Help Now