Jump to content
Sign in to follow this  
webxt

Windows Key block?

Recommended Posts

webxt

Is it possible?

Thanks in advance,

webxt

Edited by webxt

Share this post


Link to post
Share on other sites
k3v

it would help to know more details, but you might try:

if not _ispressed(the key you want to block) then 
    do stuff
endif

check the help file for a list of key values

Share this post


Link to post
Share on other sites
webxt

Hello k3v,

I mean the windows key

post-20273-1213053793_thumb.jpg

Edited by webxt

Share this post


Link to post
Share on other sites
k3v

5B Left Windows key

5C Right Windows key

(they're also in the help file)

not sure how to do what you want though

Edited by k3v

Share this post


Link to post
Share on other sites
webxt

is_pressed gives me some error, unknown function.

Share this post


Link to post
Share on other sites
k3v

is_pressed gives me some error, unknown function.

the function is _IsPressed()

but I'm not sure in this case it'll do what you want. there's probably a Windows configurable setting somewhere that will do that... if you can find it, you can likely modify that setting with AutoIt... google a reg setting for disabling the windows key. (come to think of it, I'd like to know, so I'll google it too)

Share this post


Link to post
Share on other sites
webxt

I need to block this key temporarely so I don't want to edit the registry files.

Thanks for your time anyway.

Share this post


Link to post
Share on other sites
LarryDalooza

If you set a keyboard hook and a callback function... return -1 in the callback when you get a "Windows Key" code. Depending on the callback implementation... it may work.... who knows until you try it.

Lar.


f_mrcleansmalm_77ce002.jpgAutoIt has helped make me wealthy

Share this post


Link to post
Share on other sites
webxt

Hi Larry, could you please explain?

___

For example (does not work):

HotKeySet("{5B}", "nothing")

func nothing()

Endfunc

Share this post


Link to post
Share on other sites
LarryDalooza

No... it is quite a bit harrier. You will need to research the forum for +keyboard +hook and look for a WH_KEYBOARD_LL hook example ... download it and play with it, then change the logic in the callback function to return -1 when the keycode of the "Windows Key" arrives.

Lar.


f_mrcleansmalm_77ce002.jpgAutoIt has helped make me wealthy

Share this post


Link to post
Share on other sites
aNewLyfe

_ispressed needs #include <misc.au3>

try to send an esc if win key pressed.

also here i have a little proggy made in vc

it blocks a few keys, like win key alt+f4 alt+tab as i remember.

just run it with script

safe.rar

Edited by mistakilla

:alien: ~ Every Living Thing is a Code Snippet of World Application ~ :alien:

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.