Jump to content
Sign in to follow this  

HotKeySet and Keyboard Scancode

Recommended Posts


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
Edited by DLS

Share this post

Link to post
Share on other sites


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.

  • Like 1

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.