Skip to content
A Windows tray icon program that emulates the One Touch Search feature of old Logitech mice with SetPoint.
C++ C
Branch: master
Clone or download

README.md

OneTouchSearch

A Windows tray icon program that emulates the One Touch Search feature of the old Logitech mice with SetPoint. When it is running and the user presses the default hotkey CTRL+ALT+SHIFT+K the currently selected text (in any application) is used to launch a search with the default browser.

Disclaimer

It's my first C++ project so I don't practice this language very well (actually, "at all"!). Feel free to submit PRs with code corrections and new features, if you like, because at the moment this is the maximum I can do. 😃

Usage

  1. Either compile the source code with VS2010 or run the binary available on the Release section: an icon will be placed on the system tray.
  2. Important note: due to UIPI (User Interface Privilege Isolation), only if you run the application as Administrator it will be able to grab text from both admin and non-admin apps, so be sure to try both modes. Consider that the original One Touch Search from Logitech cannot grab text from admin apps, too.
  3. Select some text on a Windows application, such as Notepad or Word, etc..
  4. Press CTRL+ALT+SHIFT+K on your keyboard, a new browser tab (or instance) should search the highlighted text using Google US.
  5. (Optional) Assign the hotkey to one of the mouse buttons using Logitech Options, so you can search exactly as the old Logitech SetPoint feature with the same name.

Advanced configuration

As you may guess from the sources, I'm not able to create a UI for the configuration like for the Logitech's OneTouchSearch. But you can change the Search Engine and Hotkey from the registry, if you like.

How to change the Search Engine used

Open the registry key:

HKEY_CURRENT_USER\Software\OneTouchSearch

and change the value SearchEngineURL with the URL of your choice. Some examples:

  • Google Search in Italian https://www.google.it/search?hl=it&q=
  • Duck Duck Go in English https://duckduckgo.com/?q=

How to change the hotkey

This is more difficult, as it requires a DWORD value where the lower word is the key and the higher word is the modifier (CTRL, ALT, WIN, etc.). You'll have open the registry key:

HKEY_CURRENT_USER\Software\OneTouchSearch

and change the value Hotkey with the number that represents the combination of the two (LOWORD = key, HIWORD = modifier). For example this is how the default hotkey is converted to a number:

  1. The modifier are CTRL+ALT+SHIFT so consult this table for the related C++ Win32 constants:
  • CTRL = 0x0002
  • ALT = 0x0001
  • SHIFT = 0x0004
  1. Open the Windows Calculator in programmer mode and click on HEX to input and output hexadecimal values.
  2. Sum the values of the chosen modifiers, so 2 + 1 + 4 = 7 and multiply this value by 10000 (hex), you'll get 70000.
  3. The chosen key is K so consult this table for the related C++ Win32 constants:
  • K = 0x4B
  1. Add the key to the previous result (always in HEX mode), so you'll get 70000 + 4B = 7004B.
  2. 7004B is the value you'll have to put in hexadecimal mode into the registry value Hotkey.

Used libraries/code

This is a mash-up of different libraries/code samples found on CodeProject:

  • Clipboard Backup by sswater shi (link)
  • URL Encode by Daniel Cohen Gindi (link)
  • Tray Icon by Istvan Pasztor (link)
You can’t perform that action at this time.