adirh3 / Fluent-Search

Official repository for Fluent Search, use to report issues or ask for a new feature
https://fluentsearch.net
1.45k stars 34 forks source link

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

Open hpr1999 opened 1 year ago

hpr1999 commented 1 year ago

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

adirh3 commented 1 year ago

@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

hpr1999 commented 1 year ago

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. 😅

adirh3 commented 1 year ago

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)

hpr1999 commented 1 year ago

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

hpr1999 commented 1 year ago

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.

adirh3 commented 1 year ago

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

hpr1999 commented 1 year ago
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 commented 1 year ago

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.

flatlined commented 9 months ago

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.