Zohar Posted July 20, 2021 Posted July 20, 2021 (edited) Hi all I have just bought a new keyboard and mouse combo, it's the Logitech MK295: https://www.logitech.com/en-us/products/combos/mk295-keyboard-mouse-combo.920-009782.html (really nice keyboard and mouse BTW. I like how they look, and the keyboard's keys are really quiet. Definitely an improvement over my older keyboard) On the top part of the keyboard, there are 8 additional keys: I created HotKeySet()s for each one of them, and this is how I managed to map them: HotKeySet("{MEDIA_PLAY_PAUSE}" ,"ApplicationLauncher") HotKeySet("{VOLUME_MUTE}" ,"ApplicationLauncher") HotKeySet("{VOLUME_DOWN}" ,"ApplicationLauncher") HotKeySet("{VOLUME_UP}" ,"ApplicationLauncher") HotKeySet("{BROWSER_HOME}" ,"ApplicationLauncher") HotKeySet("{LAUNCH_MAIL}" ,"ApplicationLauncher") HotKeySet("{SLEEP}" ,"ApplicationLauncher") ;The only one that doesn't work HotKeySet("{LAUNCH_APP2}" ,"ApplicationLauncher") So out of 8 keys, I successfully capture 7 of them, and the only one I have a problem with, is the 7th one - the one with the Power icon and "PC" label. "{SLEEP}" doesn't seem to capture it.. I wonder, is there another key name that I should try, or does it happen because Windows so strongly hooks that key,that AutoIt cannot capture it? BTW, some additional info that might help: When I go to Control Panel -> Power Options, and switch to the "Advanced" tab, then the setting that handles this key is this: Originally it was set to "Stand by", and indeed whenpressing that 7th key, the computer would go to Sleep (not Hibernate). After I changed it to "Do nothing", as can be seen in the screenshot, then indeed that key does nothing. In both situations, AutoIt did not capture it.. Hopefully there's another Key Name I should try other than "{Sleep}", which didn't work.. Or, I should give up that key, and not use it with AutoIt, if it's not possible to capture it. Thank you Edited July 20, 2021 by Zohar
Danyfirex Posted July 20, 2021 Posted July 20, 2021 Hello, Try a keyboard map tool and check if you get it mapped. Saludos Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut
Zohar Posted July 20, 2021 Author Posted July 20, 2021 Thank you Danyfirex Which keyboard mapping program do you use?
Nine Posted July 20, 2021 Posted July 20, 2021 You can simply open the _WinAPI_SetWindowsHookEx example. Just add a line at the very beginning of the Func EvaluateKey($iKeycode): ConsoleWrite ($iKeyCode & @CRLF) If it shows a code, you know that KB is sending it to computer. But if you read carefully HotKeySet, there are a number of keys that you cannot use... “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
JockoDundee Posted July 20, 2021 Posted July 20, 2021 (edited) Run this - and then hit your keys - see if it says anything for the SLEEP button. I'd hit mine but I don't want to sleep :0 <snip> Edited July 20, 2021 by Melba23 Removed code Code hard, but don’t hard code...
Moderators Melba23 Posted July 20, 2021 Moderators Posted July 20, 2021 JockoDundee, Have you never read this announcement? If not, then do so now and count yourself lucky I am in a generous mood. 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
JockoDundee Posted July 20, 2021 Posted July 20, 2021 (edited) 9 hours ago, Melba23 said: Have you never read this announcement? Yes, I have. And I see the violation, clearly, in retrospect. 9 hours ago, Melba23 said: If not, then do so now and count yourself lucky I am in a generous mood. I have reread it, and thank you. <snip> Thank you. Full disclosure, I wrote this yesterday. Edited July 21, 2021 by Melba23 Discussed removed point via PM Code hard, but don’t hard code...
Nine Posted July 20, 2021 Posted July 20, 2021 58 minutes ago, Melba23 said: I am in a generous mood. Aren't you always ? I hardly remember you being in a very bad mood (well maybe one time) “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
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