Autohotkey - Send Left control on long press otherwise send Enter -


here script. capslock mapped send left control on long press,otherwise send escape. working expected.

setcapslockstate, alwaysoff capslock::     send {lcontrol down}     keywait, capslock     send {lcontrol up}     if ( a_priorkey = "capslock" ){         send {esc}     }     return  ; send left control when long pressed, otherwise behave normal enter key enter::                     send {lcontrol down}     keywait, enter, t5     send {lcontrol up}      if ( a_priorkey = "enter" ){         send {enter}     }     return 

however enter key not waiting long press, timing out quickly.this not expectation. should behave above snippet

if i'm understanding issue correctly, should require:

enter::  sendinput, {lctrl down} sleep, 100 keywait, enter sendinput, {lctrl up} if ( a_priorkey = "enter" ){     send {enter} } return 

also, assume have catch @ end pass through single enter keystroke. if isn't case, , you're wanting pass through of them (while enter held down), following accomplish that.

~enter::  sendinput, {lctrl down} sleep, 100 keywait, enter sendinput, {lctrl up} return 

Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -