Skip to content

Instantly share code, notes, and snippets.

@xodhx4
Created February 27, 2020 14:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xodhx4/5d8e8fd4d8b764e1b5f4e71a881b041d to your computer and use it in GitHub Desktop.
Save xodhx4/5d8e8fd4d8b764e1b5f4e71a881b041d to your computer and use it in GitHub Desktop.
[Autohotkey 스크립트]
!h:: SendInput,{LEFT}
!j:: SendInput,{DOWN}
!k:: SendInput,{UP}
!l:: SendInput,{RIGHT}
LCtrl::Capslock
Capslock::LCtrl
; Tab을 한 번 누르면 esc 후 무조건 영어로
; Tab이 더블클릭되면 원래처럼 Tab
; https://autohotkey.com/board/topic/96752-need-help-with-a-double-tap-function/
$Tab::
if winc_presses > 0
{
winc_presses += 1
Return
}
winc_presses = 1
SetTimer, TheKey, 250 ;change 250 to a lower number to decrease the amount of time it waits to receive 2 twice in a row
Return
TheKey:
SetTimer, TheKey, off
if winc_presses = 1
{
sendInput, {Esc}
Absolute_Eng()
}
Else if winc_presses = 2
{
send, {Tab}
}
winc_presses = 0
Return
;<--------------------------------------------- 한영전환 스크립트 내용 --------------------------------------------->
; http://www.autohotkey.co.kr/cgi/board.php?bo_table=script&wr_id=357#c_724
Toggle_IME()
{
Send, {vk15sc138}
}
IME_CHECK(WinTitle)
{
WinGet,hWnd,ID,%WinTitle%
Return Send_ImeControl(ImmGetDefaultIMEWnd(hWnd),0x005,"")
}
Send_ImeControl(DefaultIMEWnd, wParam, lParam)
{
DetectSave := A_DetectHiddenWindows
DetectHiddenWindows,ON
SendMessage 0x283, wParam,lParam,,ahk_id %DefaultIMEWnd%
if (DetectSave <> A_DetectHiddenWindows)
DetectHiddenWindows,%DetectSave%
return ErrorLevel
}
ImmGetDefaultIMEWnd(hWnd)
{
return DllCall("imm32\ImmGetDefaultIMEWnd", Uint,hWnd, Uint)
}
Absolute_Eng()
{
ret := IME_CHECK("A")
if %ret% <> 0
{
Send, {vk15sc138}
}
}
;!vk15sc1F2:: ; I want Alt-[Eng/Han] key to be"Absolutely Hangul(Korean)" mode key. I hate toggling :(
; ret := IME_CHECK("A")
; if %ret% = 0 ; 0 means IME isin English mode now.
; {
; Send, {vk15sc138} ; Turn IME into Hangul(Korean) mode.
; }
;return
;^vk15sc1F2:: ; I want Ctrl-[Eng/Han] key to be"Absolutely English" mode key. I hate toggling :(
; ret := IME_CHECK("A")
; if %ret% <> 0 ; 1 means IME isin Hangul(Korean) mode now.
; {
; Send, {vk15sc138} ; Turn IME into English mode.
; }
;return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment