Sign in to follow this  
Followers 0
Shao

blocking keyboard

9 posts in this topic

Hello,

I'd like to block only functions keys of a keyboard so only characters are working.

How to do that ?

Thank you

Share this post


Link to post
Share on other sites



Thank you but I wanted blocking any hotkeys and let character keys work to let users of my programm write in a textfield without possibility of making appear "start menu" or "task bar".

Share this post


Link to post
Share on other sites

@Nuffilein805:

Seems like Windows key can not be blocked. This does not work.

#include <GUIConstants.au3>
HotKeySet("{LWIN}", "a")
func a()
    SoundPlay(@WindowsDir & "\media\Windows XP Ding.wav",1)
    MsgBox(4096,"","This is a message.")
endfunc
While 1
    Sleep(100)
WEnd

Share this post


Link to post
Share on other sites

ok, you're right

those cannot be "blocked"

Ctrl+Alt+Delete It is reserved by Windows

F12 It is also reserved by Windows, according to its API.

NumPad's Enter Key Instead, use {Enter} which captures both Enter keys on the keyboard.

Win+B,D,E,F,L,M,R,U; and Win+Shift+M These are built-in Windows shortcuts. Note: Win+B and Win+L might only be reserved on Windows XP and above.

Alt, Ctrl, Shift, Win These are the modifier keys themselves!

Other Any global hotkeys a user has defined using third-party software, any combos of two or more "base keys" such as '{F1}{F2}', and any keys of the form '{LALT}' or '{ALTDOWN}'.

Share this post


Link to post
Share on other sites

Thank your for answering.

I knew that some keys are reserved by the OS but I just wanted that the start menu and the task bar can't appear above my programm [splashtexton configured to be above every other windows but it has no priority on future windows opening]

Share this post


Link to post
Share on other sites

I'm not sure if this will help but perhaps you could run it as a separate script:

Opt('WinWaitDelay', 0)
Local Const $Title = 'Title of window to keep focussed'

While WinExists($Title)
    WinActivate($Title)
    WinWaitNotActive($Title)
WEnd

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  
Followers 0