Reputation: 3325
I am trying to assign an HotKey (Ctrl+Alt+S) for a shortcut I deploy on Windows Desktop using Wix. Below is how I tried to assign the value. However the compiler says that the Hotkey value has to be a integer value.
<Shortcut Id="ToolsShortcut" WorkingDirectory="System" Icon="icon.vbs" Directory="DesktopFolder" Hotkey="Ctrl+Alt+S" Description="Shortcut to Launch the Tools Framework" Name="Tools.lnk" Advertise="yes">
Please could anyone tell me how to determine the equivalent integer value for Ctrl+Alt+S
Currently I know that I have to somehow combine the Hex equivalent for the individual keys to create the Hotkey.
Here's a link to Virtual-Key Codes.
Below are the Hex values for the individual keys:
Ctrl: 11
Alt: 12
S: 53
Any help would be greatly appreciated.
Upvotes: 1
Views: 458
Reputation: 21416
You can use 1619 for Ctrl + Alt + S. It's a combination of the virtual key code and modifier flags. They are not really documented, but you can determine them through experiments.
To get this number I used a Hot Key control and HKM_GETHOTKEY message.
Upvotes: 1
Reputation: 32250
Whether you find it or not, beware of the warning placed in the wix.chm:
Authors of installation packages are generally recommend not to set this option, because this can add duplicate hotkeys to a users desktop. In addition, the practice of assigning hotkeys to shortcuts can be problematic for users using hotkeys for accessibility.
Upvotes: 1