11 January 2008

Logitech SetPoint == teh suxx0r!

I like Logitech's trackballs. People were amazed that I would actually spend my own money for a Logitech trackball for my work computer when I had a perfectly good mouse. At last count I had two of the original Trackman Marble, two corded and one cordless Trackman Marble Wheel, and a Marble Mouse. I got the Marble Mouse because my thumb started to be tired if I worked on the computer too long at night (after working on one all day at the office). So, I have the Marble Mouse at work.

The Marble Mouse has two large buttons on either side, and it also has two small buttons just above the large ones. Logitech's SetPoint utility can be used to map those to a keypress or action. When I originally got the MM, I set it up so that the left small button paged down, and the right one paged up. I used it this way for so long, it's become second nature. So when they aren't mapped properly, it drives me nuts.

I just started a new job, with a new computer. I unpacked the MM and hooked it up and downloaded the latest SetPoint from the Logitech site. Launched it up and went to customize the buttons and WTF? I could map the left one to page up, but there was no page down listed. I checked out the installation directory, and there was this XML file (default.xml) with all these "handler sets" configured. It certainly looked like both page down and page up were supported, so why weren't they available? Further digging showed a ton of configuration files in the All Users/Application Data/Logitect/SetPoint directory, but they all had helpful names like "1000001F". So I STFW to see if anyone else had posted a solution to this. Someone had written an "uberButton" utility that claimed to enable all features for all buttons, but it was an 8M executable, which I thought was a little much for my purposes. So I poked around some more and found a directory named "Logitech/SetPoint" in my profile's application data directory. I checked, and lo and behold, there were the current mappings in a file named user.xml. They were references to the handler sets I had noticed in the default.xml file. So I whipped out Vim and changed the references to point to the page up and down handlers. There were also some application-specific "overrides" for these functions, so I set those up too. Logged out and back in and voila! The MouseMan rides (properly) again!

Here's what the configuration file looks like:


<Source>
<UserOptions>
<UserOption Name="BeepKeyboardSettings">0</UserOption>
<UserOption Name="ShowKeyboardPopupSettings">1</UserOption>
<UserOption Name="ShowKeyboardTraySettings">1</UserOption>
<UserOption Name="ShowTrayIcon">1</UserOption>
<UserOption Name="ShowKeyboardSettings">1</UserOption>
</UserOptions>
<Apps>
<App>c:\\progra~1\\micros~2\\office11\\outlook.exe</App>
<App>c:\\program files\\outlook express\\msimn.exe</App>
<App>c:\\progra~1\\micros~2\\office11\\winword.exe</App>
<App>c:\\progra~1\\micros~2\\office11\\powerpnt.exe</App>
<App>c:\\progra~1\\micros~2\\office11\\excel.exe</App>
</Apps>
<Devices>
<Device DisplayName="Marble Mouse" Class="PointingDevice" Model="16777328" NumberOfButtons="4" ConnectionID="">
<Param ACCELERATION="1" AIRACCELERATION="4" AirSpeedX="50" AirSpeedY="50"
AppSpecific="0" ButtonSwapped="0"
DefaultGameModeResolutionPresets=""
DefaultGameModeResolutionPresetsY="" DistinctAirCursor="1"
EnableCentering="1" GameDeviceSuggestGameMode="0"
GameDeviceSuggestOS="0" GameModeButtonAddGame="0"
GameModeButtonResDown="0" GameModeButtonResUp="0"
GameModeButtonResUpWrap="0" GameModeKeepAcceleration="1"
GameModeKeepKeypress="1" GameModeKeepOther="0"
GameModeKeepRightLeft="1" GameModeKeepSpeed="1"
GameModeNotification="0" GameModeResolutionNbPreset="0"
GameModeResolutionPresets="" GameModeResolutionPresetsY=""
GameParticipate="0" GameParticipateDefault="0" GamePowerMode="0"
GameReportEnabled="1" GameReportRate="2" GameResIndex="2"
GameUseAdvanced="0" GamingType="0" LowBatPercentLevel="5"
MenuLocBottom="-1" MenuLocLeft="-1" MenuLocRight="-1"
MenuLocTop="-1" MenuSize="0" OfficePowerMode="0"
ShowButtonsPage="1" SmartMove="0" SpeedX="25" SpeedY="25"
StromboliMice="0" TouchPadMice="0" TrackballMice="1" Trails="0"
TrailsLength="0" UserBatteryMode="0" VScrollAcceleration="0"
VScrollSpeed="0" VoIPClient="" smartshiftmode="0"/>
<Buttons>
<Button Number="1" Name="1">
<Param IconLoc="" Type=""/>
<Trigger Class="ButtonPress">
<Param Button="1" FirstRepeatDelay="0" RepeatDelay="0"
Silent="1" Type="0"/>
<TriggerState Name="ButtonDownUp" HandlerSet="LeftClick">
<Handler Class="MouseButton">
<Param ButtonName="PrimaryButton"/>
</Handler>
</TriggerState>
</Trigger>
</Button>
<Button Number="2" Name="2">
<Param IconLoc="" Type=""/>
<Trigger Class="ButtonPress">
<Param Button="2" FirstRepeatDelay="0" RepeatDelay="0"
Silent="1" Type="0"/>
<TriggerState Name="ButtonDownUp" HandlerSet="RightClick">
<Handler Class="MouseButton">
<Param ButtonName="SecondaryButton"/>
</Handler>
</TriggerState>
</Trigger>
</Button>
<Button Number="4" Name="3">
<Param IconLoc="" Type=""/>
<Trigger Class="ButtonPress">
<Param Button="4" FirstRepeatDelay="0" RepeatDelay="0"
Silent="0" Type="0"/>
<TriggerState Name="ButtonDownUp" HandlerSet="PageDown">
<Handler Class="KeyStroke">
<Param KeyName="{PGDN}"/>
</Handler>
<AppOverride App="mm.exe" HandlerSet="AppOverride_MindMapperBackward"/>
<AppOverride App="winword.exe" HandlerSet="AppOverride_WordBackward"/>
<AppOverride App="msimn.exe" HandlerSet="AppOverride_OutlookExpressBackward"/>
<AppOverride App="outlook.exe" HandlerSet="AppOverride_OutlookBackward"/>
<AppOverride App="powerpnt.exe" HandlerSet="AppOverride_PowerPointBackward"/>
<AppOverride App="nlnotes.exe" HandlerSet="AppOverride_LotusNotesBackward"/>
<AppOverride App="excel.exe" HandlerSet="AppOverride_ExcelBackward"/>
</TriggerState>
</Trigger>

</Button>
<Button Number="5" Name="4">
<Param IconLoc="" Type=""/>
<Trigger Class="ButtonPress">
<Param Button="5" FirstRepeatDelay="0" RepeatDelay="0"
Silent="0" Type="0"/>
<TriggerState Name="ButtonDownUp" HandlerSet="PageUp">
<Handler Class="KeyStroke">
<Param KeyName="{PGUP}"/>
</Handler>
<AppOverride App="mm.exe" HandlerSet="AppOverride_MindMapperForward"/>
<AppOverride App="winword.exe" HandlerSet="AppOverride_WordForward"/>
<AppOverride App="msimn.exe" HandlerSet="AppOverride_OutlookExpressForward"/>
<AppOverride App="outlook.exe" HandlerSet="AppOverride_OutlookForward"/>
<AppOverride App="powerpnt.exe" HandlerSet="AppOverride_PowerPointForward"/>
<AppOverride App="nlnotes.exe" HandlerSet="AppOverride_LotusNotesForward"/>
<AppOverride App="excel.exe" HandlerSet="AppOverride_ExcelForward"/>
</TriggerState>

</Trigger>
</Button>
</Buttons>
</Device>
</Devices>
</Source>


You can browse through the default.xml file and check out what kind of functions are available. This file appears to cover all Logitech keyboards and mice, so there are a lot of things available (zoom in/out, volume up/down, standby/restart/shutdown/logoff, VoIP w/Skype, browser next/previous/search...). From the looks of it, you should also be able to create your own handler sets to handle app-specific functions, or even launch external programs. So if you have to perform some obnoxious series of commands on a regular basis (like, say, FTP an HTML file to a server and launch a browser to look at it), you could script those and bind them to a mouse button! Could be really handy, given a suitably bizarre set of circumstances...

2 comments:

  said...

Hello, i read your post that I found after a Google query.

I own a Logitech MX 5000 keyboard which have a "touch" area on the left with a Zoom and a Volume slider.

I find the Zoom one pretty useless since in Firefox it just change font size and screw any webpage, so I thought it would be very nice to make it act like a wheel.

I tried to search/replace "ZoomOut" with "WheelDown" into %Program Files%\Logitech\SetPoint\default.xml
I also changed a bit the include/exclude list of applications,

Then I killed the setpoint process and restarted setpoint.exe but it doesn't change anything!

In fact when setpoint.exe is not running the slider doesn't do anything but when I start it again, my changes to default.xml are useless!

I also saw that in the Windows Explorer, the slider is acting as a wheel as I want (even before my changes).


Do you know what could I do with the Application Data's user.xml? I don't really understood the handlers thing but I'll give it a try!


Thanks in advance for your help, and sorry for my english I'm french.

  said...

Ok, I understood how it works. I successfully tried to change the Zoom slider to make it act like the Volume one, it works...

But I can't get it right for the Vertical Scroll because I don't have an "example",

I tried:

{Button Number="786989" Name="Zoomin"}
{Param IconLoc="" Type=""/}
{Trigger Class="ButtonPress"}
{Param Button="786989" FirstRepeatDelay="0" RepeatDelay="0" Silent="0" Type="0"/}
{TriggerState Name="ButtonDownUp" HandlerSet="VerticalScrollSet"}
{Handler Class="VerticalScroll"}
{/Handler}
{/TriggerState}
{/Trigger}
{/Button}

But when I touch ZoomIn, Setpoint software gets an error message and quits! I assume there is a line missing, a thing like {Param Action="" /} but how can I guess it? I looked into the mouse buttons section in order to try to copy paste one but there is no such line for the wheel, in reality wheel buttons don't have their line in the file ! Maybe you have on in your?


Thanks for your help, getting mad!


EDIT: Had to searched/Replace "<>" with "{}" because of a Blogger "functionality"