| View previous topic :: View next topic |
| Author |
Message |
ratsrcute
Joined: 28 May 2006 Posts: 44
|
Posted: Wed Jul 01, 2009 10:24 pm Post subject: Distinguishing alt-right and ctrl-alt-right |
|
|
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 |
|
| Back to top |
|
 |
MasterFocus
Joined: 08 Apr 2009 Posts: 3035 Location: Rio de Janeiro - RJ - Brasil
|
|
| Back to top |
|
 |
Guest
|
Posted: Thu Jul 02, 2009 3:03 am Post subject: |
|
|
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. |
|
| Back to top |
|
 |
Lexikos
Joined: 17 Oct 2006 Posts: 7295 Location: Australia
|
Posted: Thu Jul 02, 2009 11:05 am Post subject: |
|
|
| 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. |
|
| Back to top |
|
 |
ratsrcute
Joined: 28 May 2006 Posts: 44
|
Posted: Thu Jul 02, 2009 4:28 pm Post subject: |
|
|
| 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 |
|
| Back to top |
|
 |
jethrow
Joined: 24 May 2009 Posts: 1907 Location: Iowa, USA
|
Posted: Thu Jul 02, 2009 5:15 pm Post subject: |
|
|
| 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.  |
|
| Back to top |
|
 |
ratsrcute
Joined: 28 May 2006 Posts: 44
|
Posted: Thu Jul 02, 2009 9:47 pm Post subject: |
|
|
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 |
|
| Back to top |
|
 |
WHACKSTER
Joined: 23 Jun 2009 Posts: 16
|
Posted: Thu Jul 02, 2009 10:08 pm Post subject: |
|
|
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. |
|
| Back to top |
|
 |
|