Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Requires AutoHotkey v2.0+
- ; Caps remaps
- *CapsLock::double_tap_caps(), KeyWait('Capslock')
- #HotIf GetKeyState('CapsLock', 'P')
- *i::Up
- *j::Left
- *k::Down
- *l::Right
- *u::PgUp
- *o::PgDn
- *,::Home
- *.::End
- *;::Delete
- *'::BackSpace
- *a::Shift
- *s::Control
- *d::Alt
- */::Escape
- *LButton::spam('LButton', 'LButton')
- spam(hold_key, send_key) {
- static click_pause := 20
- start()
- return
- start() {
- if !GetKeyState(hold_key, 'P')
- return
- SendInput('{' send_key '}')
- SetTimer(start, -click_pause)
- }
- }
- $F4::window_borderless_fullscreen()
- #HotIf
- window_borderless_fullscreen() {
- WS_CAPTION := 0xC00000
- try {
- id := WinActive('A')
- if (WinGetStyle(id) & WS_CAPTION)
- WinSetStyle('-' WS_CAPTION, id)
- ,WinMaximize(id)
- else WinSetStyle('+' WS_CAPTION, id)
- ,WinRestore(id)
- }
- }
- class double_tap_caps {
- static __New() => SetCapsLockState('AlwaysOff')
- static call() {
- static last := 0
- if (A_TickCount - last < 175)
- last := 0
- ,this.toggle_caps()
- else last := A_TickCount
- }
- static toggle_caps() {
- state := GetKeyState('CapsLock', 'T') ? 'Off' : 'On'
- SetCapsLockState('Always' state)
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement