{"repo":"atomicgo/keyboard","free":true,"listed":false,"github":"https://github.com/atomicgo/keyboard","clone":"git clone https://github.com/atomicgo/keyboard.git","description":"⌨️ Read keyboard events in your terminal applications! (Arrow keys, Home, End, etc.)","language":"Go","stars":108,"topics":["atomicgo","go","golang","cli","keyboard","terminal"],"license":"MIT","category":"cli-tools","readme_excerpt":"AtomicGo keyboard --- Get The Module Documentation Contributing Code of Conduct --- go get atomicgo.dev/keyboard Description Package keyboard can be used to read key presses from the keyboard, while in a terminal application. It's crossplatform and keypresses can be combined to check for ctrl+c, alt+4, ctrl-shift, alt+ctrl+right, etc. It can also be used to simulate (mock) keypresses for CI testing. Works nicely with https://atomicgo.dev/cursor Simple Usage Advanced Usage Simulate Key Presses (for mocking in tests) Usage func Listen Listen calls a callback function when a key is pressed. Simple example: func SimulateKeyPress SimulateKeyPress simulate a key press. It can be used to mock user input and test your application. Example: --- AtomicGo.dev &nbsp;&middot;&nbsp; with ❤️ by @MarvinJWendt MarvinJWendt.com","default_branch":null,"files":null,"tree":[],"storefront":"/r/atomicgo","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/atomicgo/keyboard/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}