| View previous topic :: View next topic |
| Author |
Message |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10465
|
Posted: Fri Oct 01, 2004 2:34 pm Post subject: AltGr detection |
|
|
Hülyesamu asked here if it is possible to distinguish between AltGr and Ctrl+Alt. If so, it would allow AltGr hotkeys to be independent of Ctrl+Alt, which might provide a greater quantity of easier-to-reach hotkeys for some users.
At first I thought I'd have to change the program to detect AltGr, but it now seems this is not necessary, at least for hotkeys. To make an AltGr hotkey, the following seems to work on Windows NT/2000/XP:
<^>!m::MsgBox You pressed AltGr+m.
^!m::MsgBox You pressed Ctrl+Alt+m
The above relies on the fact that AltGr causes left-control (<^) and right-alt (>!) to be physically pressed down together.
If anyone else has an interest in this, perhaps you could try out the two lines above and share your findings here. If it works on most layouts and keyboards, I'll update the documentation to mention it. |
|
| Back to top |
|
 |
BoBo Guest
|
Posted: Fri Oct 01, 2004 4:16 pm Post subject: |
|
|
The above code/hotkey(s) have worked fine with a German keyboard (layout)
 |
|
| Back to top |
|
 |
Hülyesamu
Joined: 24 Sep 2004 Posts: 17
|
Posted: Fri Oct 01, 2004 10:30 pm Post subject: |
|
|
I foud it a great idea, and I managed to simplify it by one character
since the AltGr is the right Alt, and it acts as an Ctrl+Alt, to make the AltGr signal You can press both the right or the Left Ctrl:
| Code: | ^>!m::MsgBox You pressed AltGr+m.
^!m::MsgBox You pressed Ctrl+Alt+m |
And I have foud something interesting feature of the Autohotkeys: I use A4tech mice and keyboards, and there was a stupid problems with theese -otherwise excellent- peripherals: On more models, under both 2000 and XP, sometimes the Numpad+ stopped to work and after a while accidentally it started to work normally. Now I became to able to uninstall the keyboard driver, and I plan to uninstall the mouse driver too, and Autohotkey wiil act as the driver for them. Untill now, Autohotkey replaced 3 programs (being the 3rd the apostrophed 'Hotkeys'). |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10465
|
Posted: Fri Oct 01, 2004 10:47 pm Post subject: |
|
|
| Quote: | | Autohotkey wiil act as the driver for them | That's nice. I was able to do something similar: I have a favorite mouse that sends bad "bounce" clicks sometimes. By checking the timing between clicks, I was able to filter out the bad clicks and "fix" the mouse. |
|
| Back to top |
|
 |
Hülyesamu
Joined: 24 Sep 2004 Posts: 17
|
Posted: Fri Oct 01, 2004 11:24 pm Post subject: |
|
|
| I am plannig some more interesting thing: I've decided to buy a mouse with 8 buttons, and use 3 button the normal way, while the other 5 will be used for reaching menus, based on Rajat' excellent ToolTip Mouse Menu, although simplified extensively. My script has only 30 lines. |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10465
|
Posted: Sat Oct 02, 2004 1:23 pm Post subject: |
|
|
| Since I believe the OS only supports 5 mouse buttons, you may have to rely on the software that came with your mouse to assign actions to the other 3 buttons. For example, you might be able to configure those buttons to send keystrokes, and those keystrokes could be detected by a script as hotkey presses. |
|
| Back to top |
|
 |
|