Wednesday, August 11, 2010

Improvements to Quick Drop Keyboard Shortcuts in LabVIEW 2010

About a year ago, I posted about how you can write your own Quick Drop Keyboard Shortcuts in LabVIEW 2009. Now we've got LabVIEW 2010, and along with it, some enhancements to the Quick Drop Keyboard Shortcut framework. Those enhancements are as follows:
  • Backwards Compatibility - Any shortcuts you wrote in LabVIEW 2009 should port over to LabVIEW 2010 without any issues.

  • Improved Template - The QDKS template is in the same location (resource\dialog\QuickDrop\QuickDrop Plugin, but it has many enhancements over the 2009 version:

    • LOTS more documentation describing plugin functionality
    • Code that creates an Undo transaction for your shortcut, along with logic for determining if the transaction needs to be committed (i.e. you changed something) or discarded (you didn't change anything)

  • Shared Shortcut Location - In addition to the LabVIEW-specific plugin folder where you can store your QDKS VIs (resource\dialog\QuickDrop\plugins), there is also now a shared location. If you put any QDKS plugin VIs in [LabVIEW Data]\Quick Drop Plugins, they will be available in all versions of LabVIEW on your machine (2010 and later).

  • More information from Quick Drop - The variant input to your QDKS VI will provide you with the following information:

    • A boolean indicating whether or not Quick Drop was launched from a VI panel or diagram
    • A string indicating the palette object name that was auto-completed in Quick Drop when you launched your shortcut
    • A path indicating the project item path that was auto-completed in Quick Drop when you launched your shortcut

  • Configurable Shortcut Keys - QDKS VIs in LabVIEW 2009 were named for their shortcut keys...for example, the Remove and Rewire shortcut VI was named "", because its shortcut key was "r". If you wanted to change the shortcut, you needed to rename the VI. In LabVIEW 2010, things are a fair bit more elegant. You can name the shortcut VI whatever you want (for example, I renamed "" to "Remove and" in LabVIEW 2010). In its VI description, you can provide a description of the shortcut, along with a default key. This information will be displayed in the "Ctrl-Key Shortcuts" tab of the Quick Drop Shortcuts dialog:

I hope these improvements (along with the inclusion of scripting as a core feature in LabVIEW 2010), will encourage more users to write Quick Drop Keyboard Shortcuts to enhance their LabVIEW editing experience. Don't forget that, in addition to the six shortcuts that ship with LabVIEW 2010, there is also a List of Community Quick Drop Keyboard Shortcuts.