Solved

How can I make my own Keyboard shortcut?

Posted on 2009-04-01
9
1,258 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
Independent Software Vendors: 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
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…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

740 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