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 

Remap shift problem

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



Joined: 13 Jun 2005
Posts: 2

PostPosted: Mon Jun 13, 2005 11:29 pm    Post subject: Remap shift problem Reply with quote

I have searched the forum and read the docs, but still must have missed something fundamental. When remapping shift to space and then remap shifted characters with

Code:
space::send {shift down}
space up::send {shift up}
+q::send b


pressing space (which should now act as shift) and 'q' results in a capital 'B' instead of lower-case 'b' (the ordinary shift-key acts as it is supposed to, that is shift and 'q' results in lower-case 'b'). How do I remap shift properly so that it acts exactly as the shift-keys do?
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10480

PostPosted: Tue Jun 14, 2005 12:09 pm    Post subject: Reply with quote

This is by design even though it causes undesirable behavior in this case. The reason it does this is that the program assumes that when you do Send {Shift down} that you want it to stay down for each subsequent Send command.

There is a more pure remapping feature planned for the future that might solve this. The syntax might be something like Space::Shift (where Space becomes the Shift key). Until then, one work-around is to change your hotkey(s) to release shift prior to sending:

+q::send {Shift up}b

This might produce other side effects, which in turn might have other work-arounds if needed.
Back to top
View user's profile Send private message Send e-mail
Guest






PostPosted: Wed Jun 15, 2005 10:48 pm    Post subject: Reply with quote

Hmmm, strange design decision. Considering shift's current behavior, it seems more logical and consistent to think the opposite way. That is, when sending shift down you would expect the same behavior as if the real shift is held down - not to modify an existent statement against the scriptwriters explicit intention. Holding real shift down after

+a::send q

and pressing 'a' will produce 'q' as expected. That's logical (I thought that was one of the main purposes of the + prefix). Now, after a send {shift down}, pressing 'a' produces a capital 'Q' on the contrary of shift’s behavior and despite the fact that I explicitly stated that key combination to produce a 'q'. This feels unlogical and inconsistent. The very purpose of remapping is to control the exact behavior of a key press including the modifiers. Am I thinking wrong here? What is the advantage of this approach?
Back to top
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10480

PostPosted: Wed Jun 15, 2005 11:07 pm    Post subject: Reply with quote

Quote:
The very purpose of remapping is to control the exact behavior of a key press including the modifiers. Am I thinking wrong here? What is the advantage of this approach?
The advantage is that the shift key can be pushed and held down for other Send commands that come later. Changing this behavior would definitely break existing scripts.

The reason for this design is that remapping is only one of AutoHotkey's features (one for which improvements are planned, as I mentioned above). The other competing feature in this case is the ability to send keystrokes with high flexibility.
Back to top
View user's profile Send private message Send e-mail
Guest






PostPosted: Thu Jun 16, 2005 12:23 am    Post subject: Reply with quote

Ok, I get it. Hope I didn't sound too critical. AutoHotkey is a truly great application! Would be great if the remapping feature mentioned was implemented also of course. Thanks for the answer!
Back to top
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