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.

    Mouse Sonar: Registry key? Show location of pointer when I press the CTRL key

    Discussion in 'Windows OS and Software' started by toronto, Oct 2, 2012.

  1. toronto

    toronto Notebook Deity

    Reputations:
    127
    Messages:
    714
    Likes Received:
    6
    Trophy Points:
    31
    Windows 7 Home Premium 64-bit
    (But, this feature has existed for many years, at least as old as XP.)

    In Mouse Control Panel, under the Pointer Options tab, there's a checkbox option:

    "Show location of pointer when I press the CTRL key".

    When this is selected, pressing the CTRL key causes concentric circles to appear around the mouse pointer, to help you find it quickly. IT's often called Mouse Sonar.

    I want to enable this option, but my Mouse Control Panel does not have a Pointer Options tab. I installed a third-party hardware mouse, software and drivers, and they have hidden the Pointer Options tab. If I knew the Registry key for that option, I could enable it via regedit.

    Anyone know the Registry key that enables or disables that option?
     
  2. TreeTops Ranch

    TreeTops Ranch Notebook Deity

    Reputations:
    330
    Messages:
    904
    Likes Received:
    124
    Trophy Points:
    56
    Hmm...never used that feature but I just tried it and it is working for me. There is some help here: Programmatically Changing Windows Mouse Cursors | The Bit Guru. I didn't read the whole thing so I don't know if that helps, but have a look.

    Be sure to back up registry first if you make any registry changes.

    Another, safer option, is to just make your pointer larger so that you can see it.
     
  3. toronto

    toronto Notebook Deity

    Reputations:
    127
    Messages:
    714
    Likes Received:
    6
    Trophy Points:
    31
    Thanks for the reply.

    It works for you because you have the Pointer Options tab. It worked for me when I had the Pointer Options tab. That's the whole point: my current mouse software and driver removed or hid that tab, so I need another way to enable that option.
     
  4. tijo

    tijo Sacred Blame

    Reputations:
    7,588
    Messages:
    10,023
    Likes Received:
    1,077
    Trophy Points:
    581
    What brand of mouse pad do you have, it should be there for synaptics, but i don't know for brands like elantec, syntelic and ALPS. If you are using the Dell driver, you could try the generic driver too.
     
  5. toronto

    toronto Notebook Deity

    Reputations:
    127
    Messages:
    714
    Likes Received:
    6
    Trophy Points:
    31
    The software and drivers were installed for an external mouse. The external mouse's software/drivers removed or hid the Pointer Options tab.

    On another computer, I had set the option first, prior to installing the external mouse. Even though the Pointer Options tab disappeared, the option's "enabled" setting remained in effect. So, I could solve this by uninstalling the external mouse software and drivers, then enabling the option, then reinstalling. But, if I could find the Registry key that would be cleaner and less work.
     
  6. ratchetnclank

    ratchetnclank Notebook Deity

    Reputations:
    1,084
    Messages:
    1,506
    Likes Received:
    898
    Trophy Points:
    131
    Just tried export reg before and after then using ultra compare to find difference and nothing came back.

    Doesn't look promising. I would though it would of been under HKCU but manually searched it too and nothing that looks close.
     
  7. toronto

    toronto Notebook Deity

    Reputations:
    127
    Messages:
    714
    Likes Received:
    6
    Trophy Points:
    31
    Interesting stuff. Thanks!
     
  8. TreeTops Ranch

    TreeTops Ranch Notebook Deity

    Reputations:
    330
    Messages:
    904
    Likes Received:
    124
    Trophy Points:
    56
    Let us know if that works.
     
  9. PieterPessemier

    PieterPessemier Newbie

    Reputations:
    0
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    5
    Hi,

    I found this forum topic very interesting. The post of Indrek contains very valuable information. :thumbsup: I was actually looking into the same matter as well.
    It is indeed true that that specific bit gets changed when you toggle the mouse locator on/off from the mouse control panel (main.cpl).
    But changing the registry value does not enable/disable the mouse sonar, sadly enough. :( Apparently the mouse device driver (mouhid) reads these values at logon, so a restart or log-off/log-on is required after tweaking the registry.
    I did not find a way to force a re-read of the values, as is the case when you make the change through the control panel item.

    I quickly put together this VBScript while testing so my apologies if the coding is not 100%:
    Code:
    Const HKEY_CURRENT_USER = &H80000001
    Dim strComputer, oReg, strKeyPath, strValueName, strValue
    
    strComputer = "."
     
    Set oReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv")
    
    strKeyPath = "Control Panel\Desktop"
    strValueName = "UserPreferencesMask"
    
    oReg.GetBinaryValue HKEY_CURRENT_USER, strKeyPath, strValueName, strValue
    
    strValue(1) = CInt(BinToDec(SetBit(DecToBin(strValue(1)))))
    
    oReg.SetBinaryValue HKEY_CURRENT_USER, strKeyPath, strValueName, strValue
    
    Set oReg = Nothing
    
    Function GetStatus(BinValue)
    
      If len(BinValue) = 8 Then
        GetStatus = CBool(Mid(BinValue,2,1))
      End if
    
    End Function
     
    Function SetBit(BinValue)
    
      If len(BinValue) = 8 Then
        SetBit = Mid(BinValue,1,1) & "1" & Mid(BinValue,3,len(BinValue))
      End if
    
    End Function
    
    Function DecToBin(DecValue)
    
      Dim bin
    
      For j = 7 To 0 Step -1
        If DecValue And (2 ^ j) Then
          bin = bin + "1"
        Else
          bin = bin + "0"
        End If
      Next
    
      DecToBin = bin
    
    End Function
    
    Function BinToDec(BinValue)
    
      Dim dec
      dec = 0
    
      For k = len(BinValue) To 1 Step -1
        If Mid(BinValue, k, 1) = "1" Then dec = dec + (2 ^ (len(BinValue)-k))
      Next
    
      BinToDec = dec
    
    End Function
    In my case, this didn't solve the problem as I wanted the change to be immediate. So I ended up using the following Powershell script:

    Enable the mouse sonar:
    Code:
    $signature = @'
    [DllImport("user32.dll")]
    public static extern bool SystemParametersInfo(
        uint uiAction,
        uint uiParam,
        uint pvParam,
        uint fWinIni);
    '@
    
    $SPI_SETMOUSESONAR = 0x101D
    $SPIF_UPDATEINIFILE = 0x1
    $SPIF_SENDCHANGE = 0x2
    
    $winapi = Add-Type -MemberDefinition $signature -Name WinAPI -PassThru
    [void]$winapi::SystemParametersInfo($SPI_SETMOUSESONAR, 0, 1, $SPIF_UPDATEINIFILE -bor $SPIF_SENDCHANGE)
    Disable the mouse sonar:
    Code:
    $signature = @'
    [DllImport("user32.dll")]
    public static extern bool SystemParametersInfo(
        uint uiAction,
        uint uiParam,
        uint pvParam,
        uint fWinIni);
    '@
    
    $SPI_SETMOUSESONAR = 0x101D
    $SPIF_UPDATEINIFILE = 0x1
    $SPIF_SENDCHANGE = 0x2
    
    $winapi = Add-Type -MemberDefinition $signature -Name WinAPI -PassThru
    [void]$winapi::SystemParametersInfo($SPI_SETMOUSESONAR, 0, 0, $SPIF_UPDATEINIFILE -bor $SPIF_SENDCHANGE)
    I'm aware that this is already an old topic but I found information regarding this to be very limited on the internet. So I hope this is helpful to anyone.

    Kind regards,

    Pieter Pessemier