hotkeys - how to toggle keyboard mapping in AutoHotKey -



hotkeys - how to toggle keyboard mapping in AutoHotKey -

i map part of keyboard number pad:(my laptop keyboard has no number pad)

j->1 k->2 l->3 u->4 i->5 o->6

i toggle mapping short cut, let's control+alt+m, code below, however, don't know how reset mapping:

mode = 0 ^!m:: if (mode = 1) { mode = 0 j->1 k->2 l->3 u->4 i->5 o->6 } else { mode = 1 u::u ;got error here: duplicate hotkey } homecoming

i got duplicate hotkey error u::u, seems ahk not allow mapping more 1 key in script. getkeystate("numlock", "p") not work because have no numlock.

i able accomplish code:

^!m:: suspend u::4 i::5 o::6 homecoming

but toggle entire script, apparently not good. improve solution this.

if run akh_l (e.g. autohotkey v1.1.10.01), can utilize #if statement command hotkeys (like command hotkeys on application level #ifwinactive).

mode := 0 ^!m:: mode:=!mode ;not! toggle homecoming #if mode ; hotkeys below line work if mode true j::1 k::2 l::3 u::4 i::5 o::6 #if

autohotkey hotkeys

Comments

Popular posts from this blog

model view controller - MVC Rails Planning -

html - Submenu setup with jquery and effect 'fold' -

ruby on rails - Devise Logout Error in RoR -