AutoHotkey Community

It is currently May 27th, 2012, 3:49 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Mapping the semicolon
PostPosted: November 8th, 2005, 5:09 am 
Tested with v1.0.40.05:

;::X ; doesn't work
`;::X ; doesn't work
X::; ; doesn't work
X::`; ; doesn't work
Semicolon::X ; doesn't work (this would be the easiest solution to implement)
X::Semicolon ; doesn't work
SC027::X ; this works but it isn't very intuitive
X::SC027 ; but this doesn't work

Previous thread: http://www.autohotkey.com/forum/viewtopic.php?t=3619


Report this post
Top
  
Reply with quote  
PostPosted: November 8th, 2005, 5:29 am 
Offline

Joined: September 25th, 2005, 4:31 pm
Posts: 610
Code:
`;::X


This works. Tested with AHk v1.0.40.05 on Windows XP SP2.

I characterized the other combinations:

    * <Shift> (aka, +) combinations produce wrong output
    * X produces wrong output in all cases

Code:
;`;::X      ; ; = X, +; = X, <Caps Lock>; = x
;sc027::X   ; ; = X, +; = X, <Caps Lock>; = x

;x::;      ; x = ;, +x = :, <Caps Lock>x = ;
;X::;      ; x = x, +x = :, <Caps Lock>x = X
x::sc027   ; x = ;, +x = :, <Caps Lock>x = ;


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 8th, 2005, 7:06 am 
Update: I got these to work after switching the default keyboard layout in the control panel.
x::`;
`;::x

There's a subtle bug that only happens when the current layout isn't also set as the default layout.

I'll try to post soon the steps to reproduce the problem.


Report this post
Top
  
Reply with quote  
PostPosted: November 8th, 2005, 2:02 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
Quote:
There's a subtle bug that only happens when the current layout isn't also set as the default layout.
If the script's keyboard layout doesn't match that of the active window, problems may occur with the Send command and Hotstrings. UPDATE: Hopefully this issue is no longer present in newer versions. If anyone has any trouble with it, please let me know.

shimanov wrote:
I characterized the other combinations:

    * <Shift> (aka, +) combinations produce wrong output
    * X produces wrong output in all cases
If you mean there's something that should be considered a bug, I could use more details. I tried the examples you gave and they seem to work as expected on my system (at least if you consider that each remapping is translated into a pair of Send {Blind} hotkeys as described on the remapping page). But maybe that approach is too simple/limited to cover all possible remappings.


Last edited by Chris on September 2nd, 2006, 4:58 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
PostPosted: November 8th, 2005, 10:02 pm 
Offline

Joined: September 25th, 2005, 4:31 pm
Posts: 610
Chris wrote:
If you mean there's something that should be considered a bug, I could use more details. I tried the examples you gave and they seem to work as expected on my system (at least if you consider that each remapping is translated into a pair of Send {Blind} hotkeys as described on the remapping page).


I have posted the code I tested with and the results for each input. For example:

Quote:
`;::X

press ;, and the output is X (uppercase)
press Shift and ;, and the output is X (uppercase)
toggle Caps Lock on then press ;, and the output is x (lowercase)


There is an apparent discrepancy between the way the semicolon is handled when the Shift is depressed simultaneously or the Caps Lock is toggled on.

Quote:
x::;

press x, and the output is ; (semicolon)
press Shift and x, and the output is : (colon)
toggle Caps Lock on then press x, and the output is ; (semicolon)


The problem here is the : (colon) output when pressing Shift and x.

Quote:
X::;
or
X::`;
or
X::sc027

press x, and the output is x (lowercase)
press Shift and x, and the output is : (colon)
toggle Caps Lock on then press x, and the output is X (uppercase)


Report this post
Top
 Profile  
Reply with quote  
PostPosted: November 9th, 2005, 2:04 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
shimanov wrote:
`;::X
...
press Shift and ;, and the output is X (uppercase)
...
I decided to have the program implement each remapping as a pair of hotkeys, which has its drawbacks. Within the limits of the design, I think the above is normal behavior.

Quote:
toggle Caps Lock on then press ;, and the output is x (lowercase)
I think this is normal if you read between the lines in Send {Blind}, which states, "{Blind} also causes SetStoreCapslockMode to be ignored". I know it's not well documented because someone would have to go from the remapping page to the Send page then to the SetStoreCapslockMode page, put all the pieces together, and only then might it become clear. However, the documentation is already long enough that people are discouraged from reading it, so it is my judgment that rare issues like this should not be explicitly documented (in this case, I think it's a rare issue because remapping to an uppercase character or to a punctuation character is somewhat unusual).

Although I think everything is explained by the limitations of the remapping feature, if you see something that still seems too misleading or incorrect, I can try to update the program or documentation.

Thanks.


Report this post
Top
 Profile  
Reply with quote  
PostPosted: November 9th, 2005, 10:23 pm 
Offline

Joined: September 25th, 2005, 4:31 pm
Posts: 610
Chris wrote:
I can try to update the program or documentation.


No. That will not be necessary.

This has not been an issue for me. The only reason I posted, was to explain or describe the apparent issues observed by Guest.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 10th, 2005, 3:26 pm 
You'd might want to update the FAQ so that it also mentions key-mapping.


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group