how to detect a keypress of the ~ (or `) key in gui code?
Posted: Sun Sep 08, 2013 3:20 am
So I'm experimenting with John's Quick Action Bar code a bit, and I want to have opening the console (by hitting the tilde ~ also known as the backtick ` key) be another control that toggles the quick bar on and off (so when I type stuff in the console it will stop triggering actions on the quickbar due to the hot keys!)
Anyway, I can't seem to figure out how to address the ~ key. When I just hit it, NOTHING types into the code window. If I test with some regular letter like q, that works for the test. If I hold Shift to get a ~ (instead of a `) then it will at least type into the window, but it doesn't work when testing the code, no results, not even if I hold Shift during the test. It's like the ` key doesn't exist!
In my grimrock.cfg I have the console on and see that the key is called 192, but that didn't work either (neither in quotes nor out of quotes).
Am I doing something wrong? Or is this just impossible?
Anyway, I can't seem to figure out how to address the ~ key. When I just hit it, NOTHING types into the code window. If I test with some regular letter like q, that works for the test. If I hold Shift to get a ~ (instead of a `) then it will at least type into the window, but it doesn't work when testing the code, no results, not even if I hold Shift during the test. It's like the ` key doesn't exist!
In my grimrock.cfg I have the console on and see that the key is called 192, but that didn't work either (neither in quotes nor out of quotes).
Am I doing something wrong? Or is this just impossible?