Giter Club home page Giter Club logo

iblogisoftext's Introduction

IbLogiSoftExt

Languages: English, 简体中文

An extension for Logitech Gaming Software.

Features

  • Remap G-keys to virtual-key codes (vkC0 + n), so that them can be detected by AutoHotkey, which enables you to:
    • Use the more professional AHK to perform hotkey actions instead of Lua.
    • Detect when your G-keys have been double-pressed, triple-pressed or long-pressed. (Remember to use "L" option when call KeyWait. #2)
    • Make your G-keys context-sensitive (perform different actions depending on specific conditions, such as different processes and windows). It's more configurable than LGS's Automatic Game Detection.
    • Define custom combinations of G-keys as hotkeys. (Just like G-Shift, but more powerful) (#2)
  • Reduce the background memory usage of Logitech Gaming Software. It can reduce the memory from 70MB to 10MB, approximately.

Supported version

Tested devices

Device Description
G600 G6~G20 work; G4~G5 need some special settings, or use XButton1 and XButton2 instead
G300s G4~G9 work
G700s G4~G11 work. Not need Automatic Game Detection. (#1)

(If not mentioned, G1~G3 need some special settings to work, but it's recommended to use LButton, RButton and MButton instead)

Installation

  1. Install Logitech Gaming Software v9.02.65 x64, exit it via tray icon.
  2. Download release files from Releases.
  3. Put the winmm.dll in the release files into C:\Program Files\Logitech Gaming Software .
  4. Restart Logitech Gaming Software, turn on Automatic Game Detection mode.
  5. Run RemappingTest.ahk (included in the release files) to test the remapping.

Configuration

If you don't like the default behavior, you can modify it by following the steps below:

  1. Create winmm.dll.yaml in the same directory the winmm.dll in.
  2. Refer to the following content to edit it:
# YAML
# LGS crashes when unplugging Logitech devices on some computers. This option will automatically restart LGS in this case. (IbParentProcessGuard.exe is required, and DisableWER.reg is recommanded to avoid Windows recording crashes.)
ProcessGuard: false
Memory:
  # If you have enough memory, you can turn it off.
  EmptyWorkingSetOnStartup: true
Mouse:
  # Whether or not to remap G1~G3. Sometimes may cause problems if turned on. (#1)
  RemapG123: false

(UTF-8 encoding)

Credits

This project uses the following libraries:

See Also

iblogisoftext's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

iblogisoftext's Issues

Using G700s win10 x64, G4~G11 works fine, however, long press cannot be catched

And long press doesn't show up in the key history.

Another problem is, when Logitech Gaming Software 9.02.65 64-bit is not on Automatic Game Detection mode, the key history still gets some records with message of "not found", and single click of left button can not click and select one of preview windows on task bar, and it resolved by removing the winmm.dll from C:\Program Files\Logitech Gaming Software.

I find a strange bug, the first code works and can catch long-press or double-click, etc., however, the second code only catch single-click, (I turn off all ahk scripts to test this one, and vkC5 can be any other key):

I find a strange bug, the first code works and can catch long-press or double-click, etc., however, the second code only catch single-click, (I turn off all ahk scripts to test this one, and vkC5 can be any other key):

A. OK:


Morse(timeout = 400) {
   tout := timeout/1000
   key := RegExReplace(A_ThisHotKey,"[\*\~\$\#\+\!\^]")
   
   Loop {
      t := A_TickCount
      KeyWait %key%
      Pattern .= A_TickCount-t > timeout
      KeyWait %key%,DT%tout%
      If (ErrorLevel)
         Return Pattern
   }
}



vkC5::
p := Morse(300)
If (p = "0")
{
  ToolTip, Short press
}
Else If (p = "00")
{
  ToolTip, Double short presses
}
Else If (p = "000")
{
  ToolTip, Triple short presses
}
Else If (p = "0000")
{
  ToolTip, Quadruple short presses
}
Else If (p = "01")
{
  ToolTip, Short+Long press
}
Else If (p = "1")
{
  ToolTip, Long press
}
Else
{
  ToolTip, Press pattern %p%
}
Sleep 500
ToolTip  ; Turn off the tip.
Return

^#r::
Reload  ; Assign Ctrl-Alt-R as a hotkey to restart the script.
Sleep 1000 ; If successful, the reload will close this instance during the Sleep, so the line below will never be reached.
MsgBox, 4,, The script could not be reloaded. Would you like to open it for editing?
IfMsgBox, Yes, Edit

Return


Tab::
tooltip, OK
return 

B. Only add #IfWinActive ahk_exe notepad.exe and #IfWinActive, then failed:


Morse(timeout = 400) {
   tout := timeout/1000
   key := RegExReplace(A_ThisHotKey,"[\*\~\$\#\+\!\^]")
   
   Loop {
      t := A_TickCount
      KeyWait %key%
      Pattern .= A_TickCount-t > timeout
      KeyWait %key%,DT%tout%
      If (ErrorLevel)
         Return Pattern
   }
}



vkC5::
p := Morse(300)
If (p = "0")
{
  ToolTip, Short press
}
Else If (p = "00")
{
  ToolTip, Double short presses
}
Else If (p = "000")
{
  ToolTip, Triple short presses
}
Else If (p = "0000")
{
  ToolTip, Quadruple short presses
}
Else If (p = "01")
{
  ToolTip, Short+Long press
}
Else If (p = "1")
{
  ToolTip, Long press
}
Else
{
  ToolTip, Press pattern %p%
}
Sleep 500
ToolTip  ; Turn off the tip.
Return

^#r::
Reload  ; Assign Ctrl-Alt-R as a hotkey to restart the script.
Sleep 1000 ; If successful, the reload will close this instance during the Sleep, so the line below will never be reached.
MsgBox, 4,, The script could not be reloaded. Would you like to open it for editing?
IfMsgBox, Yes, Edit

Return

#IfWinActive ahk_exe notepad.exe
Tab::
tooltip, OK
return 
#IfWinActive

Originally posted by @pytkr in #1 (comment)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.