LGUG2Z / komorebi

A tiling window manager for Windows 🍉
https://lgug2z.github.io/komorebi/
Other
9.64k stars 200 forks source link

[BUG]: Using WHKD and mostly default Komorebi alt key sticks between monitor changes #607

Closed allora closed 6 months ago

allora commented 11 months ago

Describe the bug When using a mostly default Komorebi config and the default suggested whkd, When using Alt + HJKL to navigate to windows on a different monitor, then switching its workspace/desktop to another workspace/desktop on that monitor makes the alt key stick 100% of the time.

By "Stick" i mean that alt is registered as held, even though I am not pressing anything on the keyboard or mouse. In firefox, this manifests as downloading links when I click on them.

To resolve this I have to navigate to another window with ALT + HJKL and back to the window I want to use.

To Reproduce Steps to reproduce the behavior:

  1. Have Komorebic and multiple monitors
  2. Have more than one desktop on each display, and apps open on each
  3. Change desktops on monitor 1
  4. Now try typing in a text field in the window you land on in that monitor

Expected behavior No matter where i switch to, different monitor, window, etc. I expect that alt is not "stuck" on.

Screenshots and Videos None atm. I can try to get something if needed.

Operating System Provide the output of systeminfo | grep "^OS Name\|^OS Version"

OS Name:                   Microsoft Windows 10 Pro
OS Version:                10.0.19045 N/A Build 19045

komorebic check Output Provide the output of komorebic check

No KOMOREBI_CONFIG_HOME detected, defaulting to C:\Users\Allie

Looking for configuration files in C:\Users\Allie

No komorebi configuration found in C:\Users\Allie

If running 'komorebic start --await-configuration', you will manually have to call the following command to begin tiling: komorebic complete-configuration

Additional context I have multiple displays and a fair number of windows up for work (slack, discord, multiple browser windows, internal chat services and unity/rider

LGUG2Z commented 11 months ago

Hi @allora this is an issue that is known to impact a minority of users when they have alt_focus_hack enabled in the config.

You may want to check out any commit after this one: https://github.com/LGUG2Z/komorebi/commit/e04ba0e033c4515095d1290019b21bec7a644204

This commit (or any commit after it on the master branch) implements a different approach to focus changing that doesn't rely on alt_focus_hack (ie. it can be set to false) - I am currently using this as are a number of users on the Discord to good results.

This will be rolled out in the next release, which will most likely be in early January, but you can grab the prebuilt binaries from the latest actions job to try it out locally too if you are not in a position to build from source.

allora commented 11 months ago

I'm pretty much just using the defaults.. i never set an "alt focus hack" is there a way to see if its enabled?

LGUG2Z commented 11 months ago

It's enabled by default in the example config from the latest release: https://github.com/LGUG2Z/komorebi/blob/master/komorebi.example.json#L6

allora commented 11 months ago

Awesome thanks! When i get time ill test out the new build and report back

cubeDHS2017 commented 11 months ago

I came across this issues and decided to try using AutoHotKey to manage all of my keyboard shortcuts. Using AutoHotKey I have not had this issue with the alt key getting stuck. The other reason why it might have been fixed is because I have changed over to use the Windows key as my main modifier key (win key + 1 to go to first workspace). Since I have made these changes the alt key sticking has not been a problem.

LGUG2Z commented 6 months ago

alt_focus_hack has been deprecated for a while now