Disable windows button and keep WIN+ combinatios work (common methods doesn't work) Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
pingveee
Posts: 5
Joined: 24 Mar 2019, 05:06

Disable windows button and keep WIN+ combinatios work (common methods doesn't work)

24 Mar 2019, 05:39

Hi

I want to disable windows button default option (to open START panel), but keep windows key combinations work (WIN + F1 to open Chrome for example).

Methods such as

Code: Select all

LWin::Return; This method blocks the WIN+ hotkeys
~LWin Up:: return; This method still keeps panel to appears
has no effect or just blocks possibility to use windows hotkey combinations.

I don't know why, but few month ago "~LWin Up::Return" worked properly (before system reinstallation), but now it doesn't wok as i want.

Is there any solution?

Also, my start Main Script lines is down below:
Spoiler
Last edited by pingveee on 24 Mar 2019, 05:57, edited 2 times in total.
User avatar
Scr1pter
Posts: 1272
Joined: 06 Aug 2017, 08:21
Location: Germany

Re: Disable windows button and keep WIN+ combinatios work (common methods doesn't work)

24 Mar 2019, 05:44

Windows 10?

What happens if you try:

Code: Select all

LWin::
return

#F1:: ; Win key + F1
MsgBox, a test
return
Cheers!
Please use [code][/code] when posting code!
Keyboard: Logitech G PRO - Mouse: Logitech G502 LS - OS: Windows 10 Pro 64 Bit - AHK version: 1.1.33.09
User avatar
pingveee
Posts: 5
Joined: 24 Mar 2019, 05:06

Re: Disable windows button and keep WIN+ combinatios work (common methods doesn't work)

24 Mar 2019, 05:52

I have Win 7 x64 and AHK Version 1.1.30.01

This method

Code: Select all

LWin::
return
works just as

Code: Select all

LWin::Return
(The windows start pannel not appears, but key shortcuts doesn't work.
User avatar
Scr1pter
Posts: 1272
Joined: 06 Aug 2017, 08:21
Location: Germany

Re: Disable windows button and keep WIN+ combinatios work (common methods doesn't work)

24 Mar 2019, 06:46

Yes I know it's the same, but my question was more referring to the #F1:: part.
Another idea would be:

Code: Select all

$LWin::
return
(Yet I don't think it will make a difference...)

I don't really understand why the current method is not working...

P.S. Post the full code if possible.

Cheers!
Please use [code][/code] when posting code!
Keyboard: Logitech G PRO - Mouse: Logitech G502 LS - OS: Windows 10 Pro 64 Bit - AHK version: 1.1.33.09
User avatar
pingveee
Posts: 5
Joined: 24 Mar 2019, 05:06

Re: Disable windows button and keep WIN+ combinatios work (common methods doesn't work)

24 Mar 2019, 07:37

Even if i close my main script and create new empty one with this code, left windows key not work in shortcut, and start menu not appears.
Btw, right windows key + F1 will open the test message, left windows key + F1 will open help (default option as like if AHK just doesn't work).

Code: Select all

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

$LWin::
return

#F1:: ; Win key + F1
MsgBox, a test
return
Anyway, my Main Script (windows key disable section is commented).
Spoiler
Kobaltauge
Posts: 264
Joined: 09 Mar 2019, 01:52
Location: Germany
Contact:

Re: Disable windows button and keep WIN+ combinatios work (common methods doesn't work)

25 Mar 2019, 06:07

If you want to hotkey keeping its original function you have to use the tilde

Code: Select all

~LWin::
return
User avatar
pingveee
Posts: 5
Joined: 24 Mar 2019, 05:06

Re: Disable windows button and keep WIN+ combinatios work (common methods doesn't work)

25 Mar 2019, 07:31

No, with

Code: Select all

~LWin::
return
start panell still appears (hotkeys still work).

I thought it might be a problem due to i'm usind display fusion (for multiple monitors), which has its own key shortcuts, but even if i disable it windows panel still appears.
User avatar
Scr1pter
Posts: 1272
Joined: 06 Aug 2017, 08:21
Location: Germany

Re: Disable windows button and keep WIN+ combinatios work (common methods doesn't work)  Topic is solved

25 Mar 2019, 07:54

On the keyboard, which I'm using right now, I only have a right windows key.
I made several tests and this one works perfectly for me:

Code: Select all

RWin::
return

RWin & F1::
MsgBox, Windows key + F1
return
Pressing right windows key doesn't do anything.
Right windows key + F1 opens the messagebox.

Try the exact same with the left windows key.

Cheers!
Please use [code][/code] when posting code!
Keyboard: Logitech G PRO - Mouse: Logitech G502 LS - OS: Windows 10 Pro 64 Bit - AHK version: 1.1.33.09
User avatar
pingveee
Posts: 5
Joined: 24 Mar 2019, 05:06

Re: Disable windows button and keep WIN+ combinatios work (common methods doesn't work)

25 Mar 2019, 08:25

Yep, with this method windows start panel doesn't appears and WIN+F1 opens the messagebox (even with LWin key).
Maybe i should rewrite the script with "&" symbol, because "#" for windows button shortcuts doesn't work properly.

Thanks!
User avatar
Scr1pter
Posts: 1272
Joined: 06 Aug 2017, 08:21
Location: Germany

Re: Disable windows button and keep WIN+ combinatios work (common methods doesn't work)

25 Mar 2019, 08:26

Yes, with # it doesn't work properly.
You can mark the thread as solved I guess ;)

Cheers!
Please use [code][/code] when posting code!
Keyboard: Logitech G PRO - Mouse: Logitech G502 LS - OS: Windows 10 Pro 64 Bit - AHK version: 1.1.33.09

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Nerafius, RandomBoy and 169 guests