A desktop app designed to help you master keyboard shortcuts
- Add, edit, and delete keyboard shortcuts
- Organize shortcuts by category
- Search and filter shortcuts
- Persistent storage of your shortcuts
- Quiz difficulty levels
- Right click on list element to view delete button
- Python
- Tkinter
- clone repo
git clone https://github.com/mzums/keysnap - run
python main.py
-
__slots__in classesclass ShortcutManager: __slots__ = ('filename', '_shortcuts', '_categories')
- replaces dynamic
__dict__with fixed attribute lists
- replaces dynamic
-
Memory pooling for categories
if category not in self._categories: self._categories.append(category) category_idx = self._categories.index(category)
- stores category strings once and reuses them
-
Tuple-based data storage
self._shortcuts.append((shortcut, description, category_idx))
- more memory-efficient than dictionaries/objects
-
Binary storage with fixed-size records
f.write(struct.pack('II', len(self._shortcuts), len(self._categories)))
- more compact than text formats (JSON/XML)
-
Lazy loading for quiz data
def refresh_available(self): self.available_shortcuts = self.app.manager.get_shortcuts()
- only loads quiz data when needed
-
Selective UI updates
self.app.list_frame.refresh_list() self.app.quiz_frame.refresh_available()
- updates only necessary components
-
Efficient string handling
self.shortcut_var = tk.StringVar()
- uses Tkinter's optimized string management
-
Pre-display data filtering
for item in self.app.manager.get_shortcuts(category): if search_term in shortcut.lower()...
- avoids storing invisible items in GUI widgets