
About this notebook
This notebook captures keyboard shortcuts from the browser. It uses marimo and the wigglystuff library. The main object is the KeystrokeWidget class. The code wraps this widget with mo.ui.anywidget to connect it to Python. There is no fixed dataset. The data comes from the keys you press in the browser.
You click the widget and press a key combination, for example Ctrl + Shift + P. The widget sends the latest key event to Python through the last_key trait. The notebook reads this trait and builds a shortcut string. It joins the active modifiers Ctrl, Shift, Alt, and Meta with the pressed key. A small list then shows the Shortcut, the Code, and the Timestamp of the last event. The values update each time you press a new key.











