Skip to content

Instantly share code, notes, and snippets.

@yoonbae81
Created April 19, 2020 04:22
Show Gist options
  • Save yoonbae81/3011c74bdb486487fec90e45ebb00891 to your computer and use it in GitHub Desktop.
Save yoonbae81/3011c74bdb486487fec90e45ebb00891 to your computer and use it in GitHub Desktop.
마우스 휠버튼 활용하기 (브라우저 뒤로가기, 탭 닫기)
MButton::
if (A_ThisHotkey = A_PriorHotkey and A_TimeSincePriorHotkey < 200)
Send, ^w
else
Send, {Browser_Back}
Return
@yoonbae81
Copy link
Author

yoonbae81 commented Apr 19, 2020

사용법

※ 마우스에 버튼 2개와 휠만 있는 경우에 유용할 수 있습니다.

마우스에 좌클릭, 우클릭 외에 휠버튼으로 중간버튼 클릭이 있습니다.
사실 중간버튼 클릭 본연의 기능은 자주 사용하지 않으실텐데,
AutoHotKey를 이용해서 마우스 휠버튼(=중간버튼) 활용도를 높이고자 합니다.

아래의 절차대로 따라하시면 마우스 휠버튼으로 두가지 기능을 하실 수 있습니다.

  • 마우스 휠버튼 클릭시 뒤로가기,
  • 마우스 휠버튼 더블클릭시 탭닫기(Ctrl+W)

절차

  1. AutoHotKey 설치
  2. 저장 : 본문의 MButton.ahk을 바탕화면 등에 저장
  3. 컴파일 : C:\Program Files\AutoHotkey\Compiler\Ahk2Exe.exe 실행 후 MButton.ahk를 MButton.exe로 컴파일
  4. 부팅시 자동실행 : C:\Users\%USERNAME%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup 폴더에 MButton.exe 복사

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment