Remap Ctrl+W for Amazon Chime Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
llinfeng
Posts: 86
Joined: 08 Dec 2016, 21:54
Contact:

Remap Ctrl+W for Amazon Chime

Post by llinfeng » 18 Jan 2022, 19:36

Please advise what I am missing with the specification below. The goal is to trigger a word-deletion event when Ctrl+W is pressed. Unexpectedly, upon releasing the w-key, Amazon Chime window should get dismissed to the system tray. And, per its settings, there is no such a section for configuring the keyboard shortcuts.

Code: Select all

^w:: send ^{bs}
Here is what is logged in Key History when I activated the Amazon Chime window by clicking on it, and pressed Ctrl+W to execute the shortcut defined above.

Code: Select all

01  000	 	u	0.06	LButton        	Amazon Chime
A2  01D	 	d	0.14	LControl       	
57  011	 	d	0.23	w              	
08  00E	i	d	0.00	Backspace      	
08  00E	i	u	0.00	Backspace      	
57  011	 	u	0.11	w              	
A2  01D	 	u	0.33	LControl       	~/.../ahk_master.ahk - AutoHotkey v1.1.33.10
What happened is that the Amazon Chime window is closed as if I was triggering its native Ctrl+W shortcut. Immediately upon releasing the w-key, the Amazon Chime window gets closed, and another window was activated instead. The last row in the key-history log reflects the fact that it was actually the key-history window that was activated right after the release of the w-key.

Thanks a lot!

User avatar
mikeyww
Posts: 26885
Joined: 09 Sep 2014, 18:38

Re: Remap Ctrl+W for Amazon Chime

Post by mikeyww » 18 Jan 2022, 19:45

I'm just guessing a bit here, but it seems like you have a hotkey conflict between your script and your Amazon program. Although I find that AHK usually wins, I also find that it sometimes does not! An easy solution is probably to pick a different hotkey.

llinfeng
Posts: 86
Joined: 08 Dec 2016, 21:54
Contact:

Re: Remap Ctrl+W for Amazon Chime

Post by llinfeng » 18 Jan 2022, 19:59

Yes, I agree that Autohotkey usually wins. Actually, with this Amazon Chime application, what was scheduled to be sent actually gets delivered. Suppose that I keep holding the w-key, well, multiple words gets deleted.

Specifically, Amazon Chime is monitoring for the release of the w-key. I wonder if there is a way to assign, say, "return" to the event where "the w-key is released while Ctrl is pressed down".

And, I will consider picking up a different hotkey. Though, spoiled by AHK for years, it is challenging to learn not to use Ctrl+W when needing to delete a word :)

User avatar
mikeyww
Posts: 26885
Joined: 09 Sep 2014, 18:38

Re: Remap Ctrl+W for Amazon Chime  Topic is solved

Post by mikeyww » 18 Jan 2022, 20:21

Code: Select all

^w::SoundBeep, 900
^w Up::SoundBeep, 1500

llinfeng
Posts: 86
Joined: 08 Dec 2016, 21:54
Contact:

Re: Remap Ctrl+W for Amazon Chime

Post by llinfeng » 18 Jan 2022, 21:43

Exactly. Here is what I end up using:

Code: Select all

#IfWinActive ahk_exe Chime.exe
    ^w:: send {blind}^{bs}
    ^w up:: return
 #IfWinActive
With the "up" portion on the third line, AHK blocks Amazon Chime from realizing what actually happened - the release of w-key with Ctrl held down is now tasked to do exactly nothing.

Post Reply

Return to “Ask for Help (v1)”