Aerospace not registering key presses on letter keys #959
Replies: 31 comments
-
I'm not sure of the trigger but I think I'm running into the same (or a similar) bug. My my aerospace.toml
I'm on |
Beta Was this translation helpful? Give feedback.
-
I just stumbled across this, and have found another peculiarity: If I add
at the very end of my But if I move the binding up, just below all the
binds, the keypress registers. |
Beta Was this translation helpful? Give feedback.
-
Something related for me as well, e.g. Issue detected in 0.16.0, 0.16.1 and now 0.16.2. Also updated macOS to 15.1.1 (could be related, but sadly I've already upgraded all my macOS instances, so I can't verify if this was the case). PS: If I change to using e.g.
# Place a copy of this config to ~/.aerospace.toml
# After that, you can edit ~/.aerospace.toml to your liking
# You can use it to add commands that run after login to macOS user session.
# 'start-at-login' needs to be 'true' for 'after-login-command' to work
# Available commands: https://nikitabobko.github.io/AeroSpace/commands
after-login-command = []
# You can use it to add commands that run after AeroSpace startup.
# 'after-startup-command' is run after 'after-login-command'
# Available commands : https://nikitabobko.github.io/AeroSpace/commands
after-startup-command = []
# Start AeroSpace at login
start-at-login = false
# Normalizations. See: https://nikitabobko.github.io/AeroSpace/guide#normalization
enable-normalization-flatten-containers = true
enable-normalization-opposite-orientation-for-nested-containers = true
# See: https://nikitabobko.github.io/AeroSpace/guide#layouts
# The 'accordion-padding' specifies the size of accordion padding
# You can set 0 to disable the padding feature
accordion-padding = 30
# Possible values: tiles|accordion
default-root-container-layout = 'tiles'
# Possible values: horizontal|vertical|auto
# 'auto' means: wide monitor (anything wider than high) gets horizontal orientation,
# tall monitor (anything higher than wide) gets vertical orientation
default-root-container-orientation = 'auto'
# Mouse follows focus when focused monitor changes
# Drop it from your config, if you don't like this behavior
# See https://nikitabobko.github.io/AeroSpace/guide#on-focus-changed-callbacks
# See https://nikitabobko.github.io/AeroSpace/commands#move-mouse
# Fallback value (if you omit the key): on-focused-monitor-changed = []
on-focused-monitor-changed = ['move-mouse monitor-lazy-center']
# You can effectively turn off macOS "Hide application" (cmd-h) feature by toggling this flag
# Useful if you don't use this macOS feature, but accidentally hit cmd-h or cmd-alt-h key
# Also see: https://nikitabobko.github.io/AeroSpace/goodness#disable-hide-app
automatically-unhide-macos-hidden-apps = false
# Possible values: (qwerty|dvorak)
# See https://nikitabobko.github.io/AeroSpace/guide#key-mapping
[key-mapping]
preset = 'qwerty'
# Gaps between windows (inner-*) and between monitor edges (outer-*).
# Possible values:
# - Constant: gaps.outer.top = 8
# - Per monitor: gaps.outer.top = [{ monitor.main = 16 }, { monitor."some-pattern" = 32 }, 24]
# In this example, 24 is a default value when there is no match.
# Monitor pattern is the same as for 'workspace-to-monitor-force-assignment'.
# See: https://nikitabobko.github.io/AeroSpace/guide#assign-workspaces-to-monitors
[gaps]
inner.horizontal = 0
inner.vertical = 0
outer.left = 0
outer.bottom = 0
outer.top = 0
outer.right = 0
# 'main' binding mode declaration
# See: https://nikitabobko.github.io/AeroSpace/guide#binding-modes
# 'main' binding mode must be always presented
# Fallback value (if you omit the key): mode.main.binding = {}
[mode.main.binding]
# All possible keys:
# - Letters. a, b, c, ..., z
# - Numbers. 0, 1, 2, ..., 9
# - Keypad numbers. keypad0, keypad1, keypad2, ..., keypad9
# - F-keys. f1, f2, ..., f20
# - Special keys. minus, equal, period, comma, slash, backslash, quote, semicolon, backtick,
# leftSquareBracket, rightSquareBracket, space, enter, esc, backspace, tab
# - Keypad special. keypadClear, keypadDecimalMark, keypadDivide, keypadEnter, keypadEqual,
# keypadMinus, keypadMultiply, keypadPlus
# - Arrows. left, down, up, right
# All possible modifiers: cmd, alt, ctrl, shift
# All possible commands: https://nikitabobko.github.io/AeroSpace/commands
# See: https://nikitabobko.github.io/AeroSpace/commands#exec-and-forget
# You can uncomment the following lines to open up terminal with alt + enter shortcut (like in i3)
# alt-enter = '''exec-and-forget osascript -e '
# tell application "Terminal"
# do script
# activate
# end tell'
# '''
# See: https://nikitabobko.github.io/AeroSpace/commands#layout
alt-slash = 'layout tiles horizontal vertical'
ctrl-comma = 'layout tiles horizontal vertical'
alt-comma = 'layout accordion horizontal vertical'
# See: https://nikitabobko.github.io/AeroSpace/commands#focus
alt-h = 'focus left'
alt-j = 'focus down'
alt-k = 'focus up'
alt-l = 'focus right'
# See: https://nikitabobko.github.io/AeroSpace/commands#move
alt-shift-h = 'move left'
alt-shift-j = 'move down'
alt-shift-k = 'move up'
alt-shift-l = 'move right'
# See: https://nikitabobko.github.io/AeroSpace/commands#resize
alt-shift-minus = 'resize smart -50'
alt-shift-equal = 'resize smart +50'
# See: https://nikitabobko.github.io/AeroSpace/commands#workspace
alt-1 = 'workspace 1'
alt-2 = 'workspace 2'
alt-3 = 'workspace 3'
alt-4 = 'workspace 4'
alt-5 = 'workspace 5'
alt-6 = 'workspace 6'
# alt-7 = 'workspace 7'
# alt-8 = 'workspace 8'
# alt-9 = 'workspace 9'
alt-a = 'workspace A' # In your config, you can drop workspace bindings that you don't need
alt-b = 'workspace B'
alt-c = 'workspace C'
alt-d = 'workspace D'
alt-e = 'workspace E'
# alt-f = 'workspace F'
alt-g = 'workspace G'
alt-i = 'workspace I'
alt-m = 'workspace M'
alt-n = 'workspace N'
alt-o = 'workspace O'
alt-p = 'workspace P'
alt-q = 'workspace Q'
alt-r = 'workspace R'
alt-s = 'workspace S'
alt-t = 'workspace T'
alt-u = 'workspace U'
alt-v = 'workspace V'
alt-w = 'workspace W'
alt-x = 'workspace X'
alt-y = 'workspace Y'
# alt-z = 'workspace Z'
# See: https://nikitabobko.github.io/AeroSpace/commands#move-node-to-workspace
alt-shift-1 = 'move-node-to-workspace 1'
alt-shift-2 = 'move-node-to-workspace 2'
alt-shift-3 = 'move-node-to-workspace 3'
alt-shift-4 = 'move-node-to-workspace 4'
alt-shift-5 = 'move-node-to-workspace 5'
alt-shift-6 = 'move-node-to-workspace 6'
# alt-shift-7 = 'move-node-to-workspace 7'
# alt-shift-8 = 'move-node-to-workspace 8'
# alt-shift-9 = 'move-node-to-workspace 9'
alt-shift-a = 'move-node-to-workspace A'
alt-shift-b = 'move-node-to-workspace B'
alt-shift-c = 'move-node-to-workspace C'
alt-shift-d = 'move-node-to-workspace D'
alt-shift-e = 'move-node-to-workspace E'
# alt-shift-f = 'move-node-to-workspace F'
alt-shift-g = 'move-node-to-workspace G'
alt-shift-i = 'move-node-to-workspace I'
alt-shift-m = 'move-node-to-workspace M'
alt-shift-n = 'move-node-to-workspace N'
alt-shift-o = 'move-node-to-workspace O'
alt-shift-p = 'move-node-to-workspace P'
alt-shift-q = 'move-node-to-workspace Q'
alt-shift-r = 'move-node-to-workspace R'
alt-shift-s = 'move-node-to-workspace S'
alt-shift-t = 'move-node-to-workspace T'
alt-shift-u = 'move-node-to-workspace U'
alt-shift-v = 'move-node-to-workspace V'
alt-shift-w = 'move-node-to-workspace W'
alt-shift-x = 'move-node-to-workspace X'
alt-shift-y = 'move-node-to-workspace Y'
# alt-shift-z = 'move-node-to-workspace Z'
# See: https://nikitabobko.github.io/AeroSpace/commands#workspace-back-and-forth
alt-tab = 'workspace-back-and-forth'
# See: https://nikitabobko.github.io/AeroSpace/commands#move-workspace-to-monitor
alt-shift-tab = 'move-workspace-to-monitor --wrap-around next'
# esod
# ---
ctrl-alt-cmd-space = 'layout floating tiling'
ctrl-shift-space = 'layout horizontal vertical'
# See: https://nikitabobko.github.io/AeroSpace/commands#resize
ctrl-shift-l = 'move-node-to-monitor right --focus-follows-window'
ctrl-shift-h = 'move-node-to-monitor left --focus-follows-window'
# See: https://nikitabobko.github.io/AeroSpace/commands#balance-sizes
ctrl-alt-space = 'balance-sizes'
# See: https://nikitabobko.github.io/AeroSpace/commands#resize
ctrl-alt-k = 'resize smart +50'
ctrl-alt-j = 'resize smart -50'
# same, but more size
ctrl-alt-h = 'resize smart -350'
ctrl-alt-l = 'resize smart +350'
# fullscreen
alt-f = 'fullscreen'
alt-z = 'fullscreen'
alt-shift-esc = 'mode service'
# See: https://nikitabobko.github.io/AeroSpace/commands#mode
alt-shift-semicolon = 'mode service'
# 'service' binding mode declaration.
# See: https://nikitabobko.github.io/AeroSpace/guide#binding-modes
[mode.service.binding]
esc = ['reload-config', 'mode main']
r = ['flatten-workspace-tree', 'mode main'] # reset layout
f = ['layout floating tiling', 'mode main'] # Toggle between floating and tiling layout
backspace = ['close-all-windows-but-current', 'mode main']
# sticky is not yet supported https://github.com/nikitabobko/AeroSpace/issues/2
#s = ['layout sticky tiling', 'mode main']
alt-shift-h = ['join-with left', 'mode main']
alt-shift-j = ['join-with down', 'mode main']
alt-shift-k = ['join-with up', 'mode main']
alt-shift-l = ['join-with right', 'mode main']
[[on-window-detected]]
if.app-id = 'md.obsidian'
run = "move-node-to-workspace 1"
[[on-window-detected]]
if.app-id = 'com.google.Chrome'
run = "move-node-to-workspace 2"
[[on-window-detected]]
if.app-id = 'com.github.wez.wezterm'
run = "move-node-to-workspace 3"
[[on-window-detected]]
if.app-id = 'com.citrix.receiver.icaviewer.mac'
run = "move-node-to-workspace 4"
[[on-window-detected]]
if.app-id = 'com.citrix.receiver.nomas'
run = "move-node-to-workspace 4"
[[on-window-detected]]
if.app-id = 'company.thebrowser.Browser'
run = "move-node-to-workspace 5"
[[on-window-detected]]
if.app-id = 'com.todoist.mac.Todoist'
run = "move-node-to-workspace N"
[[on-window-detected]]
if.app-id = 'com.flexibits.fantastical2.mac'
run = "move-node-to-workspace N"
[[on-window-detected]]
if.app-id = 'com.microsoft.teams2'
run = "move-node-to-workspace P"
[[on-window-detected]]
if.app-id = 'com.hnc.Discord'
run = "move-node-to-workspace P"
[[on-window-detected]]
if.app-id = 'com.spotify.client'
run = "move-node-to-workspace P"
|
Beta Was this translation helpful? Give feedback.
-
My mistake! Hammerspoon was interfering. |
Beta Was this translation helpful? Give feedback.
-
I am experiencing this intermittently, but once it happens, it requires a reboot to be fixed. Could this be something within macOS? I have attempted to look through fs_usage logs, as well as utilize tools such as Shortcut Detector to determine if anything was getting caught in between, but with no luck. At some point, the alt combinations just fail to be caught by aerospace, even after a config reload, and complete stop and start of the application. At that point, alt keys work regularly, in any application they are used in, providing the correct shortcuts for that particular application. I have no other applications that claim the use of that key at a global level. |
Beta Was this translation helpful? Give feedback.
-
What I realized is that the modes (like service mode or any custom mode we add) are not being cleared. The app stays on service mode or app mode or any mode after we run a command, even if we run it by adding You can see that by looking at the menubar and noticing the And by restarting, you are effectively forcing it back to main mode |
Beta Was this translation helpful? Give feedback.
-
Restarting doesn't fix the issue I reported. Something is persistent with the issue where it wont register letter keys anymore (though keys pressed with a modifier key are captured) if I remember correctly. |
Beta Was this translation helpful? Give feedback.
-
This is unfortunately not what I am experiencing. If that were the case, a restart of the application itself should fix it, but it doesn't. I need to reboot my system entirely for it to work properly again. The mode seems to be in normal mode when this happens. The alt combinations just don't work (except for alt tab, which does work switching to the previous workspace). |
Beta Was this translation helpful? Give feedback.
-
I had
in my aerospace config, the alt-space never used to work, but now it works, but alt-f is not working anymore, also not if i comment the alt-space. Alt+ number also does not work anymore. |
Beta Was this translation helpful? Give feedback.
-
I think this is related to macOS Sequoia. Aerospace was working perfectly for me, until I updated from Sonoma. Now I'm having this issue as well. |
Beta Was this translation helpful? Give feedback.
-
Update: I rebooted, the issue went away. Some time later, I (co-incidentally) ran |
Beta Was this translation helpful? Give feedback.
-
I had skhd running as well, but killing the process did not fix it. I know uninstalled skhd. Will report back in some time on if this fixes it for me. |
Beta Was this translation helpful? Give feedback.
-
Restarting does not fix it for me, and I never had skhd installed (or anything else capturing across the board afaik). I am on Sequoia. What I'm experiencing seems to match up directly to what @samholmes is. |
Beta Was this translation helpful? Give feedback.
-
FWIW, I have the same problem. I was working along configuring Aerospace things earlier this morning, and just when I sat down to start doing some real work I found that shortcuts from the docs config like One thing I can add to everybody else's descriptions. I have a setup for multi-monitor that uses modes. Like this:
Now, before the problem occurred today I had the keys in the I'm on Sequoia 15.2, but I was also there this morning when all was good. I double checked for things like Hammerspoon and skhd since I had them installed before, but I didn't find anything. I guess Aerospace could use a "debug keyboard shortcuts" mode where it outputs on the console what keyboard shortcuts it can "see" -- that would make it a bit easier to try around with various running apps and see if any specific one interrupts the correct recognition of keyboard shortcuts. Edit: another example for the problem with bindings in modes just came up. Since my
But it did not work! I just got stuck in service mode because there was no reaction to I changed the setup to this and now it's all good:
Technically I can't swear that this issue with bindings in modes is the same as the one that prevents alt combos from working -- but both these problems certainly kicked in for me at exactly the same time. |
Beta Was this translation helpful? Give feedback.
-
Could this potentially have something to do with the number of workspaces available to use? Upon initially installing, I left the default config as-is with all of the pre-defined workspaces, 0-9 and a-z. I noticed after switching back and forth between workspaces quickly, the switch would start to slow down, and at some point, it would be so behind that I could not even open the menu in the top bar for aerospace until I gave it time to catch up. At this time, I could not use any key bindings, however whatever key binds I pushed would seemingly get added to the queue and be performed in sequence whenever aerospace caught up. Thinking about this, I removed most of the workspaces keybindings from the config and left only those which I actually use (about 5). After doing this, workspace switches are much faster. To me this seems like an un-optomized process lurking in the workspace switching logic. Can't say if it is the cause of the original issue here, but something to consider |
Beta Was this translation helpful? Give feedback.
-
I am having this issue as well. I can reliably break all shortcuts by locking the computer with Edit: Well, this is awkward, while it was consistently breaking as described above when locking/suspending, I can no longer reproduce this issue. |
Beta Was this translation helpful? Give feedback.
-
Experienced the exact same thing, then I started killing apps one by one to see which one was interfering. Killing Bitwarden completely resolved the issue - I have no idea why it would be taking over all Options shortcuts though, but it worked. |
Beta Was this translation helpful? Give feedback.
-
This is pretty interesting. I think the issue might involve an app that never actually gets focus, but still sits there waiting for a password input. Generally speaking, on macOS, if password input is focused, global shortcuts don't work, this is a known behavior. How to reproduce:
It seems like at step 4, there’s some hidden password input that “has focus,” causing the OS to disable shortcuts. If you ever bring that app to the foreground, click on somewhere else to defocus password input or kill it, shortcuts start working again, even after another lock/unlock cycle. Removing Bitwarden from the login items also fixes this. I’m guessing this isn’t limited to Bitwarden. Any app that starts up focused on a password input could cause the same kind of shortcut lockout. |
Beta Was this translation helpful? Give feedback.
-
I experienced this a ton back when I used Yabai/skhd. (Some?) password input fields enable "secure input" mode - basically, macOS's way of preventing keystroke logging. My Yabai/skhd keyboard shortcuts never worked when e.g. I had Chrome open in the background, with the cursor sitting in the password field waiting to login to my Proxmox server. The interesting thing is, I don't run into that situation using Aerospace, despite the same circumstances coming up all the time. Maybe Apple updated the APIs for dealing with this but some apps (e.g. BitWarden) are still using an old method? Shot in the dark. It's interesting nonetheless. |
Beta Was this translation helpful? Give feedback.
-
Can confirm! Had NordPass open a window somewhere in the background prompting me for password after logging in. After I made that window go away (logged in), aerospace works again 🎉 |
Beta Was this translation helpful? Give feedback.
-
I tried to verify this but I can't. This morning my Alt-combos work correctly, and the existence of various login entries fields in other windows does nothing to deter them. Yep, even with the Touch ID dialog hanging around on one screen, I can still use Edit: one thing I find is that if I focus the password entry field in 1Password, I can't use |
Beta Was this translation helpful? Give feedback.
-
I can consistently reproduce with NordPass. When you open NordPass the login window gets put in background automatically, so you usually don't notice. But as long as that window is open somewhere This does not happen with Bitwarden (although I only have browser extension) 🤷 |
Beta Was this translation helpful? Give feedback.
-
Thanks for this, I experienced the same problem. After closing the NordPass window, switching between workspaces worked again 🥇 |
Beta Was this translation helpful? Give feedback.
-
i can confirm the same behaviour with bitwarden. There are also other people 'complaining' about this issue with is probably not aerospace related. Here is a github issue thread. sindresorhus/KeyboardShortcuts#176 The statement there is that it is fixed in 15.2. i will update and report back. |
Beta Was this translation helpful? Give feedback.
-
Super interesting thread. One user even suggests that Apple restrict the use of option keyboard shortcuts when interacting with a password field globally. I imagine this may well be the underlying issue in this case. I recently encountered the same thing with 1password prompting me, and my key bindings not working. Entering my password and submitting, the keybindings work again. I cannot say for sure that it is the answer, as I still remember encountering the issue with no password prompt in sight, even closing all of my apps did not allow the keybindings to work again. However, it is very possible that there was a hidden window somewhere, maybe even from macos. Stranger things have occurred in the past... In any case, I am on 15.2 and this issue persists, at least when password prompts are being interacted with. Will report back if I encounter the broader issue where no password prompts are in sight. |
Beta Was this translation helpful? Give feedback.
-
Similar fix for me. I had Arc open in the background, with the Dashlane extension prompting to pick an account for autofill on Outlook. Once I closed that, Option+Key started working again. |
Beta Was this translation helpful? Give feedback.
-
Also encountering this issue after upgrading to Sequoia 15.2, it has no discernible cause for me, does not appear to be caused by any password prompts and it does not happen immediately, but after 1-2 hours (then I have to restart). There is this thread I found, which seems the culprit, but why does it work for the first hour? |
Beta Was this translation helpful? Give feedback.
-
I can reliably reproduce this with any web page with a password field. If the password field is focused then alt+KEY and alt+shift+KEY workspace commands never reach aerospace and instead inputs appear in the password field. Shifting focus away from the password field restores alt key-dependent aerospace functionality. I discovered this after alt+KEY stopped responding and I restarted aerospace, then went through minimizing every window until I arrived at a browser displaying a login page. As soon as I clicked out of the password field alt+KEY started working in aerospace. During my window minimization spree I also noticed the browser's find dialog appearing on the desktop by itself (outside the browser) (possibly caused by a browser bug?) and possibly also causing macOS to think the password field was focused?, even though I was switching to other apps such as VSCode. During this time I also observed that the alt+KEY special characters were appearing in my VSCode editor rather than switching aerospace workspaces. I'm trying to use ctrl+KEY to switch workspaces as an alternative, but that's not working out so well because it sometimes requires a double-press of KEY after holding down ctrl. I guess that's the OS interfering too... macOS 15.2 (24C101) |
Beta Was this translation helpful? Give feedback.
-
FWIW, while many can see connections between password fields and Alt keys, my machine didn't behave that way. Now I've remapped all my shortcuts to use a Hyper modifier (i.e. Command+Option+Control+Shift) and I haven't seen this problem ever since. Not sure what exactly this means, but I thought I'd add it to the picture. |
Beta Was this translation helpful? Give feedback.
-
The problem for me only seemed to surface after using the terminal app, quitting it didn't work but force quitting did, so far the problem hasn't resurfaced |
Beta Was this translation helpful? Give feedback.
-
Describe the bug
Aerospace works great for a majority of the time. It suddenly stops tracking keyboard letter and number keys but chorded keys with modifiers will still work. It seems to have been caused by connecting to a monitor. I don't have a repo steps, but when it happens, it happens and it's not clear how to fix it.
Known solution
I stopped using Aerospace for now because it's not reliable enough at the moment. I wish I could help in anyway to improve it's reliability.
Steps to Reproduce
Use my config for a while and use an external monitor it'll eventually happen (maybe):
Beta Was this translation helpful? Give feedback.
All reactions