Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
509 views
in Technique[技术] by (71.8m points)

dialog - Can you detect that a key is being constantly pressed in a terminal app?

I would like to show a light dialog in my console app (it uses libslang to handle the terminal) – it should be explicitly a temporary dialog, shown quickly to peek some information to then be closed.

I think that therefore it should be shown when some key is pressed and hold in this state, and hidden when the key is released.

However, I've hit the obstacle: can you actually detect that a key is continuously pressed in a terminal environment? Is this possible? Or maybe I'm doing X/Y problem and there is completely different way of achieving what I've described (either the temporariness of the dialog or the way of activating it)?

question from:https://stackoverflow.com/questions/65931605/can-you-detect-that-a-key-is-being-constantly-pressed-in-a-terminal-app

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...