bootstack.shortcuts.Shortcut#

class bootstack.shortcuts.Shortcut(key, pattern, command)#

Bases: object

A registered keyboard shortcut.

property binding: str#

Tkinter binding string.

Returns:

Binding string like “<Control-s>” or “<Command-Shift-s>”

command: Callable#

Function to execute when triggered.

property display: str#

Platform-appropriate display string for menus.

Returns:

On Mac – “⇧⌘S” (symbols, no separators) On Windows/Linux: “Ctrl+Shift+S” (names with + separators)

key: str#

Unique identifier for lookup (e.g. 'save', 'file.open').

pattern: str#

Shortcut pattern (e.g. 'Mod+S', 'Shift+Alt+N').