AutoHotkey Community

It is currently May 26th, 2012, 9:08 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: July 1st, 2009, 11:24 pm 
Offline

Joined: May 28th, 2006, 1:48 am
Posts: 46
I have a script in which alt-right is a hotkey. I define it via

Alt & Right::
---stuff---

This seems to be grabbing ctrl-alt-right events. Another program called DOORS defines ctrl-alt-right and pressing ctrl-alt-right while in DOORS has no effect. I tried to define ctrl-alt-right as another hotkey, but Autohotkey seemed to ignore it.

Thanks for the help,
Mike


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 2nd, 2009, 3:24 am 
Offline

Joined: April 8th, 2009, 8:23 pm
Posts: 3036
Location: Rio de Janeiro - RJ - Brasil
Read this: http://www.autohotkey.com/docs/Hotkeys.htm#Symbols

Code:
; ! is ALT
!Right::
  ; do stuff
return

_________________
"Read the manual. Read it again. Search the forum.
Try something before asking. Show what you've tried.
"
Image
Antonio França
My stuff: Google Profile


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 2nd, 2009, 4:03 am 
MasterFocus wrote:
Read this: http://www.autohotkey.com/docs/Hotkeys.htm#Symbols

Code:
; ! is ALT
!Right::
  ; do stuff
return


I'm not sure what that has to do with my question. The "Alt & Right" form does work. Does that have something to do with Alt-Right "stealing" Ctrl-Alt-Right? I scanned the page you refer to but not easy to see anything relevant.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: July 2nd, 2009, 12:05 pm 
Offline

Joined: October 17th, 2006, 4:15 pm
Posts: 7502
Location: Australia
Anonymous wrote:
I'm not sure what that has to do with my question.
In the time it took you to post, you could've tried the script and seen that !Right triggers only on Alt-Right, not on Ctrl-Alt-Right or any other combination of modifiers.

I suppose custom combinations (prefix_key & other_key) are so called because they are meant for use with custom prefix keys, not so much for the standard modifier keys.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 2nd, 2009, 5:28 pm 
Offline

Joined: May 28th, 2006, 1:48 am
Posts: 46
Lexikos wrote:
Anonymous wrote:
I'm not sure what that has to do with my question.
In the time it took you to post, you could've tried the script and seen that !Right triggers only on Alt-Right, not on Ctrl-Alt-Right or any other combination of modifiers.

I suppose custom combinations (prefix_key & other_key) are so called because they are meant for use with custom prefix keys, not so much for the standard modifier keys.


I understand your frustration that I didn't just "try it", but hear me out. I'm looking for documentation and principles here. If there is some special behavior to "Alt & Right" I want to see that documented or described directly. Different programmers have different philosophies regarding debugging---for some it is sufficient to "just try something" and be happy it works. For others, it is important to have a substantial proof of the correctness of their programs. I tend to operate in the latter mode by habit, because my day job is programming robotic spacecraft. We don't just try things and hope they work. Now, this situation is not so critical, but it's still in my personality to look for documentation and principle.

I'm still hoping for an explanation. Is there some reason that Alt & Right "steals" Ctrl-Alt-Right? Is this by design?

Thanks,
Mike


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 2nd, 2009, 6:15 pm 
Offline
User avatar

Joined: May 24th, 2009, 5:35 am
Posts: 2099
Location: Iowa, USA
Quote:
I'm looking for documentation and principles here.
I believe this can be found here: http://www.autohotkey.com/docs/Hotkeys.htm

Examine the following concepts:
modifier symbols
custom combination of two keys

Code:
Alt & Right::
---stuff---
In this example, Alt is being used as a key, and therefore this Hotkey should execute every time Alt and Right are pressed together.

Code:
; ! is ALT
!Right::
  ; do stuff
return
In this example, Alt is being used as a modifier. Therefore, pressing Ctrl+Alt+Right should not trigger your AHK Hotkey because more modifiers are being used.

Hopefully that makes sense. :D


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 2nd, 2009, 10:47 pm 
Offline

Joined: May 28th, 2006, 1:48 am
Posts: 46
Thanks for the explanation. There seems to be something else going on, however. My keyboard seems incapble of generating Ctrl+Alt+Right, never mind AutoHotkey. If I exit my AHK script, then go into this program (DOORS) and type Ctrl+Alt+Right I still get nothing. It's a Goldtouch keyboard (split style) by a company called Ovation. This may not be an AutoHotkey question any more, but can someone explain to me how to go about debugging this? Do certain keyboards behave like this, or might this be an issue in the OS?

I also don't get any response from AHK when I define !^Right.

However something like !^s works fine.

Thanks,
Mike


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 2nd, 2009, 11:08 pm 
Offline

Joined: June 23rd, 2009, 11:43 pm
Posts: 16
Yes it is possible for some key combinations not to work for certain keyboards because of their matrix.

Try the script with a different keyboard to be sure, I think there is a way to solve this issue but it involves soldering some diodes.


Report this post
Top
 Profile  
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: Bing [Bot], BrandonHotkey, Exabot [Bot], krajan, patgenn123, Yahoo [Bot] and 61 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