The Notebook Review forums were hosted by TechTarget, who shut down them down on January 31, 2022. This static read-only archive was pulled by NBR forum users between January 20 and January 31, 2022, in an effort to make sure that the valuable technical information that had been posted on the forums is preserved. For current discussions, many NBR forum users moved over to NotebookTalk.net after the shutdown.
Problems? See this thread at archive.org.

    Map double-clicking TrackPoint center button to...

    Discussion in 'Lenovo' started by msafi, Apr 2, 2010.

  1. msafi

    msafi Notebook Guru

    Reputations:
    0
    Messages:
    63
    Likes Received:
    0
    Trophy Points:
    15
    Is it possible to map the double-clicking action of the center button of the TrackPoint to 3rd mouse button while keeping the standard scrolling feature?

    Another smart way (not calling my self smart; read it some where) to accomplish this would be: when the center button is pressed and released without any movement, act as a 3rd mouse button. If there's movement between pressing and releasing, don't.
     
  2. aperture science

    aperture science Notebook Consultant

    Reputations:
    74
    Messages:
    101
    Likes Received:
    0
    Trophy Points:
    30
    this would be great!
     
  3. aznguyphan

    aznguyphan Notebook Evangelist

    Reputations:
    207
    Messages:
    517
    Likes Received:
    0
    Trophy Points:
    30
    Look up autohotkey. I already wrote a script that's on this forum that lets the mouse button act as a middle click when pressed+released and act as a scroll when held. I assume that's what you meant, my middle button is a middle click though, not a double mouse click
     
  4. msafi

    msafi Notebook Guru

    Reputations:
    0
    Messages:
    63
    Likes Received:
    0
    Trophy Points:
    15
    aznguyphan, I'm using a similar AutoHotKey script for my ThinkPad USB Keyboard, which is attached to a PC that doesn't have the proper TrackPoint drivers. The AutoHotKey script helps me scroll up and down using the center button as well as make it act as a 3rd mouse button when double-clicked.

    But, why re-do something that's already there, like scrolling? Only the 3rd mouse button click need to be implemented without messing with other things, like scrolling.

    I'll try to create an AutoHotKey script that does the job with simplicity; don't know if I could, but I'll try.
     
  5. aznguyphan

    aznguyphan Notebook Evangelist

    Reputations:
    207
    Messages:
    517
    Likes Received:
    0
    Trophy Points:
    30
    Because when you set the middle button to scrolling in the control panel, it's button input gets completely ignored. If you use AutoHotkey to spy button presses, nothing comes up, making it unbindable
     
  6. msafi

    msafi Notebook Guru

    Reputations:
    0
    Messages:
    63
    Likes Received:
    0
    Trophy Points:
    15
    aznguyphan, Yeah, I was looking into that. AHK community are trying to find ways around limitations like this, and it seems they've made a lot of progress. I asked a question in one of the threads there. Let's see what comes out...
     
  7. aznguyphan

    aznguyphan Notebook Evangelist

    Reputations:
    207
    Messages:
    517
    Likes Received:
    0
    Trophy Points:
    30
    Keep us updated if you make any progress
     
  8. msafi

    msafi Notebook Guru

    Reputations:
    0
    Messages:
    63
    Likes Received:
    0
    Trophy Points:
    15
    So, I tried to intercept the center button click using AutoHotKey, but it seems that that's impossible for technical reasons.

    I found something interesting though. Synaptics, the suppliers of the TrackPoint's hardware, provide SDK/API for their devices. The documentation is available here. Someone who knows how to program with Win API could use this to create the desired effect. So, I posted a request/job on RentACoder.com :D
     
  9. mwrobel

    mwrobel Newbie

    Reputations:
    30
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    5
  10. aznguyphan

    aznguyphan Notebook Evangelist

    Reputations:
    207
    Messages:
    517
    Likes Received:
    0
    Trophy Points:
    30
    Nice program, I couldn't get it working though, SynCom.dll error. Are there other requirements besides the runtime libraries?
     
  11. mwrobel

    mwrobel Newbie

    Reputations:
    30
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    5
    Well, Synaptics drivers (called UltraNav Driver by Lenovo) of course. I have SynCom.dll in C:\windows\system32.
     
  12. msafi

    msafi Notebook Guru

    Reputations:
    0
    Messages:
    63
    Likes Received:
    0
    Trophy Points:
    15
    That's awesome!! Thank you so much!!

    I was actually trying to program something similar myself using Visual Basic. Synaptics SDK contains some sample code for Visual Basic and the implementation using their ActiveX controls. But it's very difficult and (other than the SDK and documentation) it's very poorly supported.

    Unfortunately for me, your code is written in Visual C++, which is very advanced for me. I would still love to take a look at your code, please!!

    The problem with hibernation and resume is pretty strange. Isn't it just an EXE file that as long as it ran, it intercepted middle clicks? Why does it not work after resume? What causes it to close?

    Thanks again
     
  13. mwrobel

    mwrobel Newbie

    Reputations:
    30
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    5
    Glad it works for you :) I will publish the code shortly (probably in a few days).

    The program doesn't close after hibernation, it only stops receiving notifications from Synaptics. I think that re-registering the notification when computer resumes will work. I'll try to do it in a few days (it bothers me personally - I usually hibernate my computer instead of turning it off).
     
  14. msafi

    msafi Notebook Guru

    Reputations:
    0
    Messages:
    63
    Likes Received:
    0
    Trophy Points:
    15
    Okay, I'll wait for a few days. No problemo.

    By the way, I'm using your program with 7 Taskbar Tweaker which (among other things) allows to tweak what a middle click on a taskbar button does (i.e. close open program, focus its window, or the default open another instance). Just thought I'd share that.
     
  15. msafi

    msafi Notebook Guru

    Reputations:
    0
    Messages:
    63
    Likes Received:
    0
    Trophy Points:
    15
    I just docked my ThinkPad in order to work from my desk, and unfortunately, tpmiddle-0.1.exe doesn't work with the UltraNav external keyboard!

    I ended the program from the task manager and then launched it, but it still wasn't able to intercept middle clicks from the external UltraNav keyboard.
     
  16. mwrobel

    mwrobel Newbie

    Reputations:
    30
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    5
  17. msafi

    msafi Notebook Guru

    Reputations:
    0
    Messages:
    63
    Likes Received:
    0
    Trophy Points:
    15
    The relevant ones that I see are "IBMCompatibleStick on PS2" and "Styk on USB"

    The other two are "TouchPad on PS2" and "TouchPad on USB"

    Thanks!
     
  18. mwrobel

    mwrobel Newbie

    Reputations:
    30
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    5
    I've released version 0.2 with support for sleep/hibernation. You can get it here: http://users.v-lo.krakow.pl/~mwrobel/programs/tpmiddle.html . I've put sources there, if you want to see them.

    msafi: I've uploaded a new debug version, try if it works for you. It should list four devices, then say it is connecting to "IBMCompatibleStick on PS2" and "Styk on USB", and middle clicks from both should be reported.
     
  19. msafi

    msafi Notebook Guru

    Reputations:
    0
    Messages:
    63
    Likes Received:
    0
    Trophy Points:
    15
    I've not tried 0.2 because I'm still docked. Will do that later on.

    As for the debug app, it's reporting that it's connecting to "IBMCompatibleStick on PS2" and "Styk on USB" :confused:
     
  20. mwrobel

    mwrobel Newbie

    Reputations:
    30
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    5
    So it's what it should report. Does middle click on the external keyboard work?
     
  21. msafi

    msafi Notebook Guru

    Reputations:
    0
    Messages:
    63
    Likes Received:
    0
    Trophy Points:
    15
    Middle clicks on the external keyboard don't work.
     
  22. mwrobel

    mwrobel Newbie

    Reputations:
    30
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    5
  23. msafi

    msafi Notebook Guru

    Reputations:
    0
    Messages:
    63
    Likes Received:
    0
    Trophy Points:
    15
    I emailed you the data.

    By the way, the source code seem to be missing SynKit.h, without which the source won't compile.
     
  24. mwrobel

    mwrobel Newbie

    Reputations:
    30
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    5
    You can find SynKit.h in the Synaptics SDK.