AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Cursor keys mapping not rock solid

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
Avimelech
Guest





PostPosted: Thu Nov 08, 2007 11:36 pm    Post subject: Cursor keys mapping not rock solid Reply with quote

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

PostPosted: Fri Nov 09, 2007 12:52 am    Post subject: Reply with quote

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.
Code:
#UseHook
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
View user's profile Send private message
Avimelech
Guest





PostPosted: Fri Nov 09, 2007 1:38 am    Post subject: Reply with quote

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

PostPosted: Fri Nov 09, 2007 1:44 am    Post subject: Reply with quote

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
View user's profile Send private message
Avimelech
Guest





PostPosted: Fri Nov 09, 2007 3:00 am    Post subject: Reply with quote

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

PostPosted: Fri Nov 09, 2007 7:32 am    Post subject: Reply with quote

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
View user's profile Send private message
Avimelech
Guest





PostPosted: Fri Nov 09, 2007 5:36 pm    Post subject: Reply with quote

Windows XP SP2, yes latest AHK

Maybe it's the FF keyconfig addon. I'll try removing it
Back to top
maum8155
Guest





PostPosted: Sat Nov 10, 2007 3:20 pm    Post subject: Remapping problem Reply with quote

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. Confused
Back to top
Avimelech
Guest





PostPosted: Sun Nov 11, 2007 5:43 pm    Post subject: Reply with quote

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





PostPosted: Sun Nov 11, 2007 7:41 pm    Post subject: Reply with quote

@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

PostPosted: Sun Nov 11, 2007 10:35 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Bug Reports All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group