remapping right click and drag as xbutton1 click and drag

强颜欢笑 提交于 2019-12-11 19:12:20

问题


I want to remap right click and drag as XButton1 click and drag. This is what I tried:

RButtonclickdrag::XButton1clickdrag

I think I don't have the correct commands but I have searched a lot and not found anything else. Could somebody please give me some help?

Thanks, Ellen


回答1:


Here is a way to do this. Let me know if this suits your needs. The time is set to 100 ms.

#SingleInstance Force
#installKeybdHook
#Persistent

#ifWinActive ahk_class CorelDRAW 15.2
    $RButton::
        Sleep, 100
        GetKeyState, KeyState, RButton, p
        if KeyState = U
        {
            ;ToolTip, Short Press ; Activate to test behaviour
            Send, {RButton}
            Return
        }
        ;ToolTip, Long Press Started ; Activate to test behaviour
        sendmessage,0x111,0x1991d,0 ;pan one-shot
        MouseClick,L,,,1,0,D
        KeyWait, RButton
        ;ToolTip, Long Press Ended ; Activate to test behaviour
        MouseClick,L,,,1,0,U
    Return
#ifwinactive 


来源:https://stackoverflow.com/questions/15413471/remapping-right-click-and-drag-as-xbutton1-click-and-drag

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!