TheChill Posted September 26, 2018 Share Posted September 26, 2018 Is it possible to bind a key so that it fires off one keystroke when it is held for some duration, but fires off a different keystroke if it is simply tapped? If it is possible, how would it be implemented? Link to comment Share on other sites More sharing options...
hastegag Posted September 29, 2018 Share Posted September 29, 2018 not yet, not sure this is planned either. AHK (AutoHotKey) can do it for you. What I use in Photoshop to use the bottom macro keys like a more blunt instrument set of arrowkeys, is basically what you described I think. In the below, a function dates a 'rate', a higher amount and a lower and a keypress to repeat, but you could use a similar approach of determining how long it has been since the same key was pressed to do something completely different functionalizedRepeater(rate:=300,amountFull:=32,amountLesser:=8,keyPressedToRepeat:="Up") { if (A_TimeSincePriorHotkey < rate && (A_PriorHotkey = A_ThisHotkey)) { Send ^+{%keyPressedToRepeat% %amountFull%} } else { ;this is where you could do somethign entirely different...this is just for example Send ^+{%keyPressedToRepeat% %amountLesser%} } return } ^SC0D2:: ;Control G18 for me, your hotkey above could be any keyboard key like a or b or whatever profile := getCurProfile() if(profile == "Photoshop"){ functionalizedRepeater(300,32,8,"Right") } return Link to comment Share on other sites More sharing options...
Recommended Posts