Detect meta (special) keys (Ctrl, Shift, Alt, Tab, Esc, Backspace) from Shell Input

前端 未结 2 1699
遇见更好的自我
遇见更好的自我 2021-01-13 10:31

I want to know if anybody knows how to detect meta (special) keys (Ctrl, Shift, Alt, Tab, Esc, Backspace)

2条回答
  •  攒了一身酷
    2021-01-13 10:59

    I'm not sure it always make sense. The tty discipline is doing something (details are gory). Perhaps you need a helper program (e.g. in C, which would use a library like ncurses or readline) such as dialog!

提交回复
热议问题