Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Sources/AppBundle/config/HotkeyBinding.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ import TOMLKit
@MainActor private var hotkeys: [String: HotKey] = [:]

@MainActor func resetHotKeys() {
// Explicitly unregister all hotkeys. We cannot always rely on destruction of the HotKey object to trigger
// unregistration because we might be running inside a hotkey handler that is keeping its HotKey object alive.
for (_, key) in hotkeys {
key.isEnabled = false
}
hotkeys = [:]
}

Expand Down
Loading