Skip to content

Instantly share code, notes, and snippets.

@onriv
Last active February 18, 2017 03:57
Show Gist options
  • Save onriv/049b912c6ddb330373a33130ccfeff8a to your computer and use it in GitHub Desktop.
Save onriv/049b912c6ddb330373a33130ccfeff8a to your computer and use it in GitHub Desktop.
poker.ahk
; version 0.0.1
; author chen shanghe
;
; this script is used for simulation the poker keyboard
; use capslock as fn
*Capslock::
caps := "on"
KeyWait, Capslock ; wait until the Capslock button is released
caps := ""
Return
#If caps = "on"
; self-defined direction keys
*h::Send {Blind}{Left}
*j::Send {Blind}{Down}
*k::Send {Blind}{Up}
; there is a bug in here, when push down capslock + winkey + l
; it locks windows
*l::Send {Blind}{Right}
; default direction keys used by poker
*a::Send {Blind}{Left}
*s::Send {Blind}{Down}
*w::Send {Blind}{Up}
*d::Send {Blind}{Right}
; fn + x is appskey
*x::Send {Blind}{AppsKey}
; fn + y is calc
*y::Run, calc
*e::Run, everything
; fn + n/m/<
; TODO
; fn + i is insert
*i::Send {Blind}{Insert}
; fn + ; is home
*;::Send {Blind}{Home}
; fn + . is end
*.::send {Blind}{End}
; fn + p[]
*p::send {Blind}{PrintScreen}
; TODO
; fn + backspace
*BackSpace::Send {Blind}{Delete}
*'::Send {Blind}{PgUp}
*/::Send {Blind}{PgDn}
; default f1 to f12
*1::Send {Blind}{F1}
*2::Send {Blind}{F2}
*3::Send {Blind}{F3}
*4::Send {Blind}{F4}
*5::Send {Blind}{F5}
*6::Send {Blind}{F6}
*7::Send {Blind}{F7}
*8::Send {Blind}{F8}
*9::Send {Blind}{F9}
*0::Send {Blind}{F10}
*-::Send {Blind}{F11}
*=::Send {Blind}{F12}
esc::`
#If ; end context-sensitive block
#If caps <> "on"
`::esc
#If
@onriv
Copy link
Author

onriv commented Feb 12, 2017

An AutoHotKey script used to simulate the ikbc poker keyboard.

CapsLock is used as the Fn key and the keyboard layout with Capslock pressed down is as followed.

keyboard-layout 1

Remark:

  • CapsLock + h/j/k/l are not standard aliases in poker.
  • CapsLock + e is a shortcut for everything, which is not the standard alias in poker.

Limitation:

  • Since win + l is for locking windows, capslock + win + l does not a shortcut for win + left.

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