AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

ctrl key remap dilemma

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
jamestr



Joined: 05 Apr 2004
Posts: 96
Location: Connecticut USA

PostPosted: Wed Jul 12, 2006 9:42 pm    Post subject: ctrl key remap dilemma Reply with quote

i have remapped the Lctrl key to the spacebar. i find the spacebar to be a handy location for the ctrl key.

But the remapped spacebar doesnt work the same way as using the 'real' control key.
Code:
space::ctrl
^s::send {7}

When i holddown the hotkey(spacebar and s), ahk outputs a 7 followed by multiple 's' characters.

ie. '7sssssssssss'

But

if i holddown the 'real' control key and 's' ahk auto-repeats '77777777' (which i think is correct)

is there a way to make 'space::ctrl' behave the same as the real control key?

thanks
Back to top
View user's profile Send private message
garath



Joined: 24 Mar 2005
Posts: 372
Location: germany

PostPosted: Thu Jul 13, 2006 7:11 pm    Post subject: Reply with quote

Code:
space::ctrl
^s::send {ctrl up}7{ctrl down}

*not tested

the problem with your code is, that control was still pressed down, you have to release it first, before you can push the "7"
Back to top
View user's profile Send private message
d-man



Joined: 08 Jun 2006
Posts: 247

PostPosted: Thu Jul 13, 2006 7:23 pm    Post subject: Reply with quote

to OP: I tried several diff ways & couldn’t get this to work, sry.
Back to top
View user's profile Send private message
jamestr



Joined: 05 Apr 2004
Posts: 96
Location: Connecticut USA

PostPosted: Fri Jul 14, 2006 6:27 pm    Post subject: Reply with quote

garath wrote:
Code:
space::ctrl
^s::send {ctrl up}7{ctrl down}

*not tested

the problem with your code is, that control was still pressed down, you have to release it first, before you can push the "7"


thanks garath, that works.

i had tried ^s::send {ctrl up}7

but i did not realize the need for the last 'ctrl down'
Back to top
View user's profile Send private message
garath



Joined: 24 Mar 2005
Posts: 372
Location: germany

PostPosted: Fri Jul 14, 2006 9:44 pm    Post subject: Reply with quote

If you relaese the "space" Button, a "ctrl up" will be sent. You want to use the space as ctrl, so you have to push "ctrl down" again, if you need the ctrl button for other reasons. In this special case, it would work without it. I dont know, if you need the ctrl for other cases.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group