Is it possible to receive terminal mouse clicks in go?

agolangf · · 472 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>Basically want to know what character was clicked on, is it possible/practical?</p> <hr/>**评论:**<br/><br/>TheMerovius: <pre><p>It&#39;s possible and practical, as in every other language. I&#39;d recommend <a href="https://github.com/nsf/termbox-go" rel="nofollow">termbox-go</a>, which has native <a href="https://godoc.org/github.com/nsf/termbox-go#Event" rel="nofollow">mouse support</a> and is pure-go. Other options exist.</p></pre>weberc2: <pre><p>I&#39;ve played with this library; its very good.</p></pre>ROFLLOLSTER: <pre><p>Thanks a lot.</p></pre>MerreM: <pre><p>Might not be exactly what you&#39;re looking for, but you could give ncurses a go.</p> <p><a href="https://github.com/rthornton128/goncurses" rel="nofollow">https://github.com/rthornton128/goncurses</a></p> <p><a href="https://stackoverflow.com/questions/4907132/get-terminal-cursor-position" rel="nofollow">https://stackoverflow.com/questions/4907132/get-terminal-cursor-position</a></p></pre>om0tho: <pre><p>As an alternative to termbox, you might also consider tcell. I&#39;ve been playing around with it, seems nice. <a href="https://github.com/gdamore/tcell" rel="nofollow">https://github.com/gdamore/tcell</a> The also have &#34;Better mouse support&#34;. Whatever that means.</p></pre>

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

472 次点击  
加入收藏 微博
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传