DLS Posted March 1, 2017 Posted March 1, 2017 (edited) I would like to re purpose my unused keyboard keys into useful shortcuts. HotKeySet("{BROWSER_FAVORITES}", "test") Did not work. The adjacent { BROWSER_BACK } and { BROWSER_FORWARD } do work with hotkeyset. Function _Ispressed returns 0xAB, as the key scan code. Is there a way to do HotKeySet(0xAB, "test)? I do not want to do While True If _IsPressed(0xAB) Then FuncHere EndIf Sleep(100) Wend Edited March 1, 2017 by DLS
genius257 Posted March 6, 2017 Posted March 6, 2017 Hi @DLS You can use _WinAPI_SetWindowsHookEx with $WH_KEYBOARD_LL (see the example in the function reference). The scan code is in the $tagKBDLLHOOKSTRUCT and if you return 1 in the hook procedure, you can prevent the key from doing anything else. DLS 1 To show your appreciation My highlighted topics: AutoIt Package Manager, AutoItObject Pure AutoIt, AutoIt extension for Visual Studio Code Github: AutoIt HTTP Server, AutoIt HTML Parser
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now