Palkiao 1 Posted January 22 Share Posted January 22 Hi everyone! Just and easy one I guess, is there a way to set Win Key Q shortcut as an HotKeySet? I have been trying a bit of everything without results.. "q{LWin}" "q & {LWin}" ("{LWin}" & "q", "#q" ecc.. Link to post Share on other sites
Developers Jos 2,662 Posted January 22 Developers Share Posted January 22 Moved to the appropriate forum, as the Developer General Discussion forum very clearly states: Quote General development and scripting discussions. Do not create AutoIt-related topics here, use the AutoIt General Help and Support or AutoIt Technical Discussion forums. Moderation Team SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to post Share on other sites
Developers Jos 2,662 Posted January 22 Developers Share Posted January 22 Show your script that isn't working so we can have a look. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to post Share on other sites
Nine 1,515 Posted January 22 Share Posted January 22 Most Win keys cannot be used with HotKeySet (see help file). Probably Q is one of them... Not much of a signature but working on it... Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search content in 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 GIF Animation (cached) Screen Scraping Link to post Share on other sites
Palkiao 1 Posted January 22 Author Share Posted January 22 hey thanks a lot for your replies! Is simply aiming to close or minimize active window would be amazing to replace the alt+q alt+w with something like win left {LWIN} key or anything that activates combo win+q win+w ``` HotKeySet("!w" , "Minimize") HotKeySet("!q", "Kill") While 1 Sleep(100) WEnd Func Minimize() WinSetState ("[ACTIVE]", "", @SW_MINIMIZE) EndFunc While 1 Sleep(100) WEnd Func Kill() WinClose ( "[ACTIVE]", "" ) EndFunc ``` Link to post Share on other sites
Exit 180 Posted January 23 Share Posted January 23 WIN+w --> reserved by Windows for Whiteboard WIN+q --> reserved by Windows for Query WIN+s --> reserved by Windows for Search convince yourself with this script: _HotKey("{ESC}") _HotKey("#w") ; is reserved by Windows --> Whiteboard _HotKey("#q") ; is reserved by Windows --> Query _HotKey("#s") ; is reserved by Windows --> Search Func _HotKey($hotkey = "") ; ! ALT + SHIFT ^ CONTROL # WinKey Switch @HotKeyPressed Case "{ESC}" Exit 0*MsgBox(0, Default, "Exit", 3) Case "#w" Beep() ; will never beep Case "#q" Beep() ; will never beep Case "#s" Beep() ; will never beep Case Else If Not IsDeclared("hotkey") Then Return MsgBox(16 + 262144, Default, "No CASE statement defined for hotkey " & @HotKeyPressed,15) If HotKeySet($hotkey, "_Hotkey") = 0 Then Return MsgBox(16 + 262144, Default, "Hotkey " & $hotkey & " invalid or set by another application.",15) EndSwitch EndFunc ;==>_HotKey While Sleep(100) MsgBox(262144, Default, "Press ESC to Exit." & @CRLF & @CRLF & "or WIN+w / WIN+q / WIN+s to verify the WIN Keys." ,3) WEnd Palkiao and Musashi 2 App: Au3toCmd UDF: _SingleScript() Link to post Share on other sites
Palkiao 1 Posted January 24 Author Share Posted January 24 Hey thanks for your reply! just tried your script & you are totally right aswell, I sort of found a manual work around with this two articles: this works for Win+q (not with Win+w): https://winaero.com/disable-certain-winkey-shortcuts-in-windows-10/ this works disabling with windows whiteboard (Win+w) but still can not assign it https://www.windowscentral.com/how-disable-windows-ink-workspace-windows-10 - temp solution was assigning minimize to win+y and with WindowsPowerToys with admin right assign key remap Win+y to Win+w. this managed to work it is a bit wonky but seems to work! If someone has any other idea on how to mute/disable win+w windows ink workspace and assign hotkey in a clean way super happy to do so Exit 1 Link to post Share on other sites
ad777 23 Posted February 13 Share Posted February 13 (edited) @Palkiao here is trick it's disable Win+R; Disable Win+R: #include <Misc.au3> HotKeySet("{ESC}", "_exit") Global $dll = DllOpen("user32.dll") Global $iPID While 1 If _IsPressed("5B", $dll) And _IsPressed("52", $dll) Then ;if Left Win Key[5B] Pressed And R Key[52] Pressed then _DeleteTab("Run") WinSetState("Run", "", @SW_MINIMIZE) WinSetState("Run", "", @SW_DISABLE) EndIf WEnd Func _DeleteTab($handle) ;;DeleteTab Local Const $sCLSID_TaskbarList = "{56FDF344-FD6D-11D0-958A-006097C9A090}" Local Const $sIID_ITaskbarList = "{56FDF342-FD6D-11D0-958A-006097C9A090}" Local Const $sTagITaskbarList = "HrInit hresult(); AddTab hresult(hwnd); DeleteTab hresult(hwnd); ActivateTab hresult(hwnd); SetActiveAlt hresult(hwnd);" Local $oTaskbarList = ObjCreateInterface($sCLSID_TaskbarList, $sIID_ITaskbarList, $sTagITaskbarList) Local $hWinhandle = WinGetHandle($handle) $iPID = WinGetHandle($handle) $oTaskbarList.DeleteTab($hWinhandle) EndFunc ;==>_DeleteTab Func _exit() WinClose($iPID) Exit EndFunc ;==>_exit Edited February 13 by ad777 iam ِAutoit programmer. best thing in life is to use your Brain to Achieve everything you want. Link to post Share on other sites
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