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 

#Enter works strange for leftwin

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
RandomHeart



Joined: 24 Mar 2009
Posts: 20

PostPosted: Fri Mar 19, 2010 5:11 am    Post subject: #Enter works strange for leftwin Reply with quote

I am experiencing some strange thing here with ahk and kmplayer. I have written this script:
Code:

#Enter::
WinGetPos,,,,TaskBarH, ahk_class Shell_TrayWnd
WinGetPos,,, Width, Height, A
WinMove, A,, (A_ScreenWidth/2)-(Width/2), ((A_ScreenHeight-TaskBarH)/2)-(Height/2)
return

for moving the active window to center of the screen. When KMplayer is active leftwin+enter does the job right without side effects, but when I press rightwin+enter after the window is send to center of screen it also receives some key presses. KMPlayer takes screenshot of current video to clipboard (alt+ctrl+c is assigned for this action in KMPlayer) and then opens "open DVD file" dialog (for this ctrl+v is assigned). I tried to remove those hotkeys from KMPLayer's configuration and yes it indeed stoppped doing those actions. It is not a problem for me to disable the hotkeys, just wondering why this is happening.
Back to top
View user's profile Send private message
MasterFocus



Joined: 08 Apr 2009
Posts: 3035
Location: Rio de Janeiro - RJ - Brasil

PostPosted: Fri Mar 19, 2010 7:21 am    Post subject: Reply with quote

What does your script's Key History show?
_________________
"Read the manual. Read it again. Search the forum.
Try something before asking. Show what you've tried.
"

Antonio França
My stuff: Google Profile
Back to top
View user's profile Send private message Visit poster's website
RandomHeart



Joined: 24 Mar 2009
Posts: 20

PostPosted: Fri Mar 19, 2010 9:55 am    Post subject: Reply with quote

Code:
Window: R:\center.ahk - AutoHotkey v1.0.48.03
Keybd hook: yes
Mouse hook: no
Enabled Timers: 0 of 0 ()
Interrupted threads: 0
Paused threads: 0 of 0 (0 layers)
Modifiers (GetKeyState() now) =
Modifiers (Hook's Logical) =
Modifiers (Hook's Physical) =
Prefix key is down: no

NOTE: To disable the key history shown below, add the line "#KeyHistory 0" anywhere in the script.  The same method can be used to change the size of the history buffer.  For example: #KeyHistory 100  (Default is 40, Max is 500)

The oldest are listed first.  VK=Virtual Key, SC=Scan Code, Elapsed=Seconds since the previous event.  Types: h=Hook Hotkey, s=Suppressed (blocked), i=Ignored because it was generated by an AHK script, a=Artificial, #=Disabled via #IfWinActive/Exist.

VK  SC   Type   Up/Dn   Elapsed   Key      Window
-------------------------------------------------------------------------------------------------------------
5C  15C       d   5.39   Right Windows     The KMPlayer
0D  01C   h   d   0.22   Enter             
0D  01C   s   u   0.14   Enter             
5C  15C       u   0.03   Right Windows     
A2  01D   i   d   0.00   Ctrl              
A2  01D   i   u   0.00   Ctrl              
A2  01D   a   d   0.00   Ctrl              
43  02E   a   d   0.00   C                 
43  02E   a   u   0.02   C                 The KMPlayer
A2  01D   a   u   0.00   Ctrl              
90  045   a   d   0.19   Pause             
90  045   a   u   0.00   Pause             
A0  02A   a   d   0.00   Shift             
24  047   a   d   0.00   Num 7             
24  047   a   u   0.00   Num 7             
A0  02A   a   u   0.00   Shift             
90  045   a   d   0.00   Pause             
90  045   a   u   0.00   Pause             
A2  01D   a   d   0.00   Ctrl              
43  02E   a   d   0.00   C                 
43  02E   a   u   0.02   C                 
A2  01D   a   u   0.00   Ctrl              
A2  01D   a   d   0.19   Ctrl              
56  02F   a   d   0.00   V                 
56  02F   a   u   0.02   V                 
A2  01D   a   u   0.00   Ctrl              
Press [F5] to refresh.


So many keys Shocked
And I only pressed rightwin+enter
Back to top
View user's profile Send private message
RandomHeart



Joined: 24 Mar 2009
Posts: 20

PostPosted: Sun Mar 21, 2010 7:59 am    Post subject: Reply with quote

I found what the problem was about. It is a 3rd party program designed to switch layout of typed text

Sorry for bothering, didn't know myself Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help 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