Fluent-Search icon indicating copy to clipboard operation
Fluent-Search copied to clipboard

Pressing Win-Key when trying to set a Hotkey sets Win+Ctrl instead

Open hpr1999 opened this issue 1 year ago • 9 comments

Describe the bug

When I try to set a hotkey to be just the Win key, the Hotkey-Selector instead instantly shows Ctrl+Win. However, in the windows-search setting, I can accept the suggested hotkey Win and it works just fine for this settings.

To Reproduce

Steps to reproduce the behavior:

  1. Go to page where you can set hotkeys (e.g. Screen)
  2. Click on the hotkey input
  3. Press Win once

Expected behavior

I want to be able to set Hotkeys with Win, both just the Win key and e.g. Win+F

Screenshots

https://github.com/adirh3/Fluent-Search/assets/26067274/ccfc818c-4ca0-4321-93d0-4fa01be169c4

Note: I did not press the control key in this recording

Version Information

image


image

hpr1999 avatar Sep 20 '23 22:09 hpr1999

@hpr1999 didn't you have once some kind of mapping for opening office? Any chance this is causing this issue? FYI Win+F and almost all Win+something are already assigned by WIndows

adirh3 avatar Sep 22 '23 12:09 adirh3

Hmm nothing special, just the "Office Key", also known as the Hyper Key - but that one I'm not actually using, so I'd be very surprised. This happens on different PCs too, albeit I haven't tested another keyboard.

Ah yeah I didn't know that was still a problem, considering just Windows does work now I thought you just solved that. 😅

hpr1999 avatar Sep 22 '23 13:09 hpr1999

Hmm nothing special, just the "Office Key", also known as the Hyper Key - but that one I'm not actually using.

Ah yeah I didn't know that was still a problem, considering just Windows does work now I thought you just solved that. 😅

I am not sure this can be solved, it seems like when you press Win key the Ctrl is pressed virtually. You can double check that using another software that displays virtual key pressed (e.g. AutoHotkey)

adirh3 avatar Sep 22 '23 13:09 adirh3

Alright, I'll have to test that. In the mean time, I can confirm it happens with another keyboard as well.

hpr1999 avatar Sep 22 '23 13:09 hpr1999

Is there any tool in particular you think would have to work?

For a quick and dirty test I tried some presenter software that shows pressed keys on screen and tested with the on-screen keyboard, which lights up modifier keys when held down, but doesn't highlight the Ctrl key here.

hpr1999 avatar Sep 22 '23 13:09 hpr1999

I use AutoHotkey, just create empty .ahk script and run it, then open AutoHotkey from system tray and press - image

adirh3 avatar Sep 22 '23 13:09 adirh3

5B  15B	 	d	27.83	LWin           	Fluent Search - Settings
A2  01D	a	d	0.00	LControl       	
A5  138	a	d	0.00	RAlt           	
A2  01D	a	u	0.00	LControl       	
A5  138	a	u	0.00	RAlt           	
5B  15B	 	u	0.08	LWin           	
74  03F	 	d	5.51	F5             	D:\OneDrive\customization-and-config\scripts\autohotkey\media-control.ahk - AutoHotkey 

Looks like you are right - after I press LWin, something presses LControl, RAlt, down and instantly releases them again and they are counted as artificial keystrokes...

hpr1999 avatar Sep 22 '23 14:09 hpr1999

Now what's interesting... it looks like Fluent Search is sending the keystrokes! If I close it, and press Win again, this it what it looks like:

74  03F	 	u	0.14	F5             	
5B  15B	 	d	0.76	LWin           	
5B  15B	 	u	0.08	LWin           	

In fact, these automatic keystrokes only get sent if I'm inside of the Shortcut selector.

hpr1999 avatar Sep 22 '23 14:09 hpr1999

You're not alone, it does the same for me. Weirdly enough if I were to bind it to alt (for example) it doesn't do this, it's specifically the windows key. My keyboard doesn't have an rwin, so I can't test if that behaves the same.

I think it doesn't just do it in the shortcut selector, however. I use alt-snap to move/resize windows, and if I use that (with the move/resize key bound to win) to resize/move the main fluent search window it also fires off an additional control. I know this because moving or resizing the window in this manner shows the letters for quick selecting my pinned apps as if I'd pressed control.

flatlined avatar Feb 04 '24 23:02 flatlined