Remapping win+space to ctrl+win+space only for the first hit Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
akaza_dorian
Posts: 9
Joined: 30 Nov 2019, 15:44

Remapping win+space to ctrl+win+space only for the first hit

Post by akaza_dorian » 30 Nov 2019, 16:04

Hi, I'm trying to change how the Windows language switch hotkey works to be like Gnome.

As far as ctrl+win+space is changing to the last language used, I want to map win+space to it for the first occurrence.

The logic should be: for the first time I hit win+space, it will be remapped to ctrl+win+space, if I did not release the win key and hit space again, it would work as normal (win+space).

Is it possible through AHK?

User avatar
rommmcek
Posts: 1480
Joined: 15 Aug 2014, 15:18

Re: Remapping win+space to ctrl+win+space only for the first hit  Topic is solved

Post by rommmcek » 01 Dec 2019, 16:32

Useful suggestions, try this:

Code: Select all

LWin & Space::
    Send, ^#{Space}
    Hotkey,  LWin & Space, Off
Return

LWin Up::Hotkey, LWin & Space, On

Esc::ExitApp ; optinal

akaza_dorian
Posts: 9
Joined: 30 Nov 2019, 15:44

Re: Remapping win+space to ctrl+win+space only for the first hit

Post by akaza_dorian » 02 Dec 2019, 19:31

rommmcek wrote:
01 Dec 2019, 16:32
Useful suggestions, try this:

Code: Select all

LWin & Space::
    Send, ^#{Space}
    Hotkey,  LWin & Space, Off
Return

LWin Up::Hotkey, LWin & Space, On

Esc::ExitApp ; optinal
It works perfectly! Thank you so much!

Post Reply

Return to “Ask for Help (v1)”