Hi,
I'm new to autohotkeys, and i want to do remapping.
I want my spacebar to be LCtrl, unless if i press tab (until i press enter, then spacebar becomes LCtrl again).
Here is the code :
space::
Send {LCtrl down}
KeyWait space
Send {LCtrl up}
tab::
Hotkey, space, off
KeyWait enter, D
Hotkey, space, on
return
I think the problem is the structure, but I don't know how to do :(
Simple remapping script
Started by
Evo
, Apr 21 2012 11:50 PM
2 replies to this topic
#1
Evo
Posted 21 April 2012 - 11:50 PM
#2
Posted 22 April 2012 - 01:52 AM
You state that there is a problem, but you don't describe the problem.
Please edscribe the problem.
Your script appears to work just as your describe.
It would be better if there were a 'return' after the 2nd 'send'
When you hit tab, the script waits indefinitely until {enter} is pressed.
Is that what you want ?
Please edscribe the problem.
Your script appears to work just as your describe.
It would be better if there were a 'return' after the 2nd 'send'
When you hit tab, the script waits indefinitely until {enter} is pressed.
Is that what you want ?
#3
Guests
Posted 22 April 2012 - 05:24 AM
ho god...
The missing return you said was the problem... the hotkey wasn't working fine (when i pressed enter without tab, the spacebar still became LCtrl), but now it's perfect!
Thank you dude! :)
The missing return you said was the problem... the hotkey wasn't working fine (when i pressed enter without tab, the spacebar still became LCtrl), but now it's perfect!
Thank you dude! :)




