选机助手
关闭
*产品分类:
  • 笔记本
  • 台式机
  • thinkplus选件
使用场景:
  • 超薄便携
  • 性能旗舰
  • 轻薄独显
  • 设计创作
  • 日常办公
  • 翻转触屏
价格选择:
  • 5000元以下
  • 5000-8000元
  • 8000-11000元
  • 11000-15000元
  • 15000元以上
尺寸选择:
  • 13.3英寸
  • 14英寸
  • 15.6英寸
确认

[分享] 给不用不用小红点 的 thinkpad 的 产品经理的建议

发表于 2023-8-23 15:43   |   来自Microsoft Edge浏览器 [复制链接]   
12475 1  


现在B站上都知道thinkpad 再小红点上不作为,不思进取的事情,因此我这里分享一个小红点的优化教程
小红点现在改造后,由于和系统的鼠标是同一个设置,加上小红点的移动效果不好,加速度不好控制。 因此,我这里参考国外大神的 autohotkey 的功能,写了一个这样的代码

其主要的意义就是,默认情况小,小红点可以移动特别快,当你再输入表格或者打字的时候,通过按住热键,就可以让小红点移动变慢,具体代码如下,该代码需要autohotkey 环境才能运行


; Autohotkey script "Toggle Mouse sensitivity"
;=================================================================================
SlowMouseSpeed      := 1
NormalMouseSpeed    := true ; State of Mouse pointer speed
UserMouseSpeed      := 0    ; Speed sensed before slow down
MouseThreshold1     := 6
MouseThreshold2     := 10
MouseEnhance        := 1

SPI_GETMOUSESPEED   := 0x70
SPI_SETMOUSESPEED   := 0x71
SPI_SETMOUSE        := 0x04

;=================================================================================
*LAlt::   toggleMouseSpeed()

;=================================================================================
toggleMouseSpeed() {
    global
    ; SET LOW SPEED
    if( NormalMouseSpeed )
    {
        ; SENSE BEFORE
        DllCall("SystemParametersInfo", UInt,SPI_GETMOUSESPEED, UInt,0, UIntP,prevSpeed, UInt,0)

        ; Temporarily reduces the mouse cursor's speed.
        ; Retrieve the current speed so that it can be restored later
        DllCall("SystemParametersInfo", UInt,SPI_GETMOUSESPEED, UInt,0, UIntP,UserMouseSpeed, UInt,0)
        ; Slow down mouse speed
        DllCall("SystemParametersInfo", UInt,SPI_SETMOUSESPEED, UInt,0, UInt,SlowMouseSpeed, UInt,0)

        ; SENSE AFTER
        DllCall("SystemParametersInfo", UInt,SPI_GETMOUSESPEED, UInt,0, UIntP,currentSpeed, UInt,0)
        ToolTip, Mouse slow: %currentSpeed%/20

        ; REMEMBER CURRENT STATE
        NormalMouseSpeed := false
    }
    ; RESTORE SPEED
    else {
        ; SENSE BEFORE
        DllCall("SystemParametersInfo", UInt,SPI_GETMOUSESPEED, UInt,0, UIntP,prevSpeed, UInt,0)

        ; Restore the original speed.
        DllCall("SystemParametersInfo", UInt, SPI_SETMOUSESPEED, UInt,0, UInt,UserMouseSpeed, UInt,0)

        ; Restore the original speed acceleration thresholds and speed
        VarSetCapacity(MySet, 32, 0)
        InsertInteger(MouseThreshold1, MySet, 0)
        InsertInteger(MouseThreshold2, MySet, 4)
        InsertInteger(MouseEnhance   , MySet, 8)
        DllCall("SystemParametersInfo", UInt,SPI_SETMOUSE, UInt,0, Str,MySet, UInt,1)

        ; SENSE AFTER
        DllCall("SystemParametersInfo", UInt,SPI_GETMOUSESPEED, UInt,0, UIntP,currentSpeed, UInt,0)
        ToolTip, Mouse restored: %currentSpeed%/20

        ; REMEMBER CURRENT STATE
        NormalMouseSpeed := true
    }
    SetTimer, RemoveToolTip, 1000
}
;=================================================================================
InsertInteger(pInteger, ByRef pDest, pOffset = 0, pSize = 4) {
    ; Copy each byte in the integer into the structure as raw binary data.
    Loop %pSize%
    DllCall("RtlFillMemory", "UInt",&pDest + pOffset + A_Index-1, "UInt", 1, "UChar", pInteger >> 8*(A_Index-1) & 0xFF)
}
;=================================================================================
RemoveToolTip:
SetTimer, RemoveToolTip, Off
ToolTip
return

;=================================================================================

1条回复
来自安卓版联想 发表于 2023-9-29 00:48:40
厉害
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则