AHK 将鼠标中键重新映射到其他东西

时间:2021-07-19 12:50:15

标签: autohotkey blender remap

经过一个月的反复试验,我终于找到了解决方案!

如何重新映射鼠标中键? 如果你没有三键鼠标,这是搅拌机(尤其是笔记本电脑)的必备品

我知道首选项>>输入中的“模拟 3 键鼠标”。 但是,如果您选中该选项,则将无法“选择循环” 使用 ALT leftClick。

如果您可以将 Mbutton 重新映射到您很少使用的任何其他键会怎样? 是的,你可以!

2 个答案:

答案 0 :(得分:1)

很高兴看到您亲自尝试过。
但这里是上下文敏感的重映射实际是如何完成的:

#IfWinActive ahk_class GHOST_WindowClass
LWin::MButton
#IfWinActive

答案 1 :(得分:0)

此脚本将允许您使用其他键(例如 LeftWin)重新映射 Mbutton。

;~--------------------------------------------------------------------------------------

#IfWinActive ahk_class GHOST_WindowClass ;      Blender's class
$LWin::   ;                                     "$" this allows to send the trigger key in a working script***
loop
{
   if getkeystate("LWin", "p")           ;      if a button is Physically held down by the user.
    {
      send, {MButton DOWN}
    }
  else
    {
      send, {MButton UP}
      ;~ MsgBox, Blender is active       ;      You dont need this.
      return
    }
}
#IfWinNotActive ahk_class GHOST_WindowClass ;   Other than blender (I'm aware of other methods, but this works for me!)
Send, {LWin}                            ; ***   like here I'm able to use Left Win again without triggering the script.
;~ MsgBox,Blender isnt active ;;                You dont need this.
return


;~ --------------------------------------------------------------------------------------
相关问题