Monday, May 19, 2008

Installing a ThinkPad UltraNav Travel Keyboard on Vista x64

Just to start off with, yes, it works, flawlessly actually. Getting it installed is super simple as well as long as you follow the correct steps.

The short of it is as follows:
  1. Download q2kyb02us13.exe. Then extract and install first by executing C:\SWTOOLS\DRIVERS\KYB\v2kyb03us17\Setup.exe
  2. Download q5kyb07us13.exe. Then extract and install second by executing C:\SWTOOLS\DRIVERS\KYB\v5kyb04us17\vista\x64\setup.exe

2008-05-19_1347

Background

I posted this because I tried downloading executing the bigger file first (and only), and then rebooting (several times), and it never actually worked. Normally IBM installs are fashioned as such - "install the bigger installation if you want everything, or install the smaller installation if you want the barebones driver". This wasn't the case. It's definitely a 2-part install. If you do it any other way, you will not get it to work like a standard ThinkPad keypad (the scroll will be missing, the mouse properties will be bare-bones, and you will be very annoyed as I was).

I learned this after about 2 hours of fiddling.

Hope this helps someone!

Thursday, May 15, 2008

ThinkPad TrackPoint Scrolling in Firefox

For some time now I've been trying to figure out how to enhance the scrolling of Firefox with a thinkpad trackpoint device. More specifically, how to scroll within drop down windows on a webpage (for example, on crucial.com as pictured below). I've finally figured it out how to do it. I also created this step-by-step tutorial because I've just seen random code snippets, and no explanation on what was going on if I wanted to add my own program to control scrolling on my thinkpad. This should hopefully help you customize the scrolling of a program (down to the window within a program) if you wish.

image

Disclaimer: my setup is Vista x64 and I think you will be alright as long as you are using some form of modern windows.

Edit the TP4table.dat file

It all starts and ends at the TP4table.dat file. Mine is located at C:\Program Files\Synaptics\SynTP\TP4table.dat. I know that some others (from other postings I've come across) have it elsewhere. A simple "find" on your computer should yield the result (or the software driver should be installed from Lenovo's site).

Once you edit this file at the top is a reference of all the parameters you can set. This is where you want to reference if you want to try and customize other programs that don't respond quite the way you want them to. Here's a screenshot of the parameters.

image

The key is in the Window Class!

I used the tool from AutoIt to capture the Window Classes. The window class is what you need to know in order to tell the synpatic driver where to begin and end scrolling. You dont want to scroll the whole page, if you are trying to scroll the drop down only.

Once you fire up "AutoIt v3 Window Info", you will be able to hover over the location you want to be able to control with the trackpoint and find the name of the "Window Class". You can see this example below.

image

I actually copied the names of several classes I wanted to be able to control - notably the MozillaWindowClass (for the drop down menu) and MozillaDropShadowWindowClass (for the location bar drop down menu)

Here's the code I applied in the TP4table.dat file to make that happen:

; Firefox
*,*,firefox.exe,*,*,MozillaWindowClass,WheelStd,0,9
*,*,firefox.exe,*,*,MozillaDropShadowWindowClass,WheelStd,0,9
*,*,firefox.exe,*,*,MozillaUIWindowClass,WheelStd,0,9


The only thing I have left to figure out is how to scroll horizontally in firefox. I think it has something to do with the Scrolling Types, Pass, or Flags, and I'm not 100% sure. I have to experiment, and I'm already beat for the day. Perhaps another day. Or leave a comment if you have the answer!

Other Programs

Here are some other programs that have been tamed correctly to work with a trackpoint. Some is code from others, some from myself.

Please note that I yanked these programs from sites along the way over the months. I would gladly give those who created them credit, and frankly this is my first time posting, so I don't recall when or where I got the code from. I'm sure you know who you are if you are reading this posting, and I thank you for your efforts.

;Windows Live Writer
*,*,WindowsLiveWriter.exe,*,*,*,WheelStd,0,9

; Bria
*,*,bria.exe,*,*,*,WheelStd,0,9

; Opera web browser
*,*,opera.exe,*,*,*,WheelStd,0,9

; iTunes
*,*,iTunes.exe,*,*,*,Wheelstd,0,9

; Safari
*,*,Safari.exe,*,*,*,Wheelstd,0,9

; Vista Gadgets
*,*,sidebar.exe,*,*,*,WheelStd,0,9

'Office 2007 Scroll Fix
*,*,WINWORD.exe,*,*,*,WheelStd,0,9
*,*,MSPUB.exe,*,*,*,WheelStd,0,9
*,*,POWERPNT.exe,*,*,*,WheelStd,0,9
*,*,OUTLOOK.exe,*,*,*,WheelStd,0,9
*,*,ONENOTE.exe,*,*,*,WheelStd,0,9
*,*,INFOPATH.exe,*,*,*,WheelStd,0,9
*,*,GROOVE.exe,*,*,*,WheelStd,0,9
*,*,EXCEL.exe,*,*,*,WheelStd,0,9
*,*,MSACCESS.exe,*,*,*,WheelStd,0,9

Full Code

Here's my full code for your copying a pasting pleasure:

; Record Format
; OsName,OsVersion,AppName,TopClass,ParentClass,WindowClass,ScrollingType,
; Pass,Exit
;
; OS Names : * WIN NT
; WIN OS Versions : * 95 98 ; NT OS Versions : * 4 5
; Application Name : * string
; Top Class Name : * string
; Parent Class Name : * string
; WindowClass Name : * string
; Scrolling Types : Standard WheelVkey WheelStd TwoParents VkKeys None
; Pass : 0 Use 0 to over-ride built-in program logic
; : 1 Use 1 when everything else has failed
; Flags : 0 Don't exit function after match has succeed
; : 1 Exit function after match has succeeded
; : 2 Special check for FindHorzProc (SB_HORZ) that
; requires that the CLIPCHILDREN flag not be set in
; a horiz scroll bar window
; : One or both of these flags should be specified
; : 4 Rule applies to 2 button Trackpoint system
; : 8 Rule applies to 3 button Trackpoint system
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Pass 0 rules (These rules run first)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; Windows IE3 patch for 2 button systems
*,*,iexplore.exe,*,Shell DocObject View,HTML_Internet Explorer,Standard,0,5

; Windows IE4 patch for 2 button systems
*,*,explorer.exe,*,*,Internet Explorer_Server,VkKeys,0,5

; Windows IE4 patch for 2 button systems
*,*,iexplore.exe,*,*,Internet Explorer_Server,VkKeys,0,5

; Outlook Express patch for 2 button systems
*,*,msimn.exe,*,*,Internet Explorer_Server,VkKeys,0,5

; Adobe Acrobat
*,*,acrord32.exe,*,AVL_AVView,AVL_AVView,TwoParents,0,14
*,*,acrobat.exe,*,AVL_AVView,AVL_AVView,TwoParents,0,14

; PowerPoint File Open
*,*,powerpnt.exe,PP97FrameClass,Snake List,OpenListView,Standard,0,13

; PowerPoint 2000
*,*,powerpnt.exe,PP9FrameClass,Snake List,OpenListView,Standard,0,13
*,*,powerpnt.exe,PP9FrameClass,mdiClass,paneClassDC,TwoParentsP,0,12
*,*,powerpnt.exe,PP9FrameClass,#32770,ScrollBar,StandardP,0,12

; PowerPoint XP
*,*,powerpnt.exe,PP10FrameClass,Snake List,OpenListView,Standard,0,13
*,*,powerpnt.exe,PP10FrameClass,mdiClass,paneClassDC,TwoParentsP,0,12
*,*,powerpnt.exe,PP10FrameClass,#32770,ScrollBar,StandardP,0,12

; MS Publisher 2000
;*,*,mspub.exe,,MSWinPub,*,WheelStd,0,9
;*,*,mspub.exe,,,MSWinPub,WheelStd,0,9

; Netscape 6
;*,*,netscp6.exe,*,*,MozillaWindowClass,WheelStd,0,9

; Hwp 2002
*,*,hwp.exe,HwpMainFrameWnd,*,HwpMainEditWnd,WheelStd,0,9
NT,4,*,HwpMainFrameWnd,*,HwpMainEditWnd,WheelStd,0,9

; Exceed
*,*,exceed.exe,*,*,*,WheelP,0,9

; iTunes
*,*,iTunes.exe,*,*,*,Wheelstd,0,9

; Safari
*,*,Safari.exe,*,*,*,Wheelstd,0,9

'Office 2007 Scroll Fix
*,*,WINWORD.exe,*,*,*,WheelStd,0,9
*,*,MSPUB.exe,*,*,*,WheelStd,0,9
*,*,POWERPNT.exe,*,*,*,WheelStd,0,9
*,*,OUTLOOK.exe,*,*,*,WheelStd,0,9
*,*,ONENOTE.exe,*,*,*,WheelStd,0,9
*,*,INFOPATH.exe,*,*,*,WheelStd,0,9
*,*,GROOVE.exe,*,*,*,WheelStd,0,9
*,*,EXCEL.exe,*,*,*,WheelStd,0,9
*,*,MSACCESS.exe,*,*,*,WheelStd,0,9

; Outlook 2003 HTML format
*,*,outlook.exe,*,AfxWndW,*,WheelStd,0,9

; Outlook 2003
*,*,outlook.exe,rctrl_renwnd32,NativeHWNDHost,NetUIHWND,WheelStd,0,9

; Outlook 2002 HTML format
*,*,outlook.exe,*,AfxWndA,*,WheelStd,0,9

; Outlook Express 6.0 when launched from IE
*,*,iexplore.exe,ATH_Note,##MimeEdit_Server,Internet Explorer_Server,WheelStd,0,9

; Outlook 2000
*,*,outlook.exe,*,AfxWnd,*,WheelStd,0,9
*,*,outlook.exe,*,rctrl_renwnd32,*,WheelStd,0,9
*,*,outlook.exe,rctrl_renwnd32,SysListView32,AfxWnd,WheelStd,0,9

; Win98/Win2k explorer left side window
*,*,explorer.exe,CabinetWClass,SHELLDLL_DefView,Internet Explorer_Server,VkKeys,0,9
; WinXP explorer left side window
NT,5,explorer.exe,CabinetWClass,DUIViewWndClassName,DirectUIHWND,WheelStd,0,9

; FrontPage 2000 views
*,*,frontpg.exe,FrontPageExplorerWindow40,AfxWnd42,SysListView32,WheelStd,0,9

; Opera web browser
*,*,opera.exe,*,*,*,WheelStd,0,9

; Bria
*,*,bria.exe,*,*,*,WheelStd,0,9

; Firefox
*,*,firefox.exe,*,*,MozillaWindowClass,WheelStd,0,9
*,*,firefox.exe,*,*,MozillaDropShadowWindowClass,WheelStd,0,9
*,*,firefox.exe,*,*,MozillaUIWindowClass,WheelStd,0,9

; Vista Gadgets
*,*,sidebar.exe,*,*,*,WheelStd,0,9

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Pass 1 rules (These rules run last)
;
; If no scrolling method was found with the builtin logic, then
; these rules are checked.
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; Outlook Express patch for 3 button systems
WIN,*,msimn.exe,*,*,SysTreeView32,WheelStd,1,9
WIN,*,msimn.exe,*,*,SysListView32,WheelStd,1,9
WIN,*,msimn.exe,*,*,Internet Explorer_Server,Standard,1,9
NT,*,msimn.exe,*,*,SysTreeView32,WheelStd,1,9
NT,*,msimn.exe,*,*,SysListView32,WheelStd,1,9
NT,*,msimn.exe,*,*,Internet Explorer_Server,Standard,1,9

; Lotus Notes patch for both 2 and 3 button systems
*,*,nlnotes.exe,NOTES,SCCVIEWER,SCCDISPLAY,Standard,1,13

; SashWDE
*,*,sashwde.exe,*,*,WDEEditor,Standard,1,13

; Add/Remove Programs (Windows 2000)
NT,5,mshta.exe,*,*,Internet Explorer_Server,Standard,1,9

; Add/Remove Programs (Windows XP)
NT,5,rundll32.exe,*,NativeHWNDHost,DirectUIHWND,WheelStd,1,9

; Winamp
*,*,winamp.exe,*,*,Winamp PE,WheelStd,1,9

; Setup guide
*,*,iexplore.exe,IEFrame,Internet Explorer_TridentDlgFrame,Internet Explorer_Server,WheelStd,1,9

; MSAccess
*,*,msaccess.exe,OMain,ODataPage,Internet Explorer_Server,WheelStd,1,9

; Java support
*,*,java.exe,*,*,*,WheelStd,1,9
*,*,javaw.exe,*,*,*,WheelStd,1,9

; Eudora
*,*,eudora.exe,EudoraMainWindow,AfxFrameOrView42,Internet Explorer_Server,WheelStd,1,9

[AutoScrollTable]

; AUTO SCROLL TABLE AUTO SCROLL TABLE AUTO SCROLL TABLE
; AUTO SCROLL TABLE AUTO SCROLL TABLE AUTO SCROLL TABLE
; AUTO SCROLL TABLE AUTO SCROLL TABLE AUTO SCROLL TABLE

; List the Auto scrolling records under the [AutoScrollTable] section
; Record Format
; OsName,OsVersion,AppName,AppVersion,ScrollMethod
;
; OS Names : * WIN NT
; WIN OS Versions : * 95 98 ; NT OS Versions : * 4 5
; Application Name : * string
; Application Version : * or x.x.x.x
; ScrollMethod : standard or smooth

;*,*,iexplore.exe,*,smooth
;*,*,winword.exe,*,smooth
;*,*,outlook.exe,*,smooth
;*,*,excel.exe,*,smooth
;*,*,msimn.exe,*,smooth