Ruby Keyboard event handling

前端 未结 2 1615
离开以前
离开以前 2020-12-22 02:08

Hello im using curses to develop a small console application.

I have a main loop section wich waits for user input, it uses the getstr function, of course this waits

2条回答
  •  清歌不尽
    2020-12-22 02:52

    you want getch rather than getstr. also see curt sampson's comment about the arrow keys not being a single character.

提交回复
热议问题