Jump to content

HotKeySet("{", "_func") - { not being captured by HotKeySet


sias
 Share

Recommended Posts

Good afternoon,

I am having difficulties with HotKeySet when setting the hotkey as " { ". I do not see anywhere in the help file showing that this key is reserved by windows and every other key that I register appears to work. Simply put when I press the " { " key it will write " { " to whatever active program I have open as opposed to capturing the key and sending the appropriate function. Below is a short script demonstrating the issue I am having. I am using the most up to date version of Autoit and have tested the script on two separate computers so it shouldn't be due to another program already capturing that key. Does anyone know if this is a known issue with the current version of Autoit or if I am making a simple error somewhere in my script that is causing the issue.

 

 

Pressing the { key will not capture { and instead just write { to the active application

Pressing the } key will work and send "Works" to the console.

HotKeySet("{", "_test")
HotKeySet("}", "_test2")

while 1
    sleep (100)
WEnd

Func _test()
    ConsoleWrite ("Works")
EndFunc

Func _test2()
    ConsoleWrite ("Works")
EndFunc

 

"The true measure of a man is how he treats someone who can do him absolutely no good."

Link to comment
Share on other sites

I have no answer why { does not work, but I do have a work around.

HotKeySet("+[", "_test")
HotKeySet("}", "_test2")

while 1
    sleep (100)
WEnd

Func _test()
    ConsoleWrite ("Works")
EndFunc

Func _test2()
    ConsoleWrite ("Works")
EndFunc

 

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

John,

 

Thanks for the help. I'm just glad that it wasn't just me and I'm not actually going crazy (well, in regards to this at least).

Thank you for the work around, I was so caught up on trying to get the { to work with hotkeyset or even _ispressed that my brain wouldn't even let me think about other solutions.

"The true measure of a man is how he treats someone who can do him absolutely no good."

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...