INS-less keyboard bindings
Currently, I am using Delphi in a Parallels 10 virtual machine with Microsoft Windows 7 Ultimate on an Apple iMac. This way I have the best of both worlds: the Mac for its ease of use, small desk space and large screen, and Windows for Delphi, XanaNews and some other applications.
But in Delphi, I prefer to use the IDE Classic key mappings, which are mainly based on the old WordStar key shortcuts that the old Turbo Pascal IDEs used to know.
There is however one problem: the Apple keyboard has no key for Ins, and the IDE Classic mappings use the Ctrl+Ins and Shift+Ins keys to copy to or paste from the Windows clipboard, respectively. I got fed up with having to use the context menu or the main menu to do a copy or paste and wrote this little keyboard binding.
It is only a partial keyboard binding, so it won’t replace an entire mapping, it only replaces the following key combinations:
|Ctrl+C||Copy to clipboard|
|Ctrl+X||Cut to clipboard|
|Ctrl+V||Paste from clipboard|
Just because it was possible and easy, and no other key mapping seems to have it, I added the following key combinations:
|Shift+Ctrl+Alt+C||Copy and append to current contents of clipboard|
|Shift+Ctrl+Alt+X||Cut and append to current contents of clipboard|
If you are using Delphi in Parallels, you can use the Configuration dialog of Parallels to define shortcuts for your virtual machine. You can use Cmd+Key shortcuts for the usual operations. Do as follows:
In the virtual machine, select the Parallels items in succession: Actions → Configure → Hardware → Mouse & Keyboard → Shortcuts → Application Shortcuts. Now you can select the shortcuts you want to use in Windows by checking the items in the list:
Just in case you didn’t know this: on the Mac keyboards I know, you can emulate the Ins key — e.g. to toggle between insert and overwrite mode in the Delphi editor — by pressing the key combination fn+Enter. Unfortunately, you can't combine this with any of the Shift, Cmd, Ctrl or Alt/Option keys.
Always make sure the .bpl files are on the system path!
Installation is quite simple, but not automatic. Extract the zip file to a directory of your choice. Start the IDE in which it is to be installed. Navigate to the subdirectory that indicates your version of Delphi, e.g. D2007 for Delphi or RAD Studio 2007.
If your version is not supported, you can simply copy one of the .dpk files to a new subdirectory for your version (e.g.
D2009 for Delphi 2009) and paste the file there. Then you open it and change the version suffix in the Project Options.
You should preferably use one of the suffixes below, for the indicated versions:
|100||Delphi, C++Builder or RAD Studio 2006|
Once you opened the project, you can use the Install context menu option in the project manager to install the expert. Right-click on the project to get the context menu.
The INS-less keyboard bindings expert (inslesskeybindings.zip) is freeware. All rights are reserved. Please read the license in the source code.
Suggestions, remarks, flames, complaints, rewards, donations, etc. can be sent to my e-mail address.
Standard Disclaimer for External Links
These links are being provided as a convenience and for informational purposes only; they do not constitute an endorsement or an approval of any of the products, services or opinions of the corporation or organization or individual. I bear no responsibility for the accuracy, legality or content of the external site or for that of subsequent links. Contact the external site for answers to questions regarding its content.
Disclaimer and Copyright
The coding examples presented here are for illustration purposes only. The author takes no responsibility for end-user use. All content herein is copyrighted by Rudy Velthuis, and may not be reproduced in any form without the author's permission. Source code written by Rudy Velthuis presented as download is subject to the license in the files.