New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch workspaces on keydown rather than on keyup #205
Comments
It's not possible in the upstream binary, but you can build AeroSpace from sources with the following patch: diff --git a/Sources/AppBundle/config/HotkeyBinding.swift b/Sources/AppBundle/config/HotkeyBinding.swift
index 04d0e45b..7aff4d49 100644
--- a/Sources/AppBundle/config/HotkeyBinding.swift
+++ b/Sources/AppBundle/config/HotkeyBinding.swift
@@ -24,7 +24,7 @@ var activeMode: String? = mainModeId
func activateMode(_ targetMode: String?) {
let targetBindings = targetMode.flatMap { config.modes[$0] }?.bindings ?? [:]
for binding in targetBindings.values where !hotkeys.keys.contains(binding.binding) {
- hotkeys[binding.binding] = HotKey(key: binding.key, modifiers: binding.modifiers, keyUpHandler: {
+ hotkeys[binding.binding] = HotKey(key: binding.key, modifiers: binding.modifiers, keyDownHandler: {
if let activeMode {
refreshSession(forceFocus: true) {
_ = config.modes[activeMode]?.bindings[binding.binding]?.commands.run(.focused)
I tested other apps: i3-wm (on Linux), Chrome, Firefox, Finder, IntelliJ IDEA. I was genuinely surprised that all of them handle keydown. For some reason, I thought that apps normally handle keyup. Since keydown seems to be the norm, I think I will change the default when I return from vacation (in 1 month) |
I was just looking into how I could configure this, and tried out building from source with this patch. It made switching between workspaces feel basically as fast as i3/sway. Awesome change! |
keyDownHandler seems to be the norm among apps #205
keyDownHandler seems to be the norm among apps #205
Fixed in 0.11.0-Beta |
Thank you so much for this, this is absolutely awesome :) |
Is it possible to switch workspaces on key down rather than key up?
In general, this adds a lot of (perceived) latency. It's still slower than e.g. sway/hyprland on linux, but those WMs switch on keydown rather than keyup.
The text was updated successfully, but these errors were encountered: