| View previous topic :: View next topic |
| Author |
Message |
Avimelech Guest
|
Posted: Thu Nov 08, 2007 11:36 pm Post subject: Cursor keys mapping not rock solid |
|
|
I like to remap Alt+IJKL to the cursor keys so I don't have to leave the home keys for cursoring. But sometimes my AHK script leaves stray i,j,k or l letters in the text where I'm moving around in most apps. Is there some way to insure that when the ALT key is pressed I wont ever get a letter output?
| Code: | !i::Send {up}
!j::Send {left}
!k::Send {down}
!l::Send {right}
|
|
|
| Back to top |
|
 |
Lexikos
Joined: 17 Oct 2006 Posts: 2472 Location: Australia, Qld
|
Posted: Fri Nov 09, 2007 12:52 am Post subject: |
|
|
| Sometimes hotkeys using RegisterHotkey (the default method where possible) require you to release and re-press the modifier key after triggering the hotkey. It might help to specify the #UseHook directive before the hotkeys.This tells AutoHotkey to use the keyboard hook for the hotkeys instead of RegisterHotkey. The keyboard hook is generally more reliable, but is not supported on Win9x. |
|
| Back to top |
|
 |
Avimelech Guest
|
Posted: Fri Nov 09, 2007 1:38 am Post subject: |
|
|
Thanks for the reply. Well that gives different results indeed. I now can get Ctrl+K instead of "k" generated (if I hold Alt+K down to cursor down in Firefox, for example).
Is there anything else to try? |
|
| Back to top |
|
 |
Lexikos
Joined: 17 Oct 2006 Posts: 2472 Location: Australia, Qld
|
Posted: Fri Nov 09, 2007 1:44 am Post subject: |
|
|
| Avimelech wrote: | | I now can get Ctrl+K instead of "k" generated (if I hold Alt+K down to cursor down in Firefox, for example). | What do you mean by "get Ctrl+K"? I get perfect results in Firefox, with or without #UseHook. |
|
| Back to top |
|
 |
Avimelech Guest
|
Posted: Fri Nov 09, 2007 3:00 am Post subject: |
|
|
| I mean the Ctrl+K hotkey fires putting focus on the search field. |
|
| Back to top |
|
 |
Lexikos
Joined: 17 Oct 2006 Posts: 2472 Location: Australia, Qld
|
Posted: Fri Nov 09, 2007 7:32 am Post subject: |
|
|
Since the keyboard hook would block the 'k' key-press, that seems impossible to me...
Which version of Windows are you on? I've used AutoHotkey for a while on XP and Vista, and have not seen this behaviour. Also, I assume you have the latest version of AutoHotkey, v1.0.47.04? |
|
| Back to top |
|
 |
Avimelech Guest
|
Posted: Fri Nov 09, 2007 5:36 pm Post subject: |
|
|
Windows XP SP2, yes latest AHK
Maybe it's the FF keyconfig addon. I'll try removing it |
|
| Back to top |
|
 |
maum8155 Guest
|
Posted: Sat Nov 10, 2007 3:20 pm Post subject: Remapping problem |
|
|
I also have same problem on my XP, especially at wordprocess.
Try this.
| Code: |
^j::Sendplay, {Up}
^k::Sendplay, {Down}
^l::Sendplay, {Right}
^j::Sendplay, {Left}
|
at least, not leaves stray i,j,k or l
But other problem will happen.
Sometimes, caret will slip.
I don't know why.  |
|
| Back to top |
|
 |
Avimelech Guest
|
Posted: Sun Nov 11, 2007 5:43 pm Post subject: |
|
|
| No that had no difference. I get strange results with UseHook but even without in more than one app I get stray keys. Is there anything else to try? Or are there alternatives to AutoHotKey that might work better for this. |
|
| Back to top |
|
 |
Avimelech Guest
|
Posted: Sun Nov 11, 2007 7:41 pm Post subject: |
|
|
| @maum: thank you, that fixed it for me. I have not seen this caret issue you are talking about yet in OpenOffice Writer or Delphi 2006 or Firefox so I'm a happy camper |
|
| Back to top |
|
 |
Joy2DWorld
Joined: 04 Dec 2006 Posts: 404 Location: Galil, Israel
|
Posted: Sun Nov 11, 2007 10:35 pm Post subject: |
|
|
Avimelech wrote: | Quote: | | I now can get Ctrl+K instead of "k" generated (if I hold Alt+K down to cursor down in Firefox, for example). |
Indeed!!... a PROBLEM raised also...here:
http://www.autohotkey.com/forum/viewtopic.php?t=22378
lexikos contributed to finding a solution, and there *is* a simple fix for the AHK code (see above thread), and maybe will be incorporated into a/the general release version ?
Maybe (?) we should start a 'pre-development' common distribution of version AHK with this and about 6 other fixes ?
Seems Chris is very busy, and maybe helping with actual AHK code fixes is actually helpful (?)
anyhow, _________________ Joyce Jamce |
|
| Back to top |
|
 |
|