magace Posted May 16, 2014 Share Posted May 16, 2014 Making a keyboard tester for work and cant seem to figure out how to detect ' key Any ideas? Thanks! Link to comment Share on other sites More sharing options...
czardas Posted May 16, 2014 Share Posted May 16, 2014 Strange, it doesn't seem to be mentioned here. operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
Xandy Posted May 16, 2014 Share Posted May 16, 2014 _ispressed('DE') is quote Human Male Programmer (-_-) Xandy About (^o^) Discord - Xandy Programmer MapIt (Tile world editor, Image Tile Extractor, and Game Maker) Link to comment Share on other sites More sharing options...
Exit Posted May 17, 2014 Share Posted May 17, 2014 (edited) _ispressed('DE') does not work on German keyboards for quote.This works on German keyboards.#include <Misc.au3> ;~ _ispressed('DE') does not work on German keyboards for quote. ;~ This works on German keyboards. ;~ Place the cursor after the #cs line, since the quote will be written there. ;~ Then press F5 ;~ Press ESC to exit Local $hDLL = DllOpen("user32.dll") While 1 If _IsPressed("1B", $hDLL) Then ExitLoop ;~ If _IsPressed("BF", $hDLL) _ ;~ Then Beep(1800, 200) ; if CAPS LOCK, use _WinAPI_GetKeyState() to check keystate If _IsPressed("BF", $hDLL) And _ ; the key with hash and quote _IsPressed("10", $hDLL) And _ ; a shift key is pressed (_IsPressed("A1", $hDLL) or _ ; if left shift key _IsPressed("A0", $hDLL)) _ ; if right shift key Then Beep(1800, 200) WEnd DllClose($hDLL) Beep(800, 200) #cs Place the cursor after this line, since the Quote will be written there. #ceEnjoyEdit: Fixed issue with left shift keyCheck for CAPS LOCK not fixed. Edited May 17, 2014 by Exit Xandy 1 App: Au3toCmd UDF: _SingleScript() Link to comment Share on other sites More sharing options...
JohnOne Posted May 17, 2014 Share Posted May 17, 2014 looks like "C0" to me, this works fine. #include <Misc.au3> While 3 If _IsPressed("C0") Then MsgBox(0,0,0) EndIf WEnd 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 More sharing options...
Exit Posted May 17, 2014 Share Posted May 17, 2014 looks like "C0" to me, this works fine. #include <Misc.au3> While 3 If _IsPressed("C0") Then MsgBox(0,0,0) EndIf WEnd Please specify keyboard language. App: Au3toCmd UDF: _SingleScript() Link to comment Share on other sites More sharing options...
Gianni Posted May 17, 2014 Share Posted May 17, 2014 Not working here (italian keyboard) this doesn't work: _IsPressed("BF", $hDLL) And _IsPressed("10", $hDLL) And (_IsPressed("A1", $hDLL) Or _IsPressed("A0", $hDLL)) nor this: _ispressed('DE') and even this doesnt _IsPressed("C0") ..... Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt.... Link to comment Share on other sites More sharing options...
Terenz Posted May 17, 2014 Share Posted May 17, 2014 Depends on the keyboard language, the key is VK_OEM_X Example basend on the result of this thread: VK_OEM_3 0xC0 Used for miscellaneous characters; it can vary by keyboard. For the US standard keyboard, the '`~' key VK_OEM_7 0xDE Used for miscellaneous characters; it can vary by keyboard. For the US standard keyboard, the 'single-quote/double-quote' key Just test the all the VK_OEM ( there are nine if i remember well ) and see what working for you. Nothing is so strong as gentleness. Nothing is so gentle as real strength Link to comment Share on other sites More sharing options...
Gianni Posted May 17, 2014 Share Posted May 17, 2014 (edited) For the italian keyboard the right code for quote is "BF" found it with this little snippet put cursor in console output area and press F5 to runthen press the quote key to see the right code for your keyboard<snip> Edited May 17, 2014 by Melba23 Code removed Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt.... Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted May 17, 2014 Moderators Share Posted May 17, 2014 Chimp,Please read this announcement - the code you posted was in direct contravention of the "watch for all keys" prohibition. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Gianni Posted May 17, 2014 Share Posted May 17, 2014 Chimp, Please read this announcement - the code you posted was in direct contravention of the "watch for all keys" prohibition. M23 opsss I am sorry done without thinking and without bad intentions I'll pay more attention next time. Thanks for cleaning that code. Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt.... 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