magician13134 Posted September 25, 2007 Share Posted September 25, 2007 (edited) There are several keys I have on my keyboard like media keys, G keys, etc. that I would like to be able to detect as with _IsPressed(). Is there any Windows dll or other similar call I could make to pick up on these? Thanks very much. Edited September 25, 2007 by magician13134 Visit Magic Soft Inc. for some of my software Link to comment Share on other sites More sharing options...
Zedna Posted September 28, 2007 Share Posted September 28, 2007 Make helper script wirh FOR loop containing _IsPressed($i) to observe kay numbers ... Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
ssubirias3 Posted September 28, 2007 Share Posted September 28, 2007 There are several keys I have on my keyboard like media keys, G keys, etc. that I would like to be able to detect as with _IsPressed(). Is there any Windows dll or other similar call I could make to pick up on these? Thanks very much.If I understand you correctly, you are wanting to use _IsPressed() with one of those "fancy" keyboards. You can do what Zedna suggested and create a script to tell you the virtual key codes, but that's not really necessary. You have to understand those "extra" keys might be Function keys. On a typical keyboard you can see F1 - F12. Someone could re-label F1 to read "Help" or F2 to read "Re-name" or F5 to read "Refresh"... you get the point, right? If you look at the Remarks section under _IsPressed() in the Help file you'll see the following. And before you say, "yeah, but my keyboard doesn't have an F15 or F22 key".... stop and think about what this thread is about . 7C-7F F13 key - F16 key 80H-87H F17 key - F24 keyMy guess would be that a help file for the keyboard or your computer would either explain the "virtual key codes" or which F13 - F24 key those special keys use/represent. Granted I'm making a ton of assumptions here and I could be wrong. But its worth a try any ways, right? So if you have a "Play" and "Zoom" key you'd want your code to look like this: #include <Misc.au3> ;; Vitrual Key Codes: ;; FA Play key ;; FB Zoom key If _IsPressed("FA") Then ;; play it again Sam ElseIf _IsPressed("FB") Then ;; zoom zoom in your Mazda Else ;; blah, blah, blah EndIf Now if you want to get really White and Nerdy, like Weird Al... then you can build your helper script like Zedna suggested. But you'll want to read up on DllCall() and the GetKey... functions within User32.dll out at msdn.microsoft.com. I personally think all you need is the Virtual-Key Code link Call me lazy for not waiting to give you the DllCall() code, but the truth is I'm just not White and Nerdy enough to know how . Let us know what you come up with! Hope this helped. Link to comment Share on other sites More sharing options...
Tasmania Posted September 28, 2007 Share Posted September 28, 2007 I'm not sure if you folks here know this term, but Tag for the keycode link. Link to comment Share on other sites More sharing options...
magician13134 Posted October 1, 2007 Author Share Posted October 1, 2007 I'm not quite sure I follow any of that, firstly Zedna, I've tried that and they don't come ever show up... Secondly, they aren't F keys, mostly G keys, and some media keys... I have the Logitech G-15 keyboard if that helps, and I don't really understand the vritual keys.... Visit Magic Soft Inc. for some of my software Link to comment Share on other sites More sharing options...
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