Hi,
I read in the development corner of these forums that in the SDK there is an option to 'exclusive grab' the device. I was wondering if I can set some flag in the .xml config file that is available for each executable?
Cheers, Marin.
Can I set exclusive grab from an xml file
Moderator: Moderators
Re: Can I set exclusive grab from an xml file
Yes there is one. There are some restrictions.
<CfgProperties>
<Grab>Hard</Grab> ;Hard as opposed to None
…
</CfgProperties>
This will grab the connection for just that application while it is running.
This relies on the cfg being read though. If the application doesn't get in focus, the Grab will not be read.
There is one exception to this. The Desktop.xml cfg is always read. If a Grab is in there, the cfg will stay in focus regardless of kb focus.
People typically use this to enable a 2D mouse mode (map the 3D mouse axes and buttons to 2D mouse actions).
There is a ButtonAction that can be used to toggle the Grab in this cfg. The user can assign this to a device button to toggle in and out of 2D mode. E.g., toggle into 2D mode, change focus to a 3D app, toggle into 3D mode, use the app, toggle to 2D mode to move the cursor to a different app, …
<CfgProperties>
<Grab>Hard</Grab> ;Hard as opposed to None
…
</CfgProperties>
This will grab the connection for just that application while it is running.
This relies on the cfg being read though. If the application doesn't get in focus, the Grab will not be read.
There is one exception to this. The Desktop.xml cfg is always read. If a Grab is in there, the cfg will stay in focus regardless of kb focus.
People typically use this to enable a 2D mouse mode (map the 3D mouse axes and buttons to 2D mouse actions).
There is a ButtonAction that can be used to toggle the Grab in this cfg. The user can assign this to a device button to toggle in and out of 2D mode. E.g., toggle into 2D mode, change focus to a 3D app, toggle into 3D mode, use the app, toggle to 2D mode to move the cursor to a different app, …