如何消除WindowsMo​​use键的加速时间?

如何消除WindowsMo​​use键的加速时间?

有时我会断开鼠标连接,为其他设备腾出空间,但我仍然在使用鼠标键。然而,加速时间让我失去了耐心。

我曾经使用过 Windows Ghost Image,其中的鼠标键没有加速时间,所以我知道可以将其删除。我timetomaximumspeed在注册表中编辑了,但它只会使鼠标键变慢。我在网上搜索过。

唯一一个类似的问题发布在微软论坛上,但没有得到答案。我尝试过 Neat Mouse 等替代品,但体验并不好,因为键盘映射不一样。我目前使用的是 Windows 7。

我愿意编辑所有内容,甚至是 DLL 文件?

答案1

不幸的是,Windows 鼠标键无法实现太多功能。删除指针精度可能会有所帮助,但现在当您需要精度时,您的实际鼠标就变得毫无用处了。

替代的解决方案是

mouse.ahk 内容

#SingleInstance Force

varSlowStep := 10
varFastStep := 75
pressingUp := False
pressingDown := False
pressingLeft := False
pressingRight := False
lastHorizontal := 0
lastVertical := 0

;jump to center
NumpadDel::DllCall("SetCursorPos", "int", A_ScreenWidth / 2, "int", A_ScreenHeight / 2)
;right click
#NumpadClear::Click, Right
;ctrl click
^NumpadClear::Send ^{Click}

;scroll
varInScrollMode :=false
ScrollLock::
varInScrollMode := !varInScrollMode
;set state on so it is obvious that now page will be scrolling
if (varInScrollMode)
    SetScrollLockState, On
else
    SetScrollLockState, Off
return

Up::
if (varInScrollMode)
    Click, WU
else
    Send {Up}
return

Down::
if (varInScrollMode)
    Click, WD
else
    Send {Down}
return

Left::
if (varInScrollMode)
    Click, WL
else
    Send {Left}
return

Right::
if (varInScrollMode)
    Click, WR
else
    Send {Right}
return

;hold action
varIsHolding := false
NumpadIns::
varIsHolding := true
Send {Click, Down}
return

;normal click or release hold
NumpadClear::
if (varIsHolding) {
    Send {Click, Up} ;release
    varIsHolding := false
}
else
    Send {Click} ;normal click
return

;modified version of https://github.com/uahnbu/mousekeys/blob/f7640c3ac648761246604685b628defd22be0e19/mouse.ahk#L1
;press down regular
^NumpadUp::
NumpadUp::PressUp()
^NumpadDown::
NumpadDown::PressDown()
^NumpadLeft::
NumpadLeft::PressLeft()
^NumpadRight::
NumpadRight::PressRight()
;release regular
^NumpadUp UP::
NumpadUp UP::ReleaseUp()
^NumpadDown UP::
NumpadDown UP::ReleaseDown()
^NumpadLeft UP::
NumpadLeft UP::ReleaseLeft()
^NumpadRight UP::
NumpadRight UP::ReleaseRight()
;press down diagonal
^NumpadHome::
NumpadHome::PressUp() PressLeft()
^NumpadEnd::
NumpadEnd::PressDown() PressLeft()
^NumpadPgUp::
NumpadPgUp::PressUp() PressRight()
^NumpadPgDn::
NumpadPgDn::PressDown() PressRight()
;release diagonal
^NumpadHome UP::
NumpadHome UP::ReleaseUp() ReleaseLeft()
^NumpadEnd UP::
NumpadEnd UP::ReleaseDown() ReleaseLeft()
^NumpadPgUp UP::
NumpadPgUp UP::ReleaseUp() ReleaseRight()
^NumpadPgDn UP::
NumpadPgDn UP::ReleaseDown() ReleaseRight()
return
;functions to continuously run move functions while keys are pressed
PressUp() {
    global
    if (lastVertical = -1)
        return
    offDirection := ["Left", "", "Right"][lastHorizontal + 2]
    if (pressingDown || lastHorizontal != 0)
        SetTimer % "Move" . ["", "Down"][pressingDown + 1] . offDirection, Delete
    SetTimer % "MoveUp" . offDirection, 1
    lastVertical := -1, pressingUp := True
}

PressDown() {
    global
    if (lastVertical = 1)
        return
    offDirection := ["Left", "", "Right"][lastHorizontal + 2]
    if (pressingUp || lastHorizontal != 0)
        SetTimer % "Move" . ["", "Up"][pressingUp + 1] . offDirection, Delete
    SetTimer % "MoveDown" . offDirection, 1
    lastVertical := 1, pressingDown := True
}

PressLeft() {
    global
    if (lastHorizontal = -1)
        return
    offDirection := ["Up", "", "Down"][lastVertical + 2]
    if (pressingRight || lastVertical != 0)
        SetTimer % "Move" . offDirection . ["", "Right"][pressingRight + 1], Delete
    SetTimer % "Move" . offDirection . "Left", 1
    lastHorizontal := -1, pressingLeft := True
}

PressRight() {
    global
    if (lastHorizontal = 1)
        return
    offDirection := ["Up", "", "Down"][lastVertical + 2]
    if (pressingLeft || lastVertical != 0)
        SetTimer % "Move" . offDirection . ["", "Left"][pressingLeft + 1], Delete
    SetTimer % "Move" . offDirection . "Right", 1
    lastHorizontal := 1, pressingRight := True
}

ReleaseUp() {
    global
    lastVertical := pressingDown, pressingUp := False
    offDirection := ["Left", "", "Right"][lastHorizontal + 2]
    SetTimer % "MoveUp" . offDirection, Delete
    if (pressingDown || lastHorizontal != 0)
        SetTimer % "Move" . ["", "Down"][pressingDown + 1] . offDirection, 1
}

ReleaseDown() {
    global
    lastVertical := -pressingUp, pressingDown := False
    offDirection := ["Left", "", "Right"][lastHorizontal + 2]
    SetTimer % "MoveDown" . offDirection, Delete
    if (pressingUp || lastHorizontal != 0)
        SetTimer % "Move" . ["", "Up"][pressingUp + 1] . offDirection, 1
}

ReleaseLeft() {
    global
    lastHorizontal := pressingRight, pressingLeft := False
    offDirection := ["Up", "", "Down"][lastVertical + 2]
    SetTimer % "Move" . offDirection . "Left", Delete
    if (pressingRight || lastVertical != 0)
        SetTimer % "Move" . offDirection . ["", "Right"][pressingRight + 1], 1
}

ReleaseRight() {
    global
    lastHorizontal := -pressingLeft, pressingRight := False
    offDirection := ["Up", "", "Down"][lastVertical + 2]
    SetTimer % "Move" . offDirection . "Right", Delete
    if (pressingLeft || lastVertical != 0)
        SetTimer % "Move" . offDirection . ["", "Left"][pressingLeft + 1], 1
}

MoveLeft() {
    step := GetStep()
    MouseMove -step, 0, 0, R
}
MoveRight() {
    step := GetStep()
    MouseMove step, 0, 0, R
}
MoveUp() {
    step := GetStep()
    MouseMove 0, -step, 0, R
}
MoveDown() {
    step := GetStep()
    MouseMove 0, step, 0, R
}
MoveUpLeft() {
    step := GetStep()
    MouseMove -step, -step, 0, R
}
MoveUpRight() {
    step := GetStep()
    MouseMove step, -step, 0, R
}
MoveDownLeft() {
    step := GetStep()
    MouseMove -step, step, 0, R
}
MoveDownRight() {
    step := GetStep()
    MouseMove step, step, 0, R
}
GetStep() {
    global
    return GetKeyState("Ctrl", "P") ? varFastStep : varSlowStep
}

当 NumLock 停用时,鼠标键将被激活。

  • 数字键盘1-4,6-9:移动鼠标
  • Ctrl + 移动键:快速移动
  • 数字键盘5:左键单击(多次单击为双击、三击)
  • Win+数字键5:右键点击
  • 数字键盘0:按住左 MButton,释放数字键盘5
  • ScrollLock + 箭头:向任意方向滚动

视频演示在这里:https://youtu.be/dYjXPDM2xPQ

替代解决方案是https://github.com/uahnbu/mousekeys

相关内容