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 

BlockInput Alt Key

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



Joined: 08 Aug 2009
Posts: 17

PostPosted: Sat Aug 22, 2009 1:55 pm    Post subject: BlockInput Alt Key Reply with quote

I want to switch off blockinput with a key, but blockinput blocks any keys (except ctrl+alt+del)...

I found this on AHK Help
Quote:
Input blocking is automatically and momentarily disabled whenever an ALT event is sent (then re-enabled afterward).


I tried to press ALT but it doesn't work.

I tried some ALT Hotkey too...

I made this script in order to test alt key.
If Alt+b is pressed, var is set to 1. It waits 5 sec, then show results.

Code:

var = 0

BlockInput, On

Sleep, 5000

BlockInput, off
Msgbox, %var%

ExitApp

!b::var = 1


Alt+b hotkey doesn't work if blockinput is on...

How to do?
Back to top
View user's profile Send private message
HotKeyIt



Joined: 18 Jun 2008
Posts: 1994
Location: GERMANY

PostPosted: Sat Aug 22, 2009 4:45 pm    Post subject: Reply with quote

AutoHotkey Help wrote:
Certain types of hook hotkeys can still be triggered when BlockInput is on. Examples include "MButton" (mouse hook) and "LWin & Space" (keyboard hook with explicit prefix rather than modifiers "$#").

So try:
Code:
var = 0

BlockInput, On

Sleep, 5000

BlockInput, off
Msgbox, %var%

ExitApp

LAlt & b::
var := 1
Return

_________________
AutoHotFile - ToolTip(n,text,title,options) Wink
Back to top
View user's profile Send private message
Kai



Joined: 08 Aug 2009
Posts: 17

PostPosted: Sat Aug 22, 2009 7:11 pm    Post subject: Reply with quote

Thanks Smile

I think should be specified on help file Wink
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   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