Skip to content
Closed
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
3 changes: 1 addition & 2 deletions Sources/KeyboardShortcuts/Shortcut.swift
Original file line number Diff line number Diff line change
Expand Up @@ -694,14 +694,13 @@ extension KeyboardShortcuts.Shortcut {
return nil
}

// This can be exposed if anyone needs it, but I prefer to keep the API surface small for now.
/**
This can be used to show the keyboard shortcut in a `NSMenuItem` by assigning it to `NSMenuItem#keyEquivalent`.

- Note: Don't forget to also pass `.modifiers` to `NSMenuItem#keyEquivalentModifierMask`.
*/
@MainActor
var keyEquivalent: String? {
public var keyEquivalent: String? {
if
let key,
let specialKey = keyToSpecialKeyMapping[key]
Expand Down