Remapping WinKey

Get help with using AutoHotkey and its commands and hotkeys
User avatar
GaXve
Posts: 89
Joined: 30 Mar 2019, 18:20

Remapping WinKey

09 Jun 2019, 14:24

I know this is a long shot, but if you don't ask, you don't know.

I'm trying to remap the WinKey, through the mouse.
I.E. I have Ctrl + X assigned to the G8 Button on my Logitech G700 mouse (it's configured directly to the onboard memory of the mouse). I've remapped WinKey + Ctrl + X = Delete. This also translates to WinKey + G8 = Delete.

G8 = Ctrl + X
WinKey + Ctrl + X = Delete
WinKey + G8 = Delete

There's only one way I've managed to remap, and it's with this code:

Code: Select all

#^x::
	{
	SendInput {Del}
	Return
	}
The PROBLEM is, when the WinKey is pressed for too long (in milliseconds), the Windows 10 Start Menu pops up, and it becomes very annoying.

I've tried:

Code: Select all

1. Send {Blind}{Del}		;Does not work

2. SendInput {Blind}{Del}	;Does not work

3. Sleep, 225
    Send {Del}				;Works, but the Start Menu still pops up

4. LWin::Return				;Placed before "#^x::"  =>  Does not work

Any suggestions? Am I missing something? Is the remapping "through" the mouse not really possible?

Cheers!
User avatar
YoucefHam
Posts: 344
Joined: 24 Aug 2015, 12:56
Facebook: https://fb.me/YoucefHamDz
Google: [email protected]
GitHub: YoucefHam
Location: Algeria
Contact:

Re: Remapping WinKey

09 Jun 2019, 16:19

try this

Code: Select all

#^x::
SendInput {Del}
Return


LWin up::return
RWin up::return
:wave: There is always more than one way to solve a problem. ;)
User avatar
GaXve
Posts: 89
Joined: 30 Mar 2019, 18:20

Re: Remapping WinKey

09 Jun 2019, 18:00

Thanks for the suggestion YoucefHam. For some reason, that disables the WinKey completely.
User avatar
YoucefHam
Posts: 344
Joined: 24 Aug 2015, 12:56
Facebook: https://fb.me/YoucefHamDz
Google: [email protected]
GitHub: YoucefHam
Location: Algeria
Contact:

Re: Remapping WinKey

09 Jun 2019, 18:36

try this

Code: Select all

#^x::
Activated := 1
SetTimer, Toggle, 200
SendInput {Del}
Return

Toggle:
SetTimer, Toggle, off
Activated := 0
return

#if Activated

LWin up::return
RWin up::return

or this one

Code: Select all

#^x::
Activated := 1
KeyWait, RWin ;or LWin
Activated := 0
SendInput {Del}
Return

#if Activated

LWin up::return
RWin up::return
:wave: There is always more than one way to solve a problem. ;)
User avatar
GaXve
Posts: 89
Joined: 30 Mar 2019, 18:20

Re: Remapping WinKey

15 Jun 2019, 04:36

Hey YoucefHam, I really appreciate your input. I tried both of the scripts without success. I really though one of them would work.

Return to “Ask For Help”

Who is online

Users browsing this forum: effel, Haan, mikeyww and 44 guests